{"openapi":"3.2.0","info":{"title":"Veryfront REST API reference","version":"1.0.0","description":"## Explore the API\n\n| Domain | Use it to |\n| --- | --- |\n| [Projects](#tag/projects) | Manage projects and files. |\n| [Agents](#tag/agents) | Manage agent primitives. |\n| [Orchestration](#tag/execution) | Manage conversations and runs. |\n| [Evaluations](#tag/evaluations) | Manage evaluations and results. |\n| [AI Gateway](#tag/ai-gateway) | Discover models, control access, run inference and measure model usage. |\n| [MCP](#tag/mcp) | Discover tools and authorization. |\n| [Integrations](#tag/integrations) | Manage connections and integrations. |\n| [Knowledge](#tag/knowledge) | Manage documents and search. |\n| [Deployments](#tag/deployments) | Manage releases and deployments. |\n| [Runtime](#tag/runtime) | Manage environments and infrastructure. |\n| [Observability](#tag/observability) | Monitor activity and performance. |\n| [Identity & Access](#tag/identity-access) | Manage identity and access. |\n| [Billing & Usage](#tag/billing-usage) | Manage billing and usage. |\n| [Other](#tag/platform) | Inspect health and API metadata. |\n\n[OpenAPI specification (JSON)](/openapi.json)","contact":{"name":"Veryfront API Support","url":"https://veryfront.com/docs","email":"support@veryfront.com"},"x-api-id":"5f1f0b8a-6b0e-4c1a-9b35-0f3a1e6d84c7","x-audience":"external-public"},"components":{"schemas":{"RunStreamEvent":{"type":"object","properties":{"type":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":true},"RunStreamFrame":{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0,"description":"Durable reconnect cursor; null for transient frames."},"event_type":{"type":"string","minLength":1,"description":"Stored event type used for the SSE event name."},"payload":{"$ref":"#/components/schemas/RunStreamEvent"},"is_error":{"type":"boolean","description":"Error classification from the stored row."},"created_at":{"type":["string","null"],"description":"Stored timestamp; null when the frame has no stored timestamp."},"run_id":{"type":"string","minLength":1},"event_class":{"type":"string","enum":["fact","delta"]},"span_id":{"type":"string","minLength":1},"parent_span_id":{"type":["string","null"],"minLength":1},"turn_id":{"type":["string","null"],"minLength":1},"origin_event_type":{"type":"string","minLength":1},"origin_custom_name":{"type":["string","null"],"minLength":1},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1}}},"required":["event_id","event_type","payload","is_error","created_at"],"additionalProperties":false},"CanonicalStreamMember":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["canonical"]},"event":{"type":"object","properties":{"specversion":{"type":"string","enum":["1.0"]},"vfversion":{"type":"string","enum":["1"]},"id":{"type":"string"},"source":{"type":"string"},"subject":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"datacontenttype":{"type":"string","enum":["application/json"]},"dataschema":{"type":"string"},"data":{"type":"object","additionalProperties":{}},"runid":{"type":"string","minLength":1},"recordedat":{"type":"string","format":"date-time"}},"required":["specversion","vfversion","id","source","subject","type","datacontenttype","dataschema","data","runid","recordedat"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"event_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"run_id":{"type":"string","minLength":1},"storage":{"type":"string","enum":["persisted"]},"view":{"type":"string","enum":["public","diagnostic"]},"recorded_at":{"type":"string","format":"date-time"},"event_class":{"type":["string","null"],"enum":["fact","delta",null]},"is_error":{"type":["boolean","null"]},"span_id":{"type":["string","null"],"minLength":1},"turn_id":{"type":["string","null"],"minLength":1},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1}},"origin":{}},"required":["event_id","run_id","storage","view","recorded_at","event_class","is_error","span_id","turn_id","unrecoverable_fields"],"additionalProperties":false}},"required":["kind","event","metadata"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["legacy"]},"reason":{"type":"string","enum":["unknown_type","reserved_type","blocked_type","unclassified_outcome","unclassified_request","unclassified_dispatch","malformed_payload","discriminator_conflict","unavailable_converter","derived_history","unprojectable_view"]},"legacy":{"type":"object","properties":{"event_type":{"type":"string","minLength":1},"payload":{}},"required":["event_type","payload"],"additionalProperties":false},"metadata":{"type":"object","properties":{"event_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"run_id":{"type":"string","minLength":1},"storage":{"type":"string","enum":["persisted"]},"view":{"type":"string","enum":["public","diagnostic"]},"recorded_at":{"type":["string","null"],"format":"date-time"},"event_class":{"type":["string","null"],"enum":["fact","delta",null]},"is_error":{"type":["boolean","null"]},"span_id":{"type":["string","null"],"minLength":1},"turn_id":{"type":["string","null"],"minLength":1},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1}},"origin":{}},"required":["event_id","run_id","storage","view","recorded_at","event_class","is_error","span_id","turn_id","unrecoverable_fields"],"additionalProperties":false}},"required":["kind","reason","legacy","metadata"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["transient"]},"event":{"type":"object","properties":{"type":{"type":"string","minLength":1},"data":{"type":"object","additionalProperties":{}}},"required":["type","data"],"additionalProperties":{}},"view":{"type":"string","enum":["public","diagnostic"]}},"required":["kind","event","view"],"additionalProperties":false}]},"AgUiRunEvent":{"type":"object","description":"A public stable AG-UI 1.0 event emitted by the Runs stream when event_representation=ag-ui.","additionalProperties":true},"ConversationRunStreamFrame":{"allOf":[{"$ref":"#/components/schemas/RunStreamFrame"},{"type":"object","properties":{},"required":["run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false}]},"AgentAdmissionConfig":{"type":"object","properties":{"mode":{"type":"string","enum":["hosted","project","worker"],"description":"Who executes the agent: `worker` hands the run to a registered agent worker that claims it, `project` runs the deployed project agent, `hosted` runs the Veryfront chat agent."},"agent_identity":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256}},"required":["name"],"additionalProperties":false,"description":"Worker display identity only; grants no execution capabilities."},"composing_user_id":{"type":"string","format":"uuid","description":"User who composed the triggering message."},"input_message_id":{"type":"string","format":"uuid","description":"Persisted user message that starts the run; defaults to the latest conversation message."},"implementation_kind":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$","description":"Required for `worker`: the `implementation_kind` the agent worker registered with."},"worker_key":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-zA-Z0-9_.:-]+$","description":"Pin the run to one registered worker by its `worker_key`; omit to let any matching worker claim it."},"client_run_id":{"type":"string","minLength":1,"maxLength":128,"description":"Deprecated. Send an `Idempotency-Key` header instead."},"source_target_kind":{"type":"string","enum":["project","main_branch","environment","preview_branch"],"description":"Worker source selection: project, main_branch, environment, or preview_branch."},"source_target_environment_id":{"type":"string","format":"uuid","description":"Environment UUID when `source_target_kind` is `environment`."},"source_target_branch_id":{"type":"string","format":"uuid","description":"Preview branch UUID when `source_target_kind` is `preview_branch`."}},"required":["mode"],"additionalProperties":false,"description":"Agent admission for an agent target with `conversation_id`. The conversation's latest message must be a persisted user message. Before durable queue admission, the prepared active user message and its run/conversation/input identity wrapper must fit 2 MiB of serialized UTF-8 JSON. Larger prepared requests fail with INVALID_INPUT before quota charging or dispatch and are never truncated. See https://veryfront.com/docs/cloud/connect-agent-runtime.","allOf":[{"if":{"properties":{"mode":{"const":"worker"}},"required":["mode"]},"then":{"required":["implementation_kind"]}},{"not":{"required":["source_target_environment_id","source_target_branch_id"]}},{"if":{"anyOf":[{"required":["source_target_environment_id"]},{"required":["source_target_branch_id"]}]},"then":{"properties":{"mode":{"const":"worker"}},"required":["mode","source_target_kind"]}},{"if":{"properties":{"source_target_kind":{"enum":["project","main_branch"]}},"required":["source_target_kind"]},"then":{"not":{"anyOf":[{"required":["source_target_environment_id"]},{"required":["source_target_branch_id"]}]}}},{"if":{"properties":{"source_target_kind":{"const":"environment"}},"required":["source_target_kind"]},"then":{"required":["source_target_environment_id"]}},{"if":{"properties":{"source_target_kind":{"const":"preview_branch"}},"required":["source_target_kind"]},"then":{"required":["source_target_branch_id"]}}]},"CreateRunHeartbeatRequest":{"type":"object","properties":{"lease_duration_seconds":{"type":"integer","minimum":5,"maximum":300,"default":60}},"additionalProperties":false},"ProjectReference":{"type":"string"},"PaginationCursor":{"type":"string","description":"Opaque cursor pointing at the next page. Omit it to read the first page."},"PaginationLimit":{"type":"number","minimum":1,"maximum":100,"default":20,"description":"Maximum number of entries to return. Defaults to 20 and is capped at 100."},"UsageQueryPreset":{"type":"string","enum":["7d","30d","90d"],"default":"30d","description":"Whole local days, defaulting to 30d. Explicit from/to bounds take precedence over preset, including SDK-supplied defaults."},"UsageQueryFrom":{"type":"string","format":"date-time","description":"Inclusive start. Supply both from and to; these bounds take precedence over preset."},"UsageQueryTo":{"type":"string","format":"date-time","description":"Exclusive end, no later than the end of today in timezone."},"UsageQueryTimezone":{"type":"string","default":"UTC"},"UsageQueryGranularity":{"type":"string","enum":["hour","day","week","month"],"default":"day","description":"UTC hours, or local calendar days, Monday-based weeks and months."},"UsageQueryGroupBy":{"type":"array","items":{"type":"string","enum":["project","model","api_key","member"]},"maxItems":4,"description":"Grouping dimensions supported by this operation. Repeat the parameter or use a comma-separated list."},"UsageQueryCompare":{"type":"string","enum":["previous_period"],"description":"Compare preceding calendar months for whole-month custom ranges, local days for whole-day ranges and presets, or equal elapsed duration otherwise."},"ProjectConfig":{"type":"object","properties":{"disable_meta_robots":{"type":"boolean","description":"When true, the rendered site asks crawlers not to index it (noindex robots meta tag)."},"provider_id":{"type":["string","null"],"description":"Identifier of the provider backing the project, or null when none is configured. Not necessarily a UUID."},"layout_id":{"type":["string","null"],"description":"Identifier of the layout applied to the project, or null when none is configured."},"is_template":{"type":"boolean","description":"Whether the project is offered in the template gallery."},"coming_soon":{"type":"boolean","description":"Whether the template is listed as coming soon in the gallery."},"category":{"type":["string","null"],"description":"Template gallery category, or null when uncategorised."},"description":{"type":["string","null"],"description":"Template gallery description, or null when none is set."},"disableMetaRobots":{"type":"boolean","description":"Legacy camelCase spelling of `disable_meta_robots`; carries the same value. Prefer `disable_meta_robots`."},"providerId":{"type":["string","null"],"description":"Legacy camelCase spelling of `provider_id`; carries the same value. Prefer `provider_id`."},"layoutId":{"type":["string","null"],"description":"Legacy camelCase spelling of `layout_id`; carries the same value. Prefer `layout_id`."},"isTemplate":{"type":"boolean","description":"Legacy camelCase spelling of `is_template`; carries the same value. Prefer `is_template`."},"comingSoon":{"type":"boolean","description":"Legacy camelCase spelling of `coming_soon`; carries the same value. Prefer `coming_soon`."}},"additionalProperties":false,"description":"Project configuration. Field names use snake_case. Legacy camelCase aliases contain the same values."},"Project":{"type":"object","properties":{"account_id":{"type":["string","null"],"format":"uuid"},"account_name":{"type":["string","null"]},"id":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"},"slug":{"type":"string","example":"my-project"},"name":{"type":"string","example":"My Project"},"description":{"type":"string","example":"A sample project description"},"is_claimed":{"type":"boolean"},"features":{"type":"array","items":{"type":"string"}},"environments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"protected":{"type":"boolean"},"domains":{"type":"array","items":{"type":"string"}},"environment_variables":{"type":"array","items":{}},"active_release_id":{"type":["string","null"],"format":"uuid"},"server_hostname":{"type":["string","null"]}},"required":["id","name"]}},"releases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"export_status":{"type":"string"},"build_status":{"type":"string"},"deploy_status":{"type":"string"}},"required":["id","name"]}},"created_at":{"type":"string","example":"2024-01-15T10:30:00Z"},"updated_at":{"type":"string","example":"2024-01-15T10:30:00Z"},"published_at":{"type":"string"},"prompt_count":{"type":"number"},"config":{"$ref":"#/components/schemas/ProjectConfig"},"provider":{"type":["string","null"]},"layout":{"type":["string","null"]},"type":{"type":"string","enum":["regular","default","template"]},"system_managed":{"type":"boolean"},"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"avatar_src":{"type":"string"}},"required":["id"]}},"capabilities":{"type":"array","items":{"type":"string","enum":["project.read","project.settings.manage","project.delete","project.members.read","project.members.manage","project.invites.read","project.invites.manage","project.files.read","project.files.write","project.realtime.connect","project.realtime.write","project.files.admin","project.uploads.read","project.uploads.write","project.uploads.admin","project.knowledge.read","project.knowledge.write","project.releases.read","project.releases.write","project.deployments.read","project.deployments.write","project.deploy.execute","project.runtime.manage","project.channels.read","project.channels.write","project.sandboxes.manage","project.domains.write","project.environments.manage","project.env_vars.write","project.runs.read","project.runs.write","project.runs.admin","project.agents.read","project.agents.write","project.evals.read","project.evals.write","project.evals.run","project.conversations.read","project.conversations.write","project.conversations.create","project.integrations.read","project.integrations.connect","project.integrations.configure","project.api_keys.read","project.api_keys.manage","project.cache.read","project.cache.write","project.logs.read","project.metrics.read","project.resources.read"]}},"capabilities_version":{"type":"integer"},"labels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"namespace":{"type":"string"},"key":{"type":"string"},"value":{"type":["string","null"]},"color":{"type":["string","null"]}},"required":["id","namespace","key","value"]}}},"required":["id","slug","name"]},"PageInfo":{"type":"object","properties":{"self":{"type":["string","null"],"description":"Cursor pointing to the current page"},"first":{"type":"null","description":"First page cursor (always null for cursor-based pagination)"},"next":{"type":["string","null"],"description":"Cursor for the next page (null if no more pages)"},"prev":{"type":["string","null"],"description":"Cursor for the previous page (null if on first page)"}},"required":["self","first","next","prev"]},"Problem":{"type":"object","properties":{"cause":{"type":"string","enum":["schedule_concurrency_forbidden","schedule_fire_in_progress","schedule_run_limit_reached"],"description":"Schedule admission refusal."},"idempotency":{"type":"object","properties":{"state":{"type":"string","enum":["in_progress","payload_mismatch","outcome_unknown"]},"operation":{"type":"string","minLength":1},"retryable":{"type":"boolean"},"retry_after_seconds":{"type":["integer","null"],"minimum":0},"expires_at":{"type":["string","null"]},"recovery":{"type":"object","properties":{"available":{"type":"boolean"},"description":{"type":"string"},"resource_url":{"type":"string"}},"required":["available","description"]}},"required":["state","operation","retryable","retry_after_seconds","expires_at"],"description":"Replay status, retry timing, and recovery lookup."},"type":{"type":"string","description":"URI reference identifying the problem type","example":"https://api.veryfront.com/errors/validation-failed"},"title":{"type":"string","description":"Short human-readable summary of the problem","example":"Validation Failed"},"status":{"type":"integer","minimum":100,"maximum":599,"description":"HTTP status code","example":400},"code":{"type":"string","description":"Stable machine-readable error code","example":"RUN_INVALID_INPUT"},"detail":{"type":"string","description":"Human-readable explanation specific to this occurrence","example":"The 'email' field must be a valid email address"},"instance":{"type":"string","description":"URI reference identifying the specific occurrence","example":"/projects/my-project/members"},"slug":{"type":"string","description":"Stable identifier for the problem type","example":"validation-failed"},"category":{"type":"string","enum":["AUTH","RESOURCE","VALIDATION","DATABASE","SUBSCRIPTION","INTEGRATION","INTERNAL"],"description":"API error category","example":"VALIDATION"},"suggestion":{"type":"string","description":"Suggested action to resolve the problem","example":"Check the request body and query parameters against the API documentation."},"errors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"Field path that caused the error","example":"email"},"message":{"type":"string","description":"Error message for this field","example":"Invalid email format"},"code":{"type":"string","description":"Error code for this field","example":"INVALID_FORMAT"}},"required":["field","message"]},"description":"Detailed field-level errors for validation failures"}},"required":["type","title","status"]},"Label":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Label UUID."},"resource_kind":{"type":"string","enum":["project","project_agent"],"description":"Resource to which the label is assigned."},"project_id":{"type":"string","format":"uuid","description":"Project UUID containing the labeled resource."},"source_target_kind":{"type":["string","null"]},"source_agent_id":{"type":["string","null"]},"namespace":{"type":"string","description":"Normalized label namespace. API-created labels use user."},"key":{"type":"string","description":"Normalized lowercase label key."},"value":{"type":["string","null"],"description":"Trimmed label value, or null for a key-only label."},"color":{"type":["string","null"],"description":"Trimmed display color, or null when unset."},"created_at":{"type":"string","description":"Creation time as an ISO 8601 timestamp."},"updated_at":{"type":"string","description":"Last update time as an ISO 8601 timestamp."}},"required":["id","resource_kind","project_id","namespace","key","value","created_at","updated_at"]},"OkResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]},"ModelUsageReport":{"type":"object","properties":{"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["account"]},"account_id":{"type":"string","format":"uuid"},"project_id":{"type":["string","null"],"format":"uuid"},"member_id":{"type":["string","null"],"format":"uuid"}},"required":["kind","account_id","project_id","member_id"]},{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"project_id":{"type":"string","format":"uuid"},"member_id":{"type":["string","null"],"format":"uuid"}},"required":["kind","project_id","member_id"]}]},"timeframe":{"type":"object","properties":{"from":{"type":"string","format":"date-time","description":"Inclusive start."},"to":{"type":"string","format":"date-time","description":"Exclusive end."},"timezone":{"type":"string"},"granularity":{"type":"string","enum":["hour","day","week","month"]},"bucket_count":{"type":"integer","minimum":0},"previous":{"type":"object","properties":{"from":{"type":"string","format":"date-time","description":"Inclusive start."},"to":{"type":"string","format":"date-time","description":"Exclusive end."},"timezone":{"type":"string"},"granularity":{"type":"string","enum":["hour","day","week","month"]},"bucket_count":{"type":"integer","minimum":0}},"required":["from","to","timezone","granularity","bucket_count"]}},"required":["from","to","timezone","granularity","bucket_count"]},"summary":{"type":"object","properties":{"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded model funding; omitted when any included call has unknown funding."},"capture":{"type":"object","properties":{"complete_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls with explicitly complete provider token capture, including measured zero."},"partial_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls with explicitly partial provider token capture."},"missing_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls explicitly recorded without provider token usage."},"unknown_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls with absent or unrecognized capture status; never assumed complete."}},"required":["complete_requests","partial_requests","missing_requests","unknown_requests"],"description":"Token capture completeness. These counts sum to requests. Token totals include recorded counters only; unknown or missing tokens are not measured zero. Capture status does not establish settlement or estimation status."},"requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Recorded model calls, not platform HTTP requests."},"input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Normalized uncached input tokens; cache dimensions are reported separately."},"output_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Normalized output tokens, including separately reported reasoning where the provider convention requires it."},"cache_creation_input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cache_read_input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"models_used":{"type":"integer","minimum":0,"description":"Distinct vendor and model IDs, across inference providers."},"previous":{"type":"object","properties":{"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded model funding; omitted when any included call has unknown funding."},"capture":{"type":"object","properties":{"complete_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls with explicitly complete provider token capture, including measured zero."},"partial_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls with explicitly partial provider token capture."},"missing_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls explicitly recorded without provider token usage."},"unknown_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls with absent or unrecognized capture status; never assumed complete."}},"required":["complete_requests","partial_requests","missing_requests","unknown_requests"],"description":"Token capture completeness. These counts sum to requests. Token totals include recorded counters only; unknown or missing tokens are not measured zero. Capture status does not establish settlement or estimation status."},"requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Recorded model calls, not platform HTTP requests."},"input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Normalized uncached input tokens; cache dimensions are reported separately."},"output_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Normalized output tokens, including separately reported reasoning where the provider convention requires it."},"cache_creation_input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cache_read_input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"models_used":{"type":"integer","minimum":0,"description":"Distinct vendor and model IDs, across inference providers."}},"required":["capture","requests","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens","models_used"]}},"required":["capture","requests","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens","models_used"]},"group_by":{"type":"array","items":{"type":"string","enum":["project","model","api_key","member"]},"description":"Requested series grouping dimensions; omitted for the default report."},"models":{"type":"array","items":{"type":"object","properties":{"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded model funding; omitted when any included call has unknown funding."},"capture":{"type":"object","properties":{"complete_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls with explicitly complete provider token capture, including measured zero."},"partial_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls with explicitly partial provider token capture."},"missing_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls explicitly recorded without provider token usage."},"unknown_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls with absent or unrecognized capture status; never assumed complete."}},"required":["complete_requests","partial_requests","missing_requests","unknown_requests"],"description":"Token capture completeness. These counts sum to requests. Token totals include recorded counters only; unknown or missing tokens are not measured zero. Capture status does not establish settlement or estimation status."},"requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Recorded model calls, not platform HTTP requests."},"input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Normalized uncached input tokens; cache dimensions are reported separately."},"output_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Normalized output tokens, including separately reported reasoning where the provider convention requires it."},"cache_creation_input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cache_read_input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"serving":{"type":"array","items":{"type":"object","properties":{"host":{"type":["string","null"]},"region":{"type":["string","null"]}},"required":["host","region"],"additionalProperties":false},"description":"Recorded serving hosts and regions. A null entry preserves calls whose serving location was not recorded; omitted when none was recorded."},"model":{"type":"string","description":"Canonical catalog model ID where recorded; otherwise the normalized historical ID."},"model_provider":{"type":"string","description":"Model vendor ID. Unknown vendors remain valid strings."},"inference_provider":{"type":"string","description":"Recorded inference provider, or unknown when unavailable."}},"required":["capture","requests","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens","model","model_provider","inference_provider"]},"description":"One row per model/vendor/inference-provider identity, ranked by calls."},"projects":{"type":"array","items":{"type":"object","properties":{"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded model funding; omitted when any included call has unknown funding."},"capture":{"type":"object","properties":{"complete_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls with explicitly complete provider token capture, including measured zero."},"partial_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls with explicitly partial provider token capture."},"missing_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls explicitly recorded without provider token usage."},"unknown_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls with absent or unrecognized capture status; never assumed complete."}},"required":["complete_requests","partial_requests","missing_requests","unknown_requests"],"description":"Token capture completeness. These counts sum to requests. Token totals include recorded counters only; unknown or missing tokens are not measured zero. Capture status does not establish settlement or estimation status."},"requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Recorded model calls, not platform HTTP requests."},"input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Normalized uncached input tokens; cache dimensions are reported separately."},"output_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Normalized output tokens, including separately reported reasoning where the provider convention requires it."},"cache_creation_input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cache_read_input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"project_id":{"type":["string","null"],"format":"uuid"},"project_name":{"type":["string","null"]},"project_slug":{"type":["string","null"]},"models":{"type":"array","items":{"type":"object","properties":{"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded model funding; omitted when any included call has unknown funding."},"capture":{"type":"object","properties":{"complete_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls with explicitly complete provider token capture, including measured zero."},"partial_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls with explicitly partial provider token capture."},"missing_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls explicitly recorded without provider token usage."},"unknown_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls with absent or unrecognized capture status; never assumed complete."}},"required":["complete_requests","partial_requests","missing_requests","unknown_requests"],"description":"Token capture completeness. These counts sum to requests. Token totals include recorded counters only; unknown or missing tokens are not measured zero. Capture status does not establish settlement or estimation status."},"requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Recorded model calls, not platform HTTP requests."},"input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Normalized uncached input tokens; cache dimensions are reported separately."},"output_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Normalized output tokens, including separately reported reasoning where the provider convention requires it."},"cache_creation_input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cache_read_input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"serving":{"type":"array","items":{"type":"object","properties":{"host":{"type":["string","null"]},"region":{"type":["string","null"]}},"required":["host","region"],"additionalProperties":false},"description":"Recorded serving hosts and regions. A null entry preserves calls whose serving location was not recorded; omitted when none was recorded."},"model":{"type":"string","description":"Canonical catalog model ID where recorded; otherwise the normalized historical ID."},"model_provider":{"type":"string","description":"Model vendor ID. Unknown vendors remain valid strings."},"inference_provider":{"type":"string","description":"Recorded inference provider, or unknown when unavailable."}},"required":["capture","requests","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens","model","model_provider","inference_provider"]}}},"required":["capture","requests","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens","project_id","project_name","project_slug","models"]},"description":"Account usage by project and model; null project ID is unscoped usage. Empty for project reports."},"series":{"type":"array","items":{"type":"object","properties":{"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded model funding; omitted when any included call has unknown funding."},"capture":{"type":"object","properties":{"complete_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls with explicitly complete provider token capture, including measured zero."},"partial_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls with explicitly partial provider token capture."},"missing_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls explicitly recorded without provider token usage."},"unknown_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls with absent or unrecognized capture status; never assumed complete."}},"required":["complete_requests","partial_requests","missing_requests","unknown_requests"],"description":"Token capture completeness. These counts sum to requests. Token totals include recorded counters only; unknown or missing tokens are not measured zero. Capture status does not establish settlement or estimation status."},"requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Recorded model calls, not platform HTTP requests."},"input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Normalized uncached input tokens; cache dimensions are reported separately."},"output_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Normalized output tokens, including separately reported reasoning where the provider convention requires it."},"cache_creation_input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cache_read_input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bucket_start":{"type":"string","format":"date-time"},"models":{"type":"array","items":{"type":"object","properties":{"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded model funding; omitted when any included call has unknown funding."},"capture":{"type":"object","properties":{"complete_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls with explicitly complete provider token capture, including measured zero."},"partial_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls with explicitly partial provider token capture."},"missing_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls explicitly recorded without provider token usage."},"unknown_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls with absent or unrecognized capture status; never assumed complete."}},"required":["complete_requests","partial_requests","missing_requests","unknown_requests"],"description":"Token capture completeness. These counts sum to requests. Token totals include recorded counters only; unknown or missing tokens are not measured zero. Capture status does not establish settlement or estimation status."},"requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Recorded model calls, not platform HTTP requests."},"input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Normalized uncached input tokens; cache dimensions are reported separately."},"output_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Normalized output tokens, including separately reported reasoning where the provider convention requires it."},"cache_creation_input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cache_read_input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"serving":{"type":"array","items":{"type":"object","properties":{"host":{"type":["string","null"]},"region":{"type":["string","null"]}},"required":["host","region"],"additionalProperties":false},"description":"Recorded serving hosts and regions. A null entry preserves calls whose serving location was not recorded; omitted when none was recorded."},"model":{"type":"string","description":"Canonical catalog model ID where recorded; otherwise the normalized historical ID."},"model_provider":{"type":"string","description":"Model vendor ID. Unknown vendors remain valid strings."},"inference_provider":{"type":"string","description":"Recorded inference provider, or unknown when unavailable."}},"required":["capture","requests","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens","model","model_provider","inference_provider"]}},"groups":{"type":"array","items":{"type":"object","properties":{"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded model funding; omitted when any included call has unknown funding."},"capture":{"type":"object","properties":{"complete_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls with explicitly complete provider token capture, including measured zero."},"partial_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls with explicitly partial provider token capture."},"missing_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls explicitly recorded without provider token usage."},"unknown_requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Calls with absent or unrecognized capture status; never assumed complete."}},"required":["complete_requests","partial_requests","missing_requests","unknown_requests"],"description":"Token capture completeness. These counts sum to requests. Token totals include recorded counters only; unknown or missing tokens are not measured zero. Capture status does not establish settlement or estimation status."},"requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Recorded model calls, not platform HTTP requests."},"input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Normalized uncached input tokens; cache dimensions are reported separately."},"output_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Normalized output tokens, including separately reported reasoning where the provider convention requires it."},"cache_creation_input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cache_read_input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"dimensions":{"type":"object","properties":{"project_id":{"type":["string","null"],"format":"uuid"},"model":{"type":["string","null"]},"model_provider":{"type":["string","null"]},"api_key_id":{"type":["string","null"],"format":"uuid"},"api_key_kind":{"type":"string","enum":["api_key","no_api_key","other_keys","deleted_keys","unattributed"],"description":"Key-listing reports distinguish named keys, other/deleted keys, keyless and unattributed usage."},"member_id":{"type":["string","null"],"format":"uuid"},"member_kind":{"type":"string","enum":["member","former_member","deleted_users","automations","unattributed"],"description":"Project-member reports distinguish named people, deleted users, automations and unattributed usage."}}}},"required":["capture","requests","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens","dimensions"]}}},"required":["capture","requests","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens","bucket_start","models"]},"description":"Bucket totals and model breakdowns. Quiet buckets have zero totals and no model or grouping rows."},"attribution":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether actor attribution is being recorded now."},"member_filtered":{"type":"boolean","description":"Member-filtered reports contain only calls with that recorded actor. Older unrecorded calls and automation are excluded."}},"required":["enabled","member_filtered"]}},"required":["scope","timeframe","summary","models","projects","series","attribution"]},"PublicInferenceRunStatus":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Public inference run UUID."},"project_id":{"type":"string","format":"uuid","description":"Project UUID that owns the run."},"status":{"type":"string","enum":["pending","running","waiting_for_tool","completed","failed","cancelled"]},"finished_at":{"type":["string","null"],"format":"date-time","description":"Terminal timestamp, or null while active."}},"required":["id","project_id","status","finished_at"],"additionalProperties":false},"SubjectBudget":{"type":["object","null"],"properties":{"monthly_limit_usd":{"type":"number","description":"Monthly AI spend limit for this subject, in USD"},"monthly_limit_credits":{"type":"number","description":"The same limit in credits, the unit spend is counted in"}},"required":["monthly_limit_usd","monthly_limit_credits"],"description":"The subject’s monthly AI budget, or null if no budget is configured. Read-only; use `/budgets` to manage budgets."},"SubjectBudgetStatus":{"type":["object","null"],"properties":{"used":{"type":"number","description":"Credits the subject has spent since the budget month began"},"remaining":{"type":"number","description":"Credits remaining before the budget rejects further requests."},"resets_at":{"type":"string","description":"Budget reset time: midnight UTC on the first day of the next month."}},"required":["used","remaining","resets_at"],"description":"Usage against the budget for the current month, or null if the subject has no budget."},"ProjectDetail":{"type":"object","properties":{"account_id":{"type":["string","null"],"format":"uuid"},"account_name":{"type":["string","null"]},"id":{"type":"string","format":"uuid","example":"550e8400-e29b-41d4-a716-446655440000"},"slug":{"type":"string","example":"my-project"},"name":{"type":"string","example":"My Project"},"description":{"type":"string","example":"A sample project description"},"is_claimed":{"type":"boolean"},"features":{"type":"array","items":{"type":"string"}},"environments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"protected":{"type":"boolean"},"domains":{"type":"array","items":{"type":"string"}},"environment_variables":{"type":"array","items":{}},"active_release_id":{"type":["string","null"],"format":"uuid"},"server_hostname":{"type":["string","null"]}},"required":["id","name"]}},"releases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"export_status":{"type":"string"},"build_status":{"type":"string"},"deploy_status":{"type":"string"}},"required":["id","name"]}},"created_at":{"type":"string","example":"2024-01-15T10:30:00Z"},"updated_at":{"type":"string","example":"2024-01-15T10:30:00Z"},"published_at":{"type":"string"},"prompt_count":{"type":"number"},"config":{"$ref":"#/components/schemas/ProjectConfig"},"provider":{"type":["string","null"]},"layout":{"type":["string","null"]},"type":{"type":"string","enum":["regular","default","template"]},"system_managed":{"type":"boolean"},"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"avatar_src":{"type":"string"}},"required":["id"]}},"capabilities":{"type":"array","items":{"type":"string","enum":["project.read","project.settings.manage","project.delete","project.members.read","project.members.manage","project.invites.read","project.invites.manage","project.files.read","project.files.write","project.realtime.connect","project.realtime.write","project.files.admin","project.uploads.read","project.uploads.write","project.uploads.admin","project.knowledge.read","project.knowledge.write","project.releases.read","project.releases.write","project.deployments.read","project.deployments.write","project.deploy.execute","project.runtime.manage","project.channels.read","project.channels.write","project.sandboxes.manage","project.domains.write","project.environments.manage","project.env_vars.write","project.runs.read","project.runs.write","project.runs.admin","project.agents.read","project.agents.write","project.evals.read","project.evals.write","project.evals.run","project.conversations.read","project.conversations.write","project.conversations.create","project.integrations.read","project.integrations.connect","project.integrations.configure","project.api_keys.read","project.api_keys.manage","project.cache.read","project.cache.write","project.logs.read","project.metrics.read","project.resources.read"]}},"capabilities_version":{"type":"integer"},"labels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"namespace":{"type":"string"},"key":{"type":"string"},"value":{"type":["string","null"]},"color":{"type":["string","null"]}},"required":["id","namespace","key","value"]}},"budget":{"$ref":"#/components/schemas/SubjectBudget"},"budget_status":{"$ref":"#/components/schemas/SubjectBudgetStatus"}},"required":["id","slug","name","budget","budget_status"]},"ProjectConfigInput":{"type":"object","properties":{"disable_meta_robots":{"type":"boolean","description":"When true, the rendered site asks crawlers not to index it (noindex robots meta tag)."},"provider_id":{"type":"string","description":"Identifier of the provider backing the project. Not necessarily a UUID."},"layout_id":{"type":"string","description":"Identifier of the layout applied to the project."},"is_template":{"type":"boolean","description":"Whether the project is offered in the template gallery."},"coming_soon":{"type":"boolean","description":"Whether the template is listed as coming soon in the gallery."},"category":{"type":"string","description":"Template gallery category."},"description":{"type":"string","description":"Template gallery description."},"disableMetaRobots":{"type":"boolean","description":"Legacy camelCase spelling of `disable_meta_robots`; carries the same value. Prefer `disable_meta_robots`."},"providerId":{"type":"string","description":"Legacy camelCase spelling of `provider_id`; carries the same value. Prefer `provider_id`."},"layoutId":{"type":"string","description":"Legacy camelCase spelling of `layout_id`; carries the same value. Prefer `layout_id`."},"isTemplate":{"type":"boolean","description":"Legacy camelCase spelling of `is_template`; carries the same value. Prefer `is_template`."},"comingSoon":{"type":"boolean","description":"Legacy camelCase spelling of `coming_soon`; carries the same value. Prefer `coming_soon`."}},"additionalProperties":false,"description":"Project configuration to update. Field names use snake_case. If a legacy camelCase alias is also supplied, its value must match the snake_case field. JSON-encoded strings are accepted for compatibility; new clients should send an object."},"UploadFolder":{"type":"object","properties":{"type":{"type":"string","enum":["folder"],"description":"Item type","example":"folder"},"path":{"type":"string","description":"Project-relative storage path, without a leading slash."},"visibility":{"type":"string","enum":["project","public","private"],"description":"Effective access policy for the upload or folder."},"permission":{"type":"string","enum":["read","write","admin"],"description":"The caller’s effective access to this item: read, write, or admin."},"created_at":{"type":"string","description":"Creation timestamp in ISO 8601 format."}},"required":["type","path","visibility","permission","created_at"]},"UploadFile":{"type":"object","properties":{"id":{"type":"string","description":"Upload UUID."},"path":{"type":"string","description":"Project-relative storage path, without a leading slash."},"file_name":{"type":"string","description":"File name from the upload record."},"content_type":{"type":["string","null"],"description":"Stored MIME type, or null when unspecified."},"size_bytes":{"type":"number","description":"File size in bytes."},"size":{"type":"number","description":"File size in bytes; the same value as size_bytes."},"url":{"type":["string","null"],"description":"API URL for downloading the upload; access depends on its visibility."},"status":{"type":"string","enum":["pending","active","failed"],"description":"Upload lifecycle state: pending until finalized, active when available, or failed."},"visibility":{"type":"string","enum":["project","public","private"],"description":"Effective access policy for the upload or folder."},"created_at":{"type":"string","description":"Creation timestamp in ISO 8601 format."},"updated_at":{"type":"string","description":"Last update timestamp in ISO 8601 format."},"deleted_at":{"type":["string","null"],"description":"Soft deletion timestamp in ISO 8601 format, or null for an undeleted upload."},"type":{"type":"string","enum":["file"],"description":"Item type","example":"file"},"permission":{"type":"string","enum":["read","write","admin"],"description":"The caller’s effective access to this item: read, write, or admin."}},"required":["id","path","file_name","content_type","size_bytes","size","url","status","visibility","created_at","updated_at","deleted_at","type","permission"]},"QuotaProblem":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","properties":{"used":{"type":"number","description":"Current resource usage in the unit defined by the operation"},"limit":{"type":"number","description":"Configured resource limit in the unit defined by the operation"},"requested":{"type":"number","description":"Additional resource amount requested by the operation"}},"required":["used","limit","requested"]}]},"Release":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"version":{"type":["string","null"],"description":"Semver version, for example \"1.2.3\"."},"project_id":{"type":"string","format":"uuid"},"user_id":{"type":"string","format":"uuid"},"export_status":{"type":["string","null"],"enum":["in_progress","completed","error",null],"description":"Export outcome; null when no export status is recorded."},"build_status":{"type":["string","null"],"enum":["in_progress","completed","error",null],"description":"Build outcome; completion does not imply deployment. Null when no build status is recorded."},"deploy_status":{"type":["string","null"],"enum":["in_progress","completed","error",null],"description":"Recorded deployment outcome, or null when no deployment status is recorded. Creating a release does not deploy it."},"created_at":{"type":"string"},"updated_at":{"type":"string"},"asset_manifest":{"type":["object","null"],"properties":{"state":{"type":"string","enum":["queued","building","partial","ready","failed","superseded"]},"manifest_version":{"type":"integer"}},"required":["state","manifest_version"],"description":"Release asset manifest state and version, or null when no manifest exists."}},"required":["id","name","project_id","export_status","build_status","deploy_status"]},"CreateProjectInvitationInput":{"type":"object","properties":{"email":{"type":"string","maxLength":100,"format":"email","description":"Recipient email, stored in lowercase. Existing users are added or have their role changed; otherwise a pending invitation is created. An available collaboration seat is required."},"role":{"type":"string","enum":["admin","editor","viewer"],"description":"Role to grant: admin, editor or viewer."}},"required":["email","role"]},"Channel":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"installation_id":{"type":["string","null"],"format":"uuid"},"platform":{"type":"string","enum":["slack"]},"name":{"type":["string","null"]},"agent_id":{"type":["string","null"],"minLength":1},"enabled":{"type":"boolean"},"platform_team_id":{"type":["string","null"]},"platform_bot_id":{"type":["string","null"]},"workspace_name":{"type":["string","null"]},"respond_to":{"type":"string","enum":["mentions","direct_messages","all"]},"allowed_slack_channel_ids":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["connected","needs_reauth","error"]},"welcome_message":{"type":["string","null"]},"error_message":{"type":["string","null"]},"max_response_tokens":{"type":["integer","null"],"exclusiveMinimum":0},"runtime_target_kind":{"type":"string","enum":["main_branch","environment","preview_branch"]},"target_environment_id":{"type":["string","null"],"format":"uuid"},"target_branch_id":{"type":["string","null"],"format":"uuid"},"resolved_target":{"type":"object","properties":{"runtime_target":{"type":"object","properties":{"kind":{"type":"string","enum":["main_branch","environment","preview_branch"]},"target_environment_id":{"type":["string","null"],"format":"uuid"},"target_branch_id":{"type":["string","null"],"format":"uuid"}},"required":["kind","target_environment_id","target_branch_id"]},"resolved_environment":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]}},"required":["id","name"]},"resolved_branch":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"]},"resolved_deployment":{"type":["object","null"],"properties":{"id":{"type":"string"},"runtime_version":{"type":["string","null"]},"deployment_revision":{"type":["string","null"]},"last_deployed_at":{"type":["string","null"]}},"required":["id","runtime_version","deployment_revision","last_deployed_at"]},"resolved_managed_domain":{"type":["object","null"],"properties":{"domain":{"type":"string"},"health_url":{"type":["string","null"]}},"required":["domain","health_url"]},"resolved_invoke_mode":{"type":["string","null"],"enum":["dispatch_override","managed_domain",null]},"last_resolution_error":{"type":["object","null"],"properties":{"code":{"type":"string"},"retryable":{"type":"boolean"},"message":{"type":"string"}},"required":["code","retryable","message"]}},"required":["runtime_target","resolved_environment","resolved_branch","resolved_deployment","resolved_managed_domain","resolved_invoke_mode","last_resolution_error"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","project_id","installation_id","platform","name","agent_id","enabled","platform_team_id","platform_bot_id","workspace_name","respond_to","allowed_slack_channel_ids","status","welcome_message","error_message","max_response_tokens","runtime_target_kind","target_environment_id","target_branch_id","resolved_target","created_at","updated_at"]},"ChannelCheckResult":{"type":"object","properties":{"channel_id":{"type":"string","format":"uuid"},"slack_channel_id":{"type":"string"},"status":{"type":"string","enum":["delivered","failed"]},"message_id":{"type":["string","null"]},"failure_code":{"type":["string","null"],"enum":["not_in_channel","channel_not_found","needs_reauth","rate_limited","provider_error",null]},"retryable":{"type":"boolean"},"checked_at":{"type":"string"}},"required":["channel_id","slack_channel_id","status","message_id","failure_code","retryable","checked_at"]},"WebhookRun":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The webhook event id. Every stored event has one, including events filtered before execution; pass it as webhook_event_id to replayWebhookEvent."},"webhook_id":{"type":"string","format":"uuid","description":"The id of the webhook that received the event."},"project_id":{"type":"string","format":"uuid"},"conversation_id":{"type":["string","null"],"format":"uuid"},"message_id":{"type":["string","null"],"format":"uuid"},"run_id":{"type":["string","null"],"description":"Associated execution, or null when the event started none."},"canonical_run_id":{"type":["string","null"],"format":"uuid"},"latest_event_id":{"type":["integer","null"],"minimum":0},"status":{"type":"string","enum":["received","queued","running","completed","failed","cancelled","ignored"],"description":"Webhook event status: received, queued, running, completed, failed, cancelled or ignored. A linked agent run overlays running (also while it waits for a tool), completed, failed or cancelled."},"duplicate":{"type":"boolean"},"payload":{},"error_code":{"type":["string","null"]},"error_message":{"type":["string","null"]},"invoked_by":{"type":["string","null"]},"manual_invoked_by_user_id":{"type":["string","null"],"format":"uuid"},"received_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]}},"required":["id","webhook_id","project_id","conversation_id","message_id","run_id","canonical_run_id","latest_event_id","status","duplicate","error_code","error_message","invoked_by","manual_invoked_by_user_id","received_at","completed_at"]},"WebhookEventListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The webhook event id. Every stored event has one, including events filtered before execution; pass it as webhook_event_id to replayWebhookEvent."},"webhook_id":{"type":"string","format":"uuid","description":"The id of the webhook that received the event."},"project_id":{"type":"string","format":"uuid"},"conversation_id":{"type":["string","null"],"format":"uuid"},"message_id":{"type":["string","null"],"format":"uuid"},"run_id":{"type":["string","null"],"description":"Associated execution, or null when the event started none."},"canonical_run_id":{"type":["string","null"],"format":"uuid"},"latest_event_id":{"type":["integer","null"],"minimum":0},"status":{"type":"string","enum":["received","queued","running","completed","failed","cancelled","ignored"],"description":"Webhook event status: received, queued, running, completed, failed, cancelled or ignored. A linked agent run overlays running (also while it waits for a tool), completed, failed or cancelled."},"duplicate":{"type":"boolean"},"payload":{},"error_code":{"type":["string","null"]},"error_message":{"type":["string","null"]},"invoked_by":{"type":["string","null"]},"manual_invoked_by_user_id":{"type":["string","null"],"format":"uuid"},"received_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["id","webhook_id","project_id","conversation_id","message_id","run_id","canonical_run_id","latest_event_id","status","duplicate","error_code","error_message","invoked_by","manual_invoked_by_user_id","received_at","completed_at","created_at"]},"description":"The page of webhook events, newest first by default."},"page_info":{"allOf":[{"$ref":"#/components/schemas/PageInfo"},{"description":"Pass `next` as `cursor` for the next page; it is null on the last page."}]}},"required":["data","page_info"]},"PublicCatalogCapabilities":{"type":"object","properties":{"webResearch":{"type":"boolean","description":"Whether Studio default chat can enable live web research."},"streaming":{"type":"boolean","description":"Whether streaming responses are supported."},"tools":{"type":"boolean","description":"Whether tool calls are supported."},"vision":{"type":"boolean","description":"Whether image inputs are supported."},"thinking":{"type":"boolean","description":"Whether thinking/reasoning controls are supported."},"supported_parameters":{"type":"array","items":{"type":"string"},"description":"Supported request parameters, using OpenRouter names. Parameters not listed are removed or rejected. Parameters are listed only when support has been verified.","example":["max_tokens","temperature","top_p","tools","tool_choice"]},"reasoning":{"type":"boolean","description":"Whether the model reasons before answering."},"tool_call":{"type":"boolean","description":"Whether the model can call tools."},"temperature":{"type":"boolean","description":"Whether a caller-set temperature reaches the model."},"open_weights":{"type":"boolean","description":"Whether the model weights are publicly released."},"attachment":{"type":"boolean","description":"Whether file input is supported. Omitted if support has not been verified."},"structured_output":{"type":"boolean","description":"Whether schema-constrained output is supported. Omitted if support has not been verified."},"reasoning_mode":{"type":"string","description":"Supported reasoning control. Known values are `budget` and `adaptive`. Omitted if the model does not reason or support has not been verified. Clients must accept unknown values.","example":"budget"},"transport":{"type":"string","description":"OpenAI wire API the client must use. Known values: `chat-completions`, `responses`. Absent when unconstrained. Not a closed enum.","example":"chat-completions"},"reasoning_budget_tokens":{"type":"integer","exclusiveMinimum":0,"description":"Default thinking budget in tokens when the caller does not specify one. Omitted if no default is configured or the model does not accept a budget, including models without reasoning and models with adaptive thinking.","example":2048},"chat_completions_reasoning_with_function_tools":{"type":"boolean","description":"Whether `chat-completions` supports reasoning and function tools in the same request. If false, choose one. Omitted if support has not been verified.","example":false},"chat_completions_consecutive_system_messages":{"type":"boolean","description":"Whether `chat-completions` accepts consecutive system messages. If true, clients can send system instructions separately. Omitted if support has not been verified.","example":true},"modalities":{"type":"object","properties":{"input":{"type":"array","items":{"type":"string"},"description":"Input modalities.","example":["text","image"]}},"required":["input"],"description":"Supported input modalities. Output modalities are omitted because they have not been verified."},"limit":{"type":"object","properties":{"context":{"type":"integer","exclusiveMinimum":0,"description":"Context window in tokens: the provider's documented limit for the deployment Veryfront serves. Input plus requested output must fit within it. Absent while unevidenced.","example":1000000},"output":{"type":"integer","exclusiveMinimum":0,"description":"Maximum output tokens. Absent while unevidenced.","example":128000}},"description":"Known token ceilings. Each is absent while unevidenced; `limit` is absent while neither is known."}},"required":["webResearch","streaming","tools","vision","supported_parameters","reasoning","tool_call","temperature","open_weights","modalities"],"description":"Model capability flags"},"PublicCatalogPricing":{"type":["object","null"],"properties":{"inputEurPer1M":{"type":"number","minimum":0,"description":"Input-token price. EUR per 1M tokens."},"outputEurPer1M":{"type":"number","minimum":0,"description":"Output-token price. EUR per 1M tokens."},"cacheCreationInputEurPer1M":{"type":"number","minimum":0,"description":"Default-retention cache-write input-token price, when the provider bills it separately. EUR per 1M tokens."},"cacheCreation1hInputEurPer1M":{"type":"number","minimum":0,"description":"One-hour cache-write input-token price, when the provider bills it apart from the default cache write. EUR per 1M tokens."},"cacheReadInputEurPer1M":{"type":"number","minimum":0,"description":"Cache-read input-token price, when the provider bills it separately. EUR per 1M tokens."},"audioInputEurPer1M":{"type":"number","minimum":0,"description":"Audio input-token price, when the provider bills it separately. EUR per 1M tokens."},"audioOutputEurPer1M":{"type":"number","minimum":0,"description":"Audio output-token price, when the provider bills it separately. EUR per 1M tokens."},"audioCacheReadInputEurPer1M":{"type":"number","minimum":0,"description":"Audio cache-read token price, when the provider bills it separately. EUR per 1M tokens."}},"required":["inputEurPer1M","outputEurPer1M"],"description":"Customer price after markup. Excludes provider cost and the markup amount."},"PublicCatalogProviderPricing":{"type":["object","null"],"properties":{"inputEurPer1M":{"type":"number","minimum":0,"description":"Input-token price. EUR per 1M tokens."},"outputEurPer1M":{"type":"number","minimum":0,"description":"Output-token price. EUR per 1M tokens."},"cacheCreationInputEurPer1M":{"type":"number","minimum":0,"description":"Default-retention cache-write input-token price, when the provider bills it separately. EUR per 1M tokens."},"cacheCreation1hInputEurPer1M":{"type":"number","minimum":0,"description":"One-hour cache-write input-token price, when the provider bills it apart from the default cache write. EUR per 1M tokens."},"cacheReadInputEurPer1M":{"type":"number","minimum":0,"description":"Cache-read input-token price, when the provider bills it separately. EUR per 1M tokens."},"audioInputEurPer1M":{"type":"number","minimum":0,"description":"Audio input-token price, when the provider bills it separately. EUR per 1M tokens."},"audioOutputEurPer1M":{"type":"number","minimum":0,"description":"Audio output-token price, when the provider bills it separately. EUR per 1M tokens."},"audioCacheReadInputEurPer1M":{"type":"number","minimum":0,"description":"Audio cache-read token price, when the provider bills it separately. EUR per 1M tokens."},"tiers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stable provider pricing tier identifier","example":"long-context"},"label":{"type":"string","description":"Human-readable pricing tier label","example":"Long context"},"appliesTo":{"type":"string","description":"Condition where this provider pricing tier applies.","example":"Prompts over 200k tokens"},"inputEurPer1M":{"type":"number","minimum":0,"description":"Input-token price. EUR per 1M tokens."},"outputEurPer1M":{"type":"number","minimum":0,"description":"Output-token price. EUR per 1M tokens."},"cacheCreationInputEurPer1M":{"type":"number","minimum":0,"description":"Default-retention cache-write input-token price, when the provider bills it separately. EUR per 1M tokens."},"cacheCreation1hInputEurPer1M":{"type":"number","minimum":0,"description":"One-hour cache-write input-token price, when the provider bills it apart from the default cache write. EUR per 1M tokens."},"cacheReadInputEurPer1M":{"type":"number","minimum":0,"description":"Cache-read input-token price, when the provider bills it separately. EUR per 1M tokens."},"audioInputEurPer1M":{"type":"number","minimum":0,"description":"Audio input-token price, when the provider bills it separately. EUR per 1M tokens."},"audioOutputEurPer1M":{"type":"number","minimum":0,"description":"Audio output-token price, when the provider bills it separately. EUR per 1M tokens."},"audioCacheReadInputEurPer1M":{"type":"number","minimum":0,"description":"Audio cache-read token price, when the provider bills it separately. EUR per 1M tokens."}},"required":["id","label","appliesTo","inputEurPer1M","outputEurPer1M"]},"description":"Provider pricing tiers that apply instead of the base prices under a condition"}},"required":["inputEurPer1M","outputEurPer1M"],"description":"What the provider charges Veryfront (our upstream cost), before markup, in EUR. For a host that invoices in EUR these are that host's published EUR list, unconverted and unrounded."},"PublicCatalogDeployment":{"type":"object","properties":{"tier":{"type":"string","description":"Residency tier of this deployment. Known values: `qualified-sovereign`, `eu-owned`, `eu-resident`, `standard`.","example":"eu-resident"},"jurisdiction":{"type":"string","description":"Legal domicile (ISO 3166-1 alpha-2) of the company operating the inference, or `unknown` where unevidenced. This is the operator's home country, NOT where inference is processed: an EU-resident deployment run by a US company reads `US`. Read `processing` for the location.","example":"US"},"region":{"type":"string","description":"Where inference is PROCESSED — not where the cloud resource was created. `eu` is an EU boundary (the EU Data Zone or an EU multi-region, depending on the host), `europe-west1` / `europe-west4` are single EU member-state regions, `global` means the route is worldwide and no region may be claimed, and `unknown` means unevidenced.","example":"europe-west1"},"processing":{"type":"string","description":"Where inference is processed, normalised from `region` and `tier`. Known values: `eu` (inside a recorded EU boundary), `us` (in the United States), `worldwide` (in any region the operator runs), `unknown` (no processing region is recorded for this route). An open string: tolerate values you have not seen.","example":"eu"},"processing_label":{"type":"string","description":"The processing location in words, for display, e.g. `EU (EEA + Switzerland data zone)`, `EU (europe-west1, Belgium)`, `United States`, `Worldwide (any region)`, `Unknown (processing region not recorded)`. Display text only: branch on `processing`.","example":"EU (europe-west1, Belgium)"},"operator":{"type":"string","description":"Legal entity operating the inference service for this deployment, e.g. `Microsoft Corporation`, `Google LLC`, `OpenAI`, `Scaleway SAS`, or `unknown` where unrecorded.","example":"Google LLC"},"quantization":{"type":"string","description":"Weight precision served. Known values: `bf16`, `fp16`, `fp8`, `fp4`, `nvfp4`, `int4`, `unknown`.","example":"unknown"},"precisionSource":{"type":"string","description":"How `quantization` is evidenced. Known values: `contractual`, `published`, `reported`, `unknown`.","example":"unknown"},"certifications":{"type":"array","items":{"type":"string"},"description":"Certifications evidenced for this deployment. Empty when none is recorded."},"supportedProviderTools":{"type":"array","items":{"type":"string"},"description":"Provider-executed agent tools this deployment supports.","example":["web_search"]},"dataRetention":{"anyOf":[{"type":"string"},{"type":"object","properties":{"days":{"type":"integer","minimum":0}},"required":["days"]}],"description":"Prompt retention on this deployment. Known values: `zero`, `metadata-only`, `unknown`, or `{ \"days\": N }`.","example":"unknown"},"pricing":{"$ref":"#/components/schemas/PublicCatalogPricing"}},"required":["tier","jurisdiction","region","processing","processing_label","operator","quantization","precisionSource","certifications","supportedProviderTools","dataRetention","pricing"],"description":"A model deployment, including its location, terms, and pricing."},"PublicCatalogModel":{"type":"object","properties":{"id":{"type":"string","description":"Model identifier.","example":"claude-sonnet-4-6"},"modelId":{"type":"string","description":"Unified model ID (provider/model).","example":"anthropic/claude-sonnet-4-6"},"provider":{"type":"string","description":"Provider name.","example":"anthropic"},"providerLabel":{"type":"string","description":"Public provider display name.","example":"Anthropic"},"providerLogoKey":{"type":"string","description":"Public provider logo key.","example":"anthropic"},"name":{"type":"string","description":"Display name.","example":"Claude Sonnet"},"description":{"type":"string","description":"Short description.","example":"Most efficient for everyday tasks"},"aliases":{"type":"array","items":{"type":"string"},"description":"Accepted aliases for backward-compatible model selection.","example":["sonnet","anthropic/claude-sonnet-4-6"]},"supportedProviderTools":{"type":"array","items":{"type":"string"},"description":"Provider-executed agent tools supported on the deployment a request for this model is served from.","example":["web_search","web_fetch"]},"temperature":{"type":["object","null"],"properties":{"min":{"type":"number","minimum":0,"description":"Minimum supported temperature."},"max":{"type":"number","minimum":0,"description":"Maximum supported temperature."}},"required":["min","max"],"description":"Per-model temperature limits; null when the runtime fixes or omits temperature."},"capabilities":{"$ref":"#/components/schemas/PublicCatalogCapabilities"},"pricing":{"$ref":"#/components/schemas/PublicCatalogPricing"},"providerPricing":{"$ref":"#/components/schemas/PublicCatalogProviderPricing"},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/PublicCatalogDeployment"},"description":"Available deployments in routing preference order. Without a policy, requests use the first deployment."}},"required":["id","modelId","provider","providerLabel","providerLogoKey","name","aliases","supportedProviderTools","temperature","capabilities","pricing","providerPricing","deployments"],"description":"One publicly listed model"},"PublicModelCatalog":{"type":"object","properties":{"models":{"type":"array","items":{"$ref":"#/components/schemas/PublicCatalogModel"},"description":"Publicly listed AI models"},"providers":{"type":"array","items":{"type":"string"},"description":"Provider names represented in the catalog"},"defaultModelId":{"type":"string","description":"Default unified model ID recommended by the API","example":"mistral/mistral-small-2503"},"fx":{"type":"object","properties":{"base":{"type":"string","description":"The currency one unit of which `rate` prices","example":"EUR"},"quote":{"type":"string","description":"The currency `rate` is expressed in","example":"USD"},"rate":{"type":"number","exclusiveMinimum":0,"description":"1 `base` = `rate` `quote`","example":1.1403},"source":{"type":"string","description":"Where the rate is published","example":"ECB euro foreign exchange reference rate"},"date":{"type":"string","description":"The reference date of the rate (YYYY-MM-DD)","example":"2026-09-25"}},"required":["base","quote","rate","source","date"],"description":"1 `base` = `rate` `quote`. EUR prices converted from USD are the USD price divided by `rate`, rounded to 6 decimal places. For a host that invoices in EUR the EUR prices are that host's published EUR list, unconverted and unrounded."}},"required":["models","providers","defaultModelId","fx"],"description":"Public model catalog with customer pricing."},"AgentCardList":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"],"description":"Public agent summary. Saved system instructions are in the agent source document (get_agent_source)."},"provider":{"type":"object","properties":{"organization":{"type":"string"},"url":{"type":"string"}},"required":["organization","url"]},"version":{"type":"string"},"capabilities":{"type":"object","properties":{"streaming":{"type":"boolean"},"push_notifications":{"type":"boolean"},"extensions":{"type":"array","items":{"type":"string"}}},"required":["streaming","push_notifications","extensions"]},"default_input_modes":{"type":"array","items":{"type":"string"}},"default_output_modes":{"type":"array","items":{"type":"string"}},"tools":{"type":"array","items":{"type":"string"},"description":"Source-selected tools summarized by the card as exact tool IDs. An empty array does not establish that tools are disabled. Read saved configuration from the agent source document and source-selected tools and integration readiness from agent capabilities; neither verifies execution grants."},"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"examples":{"type":"array","items":{"type":"string"}}},"required":["id","name"]}},"suggestions":{"type":"array","items":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"title":{"type":"string","minLength":1},"prompt":{"type":"string","minLength":1}},"required":["title","prompt"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["source_project_agent","installed_project_agent"]},"can_run":{"type":"boolean","description":"Whether the card supports invocation. When false, inspect runtime_readiness.status and runtime_readiness.reason before starting a run. True does not prove live runtime readiness, model availability, or execution authorization. These are checked when a run starts."},"source_type":{"type":"string","enum":["project","catalog_install"]},"installed_access":{"type":"object","properties":{"grant_id":{"type":"string","format":"uuid"},"relation":{"type":"string","enum":["owner","admin","editor","viewer"]},"service_account_id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"status":{"type":"string"}},"required":["grant_id","relation","service_account_id","project_id","status"]},"runtime_readiness":{"type":"object","properties":{"status":{"type":"string","enum":["ready","offline","not_applicable","unknown"]},"reason":{"type":["string","null"]},"runtime_target_kind":{"type":["string","null"],"enum":["registered_push_service","pull_worker",null]},"runtime_service_key":{"type":["string","null"]}},"required":["status","reason","runtime_target_kind","runtime_service_key"],"description":"Readiness of a registered push or pull runtime service, when one applies. For a source agent, not_applicable means this service check does not apply; it does not mean the agent cannot run. This field does not verify model availability or execution access."},"source_path":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]},"avatar_url":{"type":["string","null"],"description":"This agent's avatar: an http(s) URL, or a root-relative path served from the project. Null when no custom avatar has been set."},"model":{"type":["string","null"],"description":"Model identifier exposed by the agent card. Null does not mean a model is required or identify the model a run will use. Model selection and availability are checked at run admission."},"url":{"type":"string","description":"URL of the agent."}},"required":["id","name","description","provider","version","capabilities","default_input_modes","default_output_modes","tools","skills","kind","can_run","source_type","source_path","edit_mode","model","url"]}},"diagnostics":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["source_file_diagnostic","source_agent_discovery_error","source_trigger_discovery_error"]},"source_kind":{"type":"string","enum":["agent","prompt","tool","task","workflow","resource","skill","eval","schedule","webhook"]},"source_path":{"type":"string","minLength":1},"source_id":{"type":"string","minLength":1},"code":{"type":"string","enum":["parse_error","invalid_definition","dynamic_definition","duplicate_source_id","unsupported_target","manual_conflict"]},"message":{"type":"string","minLength":1},"details":{"type":"object","additionalProperties":{}}},"required":["kind","source_kind","source_path","code","message"]}}},"required":["data"]},"AgentSource":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"model":{"type":["string","null"],"description":"Model identifier recovered from authored source. Null means no literal identifier was recovered; an omitted model is valid. The run selects and checks its model at admission, so null is not a missing-configuration error or a verified runtime default."},"system_prompt":{"type":["string","null"]},"thinking":{"type":"object","properties":{"enabled":{"type":"boolean"},"budget_tokens":{"type":"number","exclusiveMinimum":0}},"required":["enabled"],"additionalProperties":false},"temperature":{"type":["number","null"],"minimum":0,"maximum":2},"max_steps":{"type":["integer","null"],"exclusiveMinimum":0},"allowed_models":{"type":"array","items":{"type":"string"},"description":"Agent-level allowlist for request model overrides. Empty means no restriction by this allowlist; project and run model policies still apply. This does not identify the resolved runtime model."},"skill_ids":{"type":"array","items":{"type":"string"},"description":"Legacy source-view skill IDs. A read with skill_resolution can include source-catalog matches; a write response can echo only authored IDs. An empty array does not prove that no skills are available, and these IDs do not verify runtime loading. Use skill_selection and skill_resolution for provenance."},"skill_selection":{"type":"object","properties":{"kind":{"type":"string","enum":["omitted","explicit"]},"skill_ids":{"type":"array","items":{"type":"string"},"description":"Explicit skill IDs when kind is explicit. When kind is omitted, a read lists the owner-visible source-catalog matches (legacy projection) and a write response can echo an empty list. Use skill_resolution for provenance; these IDs do not verify runtime loading."}},"required":["kind","skill_ids"],"description":"Skill selection. kind is the authored policy: omitted selects all owner-visible skills. Use skill_resolution for resolved source-catalog matches and their evidence scope."},"skill_resolution":{"type":"object","properties":{"policy":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["all-visible"]},"source":{"type":"string","enum":["omitted","true"]}},"required":["kind","source"]},{"type":"object","properties":{"kind":{"type":"string","enum":["none"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["allowlist"]},"entries":{"type":"array","items":{"type":"string"}}},"required":["kind","entries"]},{"type":"object","properties":{"kind":{"type":"string","enum":["rules"]},"entries":{"type":"array","items":{"type":"object","properties":{"pattern":{"type":"string"},"allow":{"type":"boolean"}},"required":["pattern","allow"]}}},"required":["kind","entries"]}]},"skill_ids":{"type":"array","items":{"type":"string"}},"source_paths":{"type":"object","additionalProperties":{"type":"string"}},"unresolved_entry_indexes":{"type":"array","items":{"type":"integer","minimum":0}},"catalog_status":{"type":"string","enum":["complete","partial"]},"evidence_scope":{"type":"string","enum":["source_catalog"]}},"required":["policy","skill_ids","source_paths","unresolved_entry_indexes","catalog_status","evidence_scope"],"description":"Skill selector policy and owner-visible source catalog matches. Partial catalogs cannot establish that unreturned skills are absent. This does not verify run execution access."},"skills":{"anyOf":[{"type":"boolean"},{"type":"string","minLength":1,"maxLength":128},{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":500},{"type":"object","additionalProperties":{"type":"boolean"}}]},"all_tools_enabled":{"type":"boolean","description":"Whether the authored selector allows all tools. False can still select individual tools. Read the raw tools selector and capability resolution for the selected set."},"tool_ids":{"type":"array","items":{"type":"string"},"description":"Source-recovered explicit tool IDs. Empty when all_tools_enabled is true, when tools is false (authored deny-all), or when no explicit IDs were recovered, so an empty array alone does not mean callable host tools are disabled. This source view does not verify execution grants."},"tools":{"anyOf":[{"type":"boolean"},{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":500},{"type":"object","additionalProperties":{"type":"boolean"}}],"description":"Callable host-tool selector. Use false to disable all host tools, including skill and delegation tools. An empty array or map selects no project tools but preserves legacy runtime essentials. Provider-native tools use provider_tool_ids."},"tool_loading":{"type":"string","enum":["eager","deferred"]},"tool_result_context":{"anyOf":[{"type":"boolean"},{"type":"object","properties":{"max_inline_bytes":{"type":"integer","exclusiveMinimum":0,"maximum":1048576},"preview_bytes":{"type":"integer","exclusiveMinimum":0,"maximum":1048576},"max_section_bytes":{"type":"integer","minimum":4,"maximum":1048576},"max_stored_results":{"type":"integer","exclusiveMinimum":0,"maximum":1024}},"additionalProperties":false}]},"provider_tool_ids":{"type":"array","items":{"type":"string"}},"knowledge":{"anyOf":[{"type":"boolean"},{"type":"string","minLength":1,"maxLength":4096},{"type":"array","items":{"type":"string","minLength":1,"maxLength":4096},"maxItems":1024},{"type":"object","additionalProperties":{"type":"boolean"}}]},"suggestions":{"type":"array","items":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"title":{"type":"string","minLength":1},"prompt":{"type":"string","minLength":1}},"required":["title","prompt"],"additionalProperties":false}]}},"avatar":{"type":["object","null"],"properties":{"seed":{"type":"string","minLength":1,"maxLength":128},"archetype":{"type":"string","enum":["upright","slumped","alert","profile","leaning","crouched","tall","spread","happy","sad","angry","surprised","sleepy","curious"]},"texture":{"type":"string","pattern":"^(?:[0-9]|none)$"},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"shape":{"type":"string","enum":["snircle","circle","square"]},"matrix":{"type":"string","pattern":"^[012]{16}$"}}},"avatar_url":{"type":["string","null"],"description":"This agent's avatar: an http(s) URL, or a root-relative path served from the project. Null when no custom avatar has been set."},"security_enabled":{"type":["boolean","null"],"description":"Whether the agent default security guardrails are enabled."},"source_path":{"type":"string"},"source":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]},"source_only_reasons":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","model","system_prompt","temperature","max_steps","allowed_models","skill_ids","skill_selection","all_tools_enabled","tool_ids","provider_tool_ids","security_enabled","source_path","source","edit_mode","source_only_reasons"]},"AgentProblem":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","properties":{"edit_mode":{"type":"string","enum":["structured","source_only"],"description":"Edit mode of the agent definition, on a source_only_conflict."},"source_only_reasons":{"type":"array","items":{"type":"string"},"description":"Why the agent can only be edited as raw source, on a source_only_conflict."},"source_path":{"type":"string","description":"Source file of the agent definition, on a source_only_conflict."}}}]},"PrimitiveCrudProblem":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","properties":{"edit_mode":{"type":"string","enum":["structured","source_only"],"description":"Edit mode of the definition, on a source_only_conflict."},"source_only_reasons":{"type":"array","items":{"type":"string"},"description":"Why the definition can only be edited as raw source, on a source_only_conflict."},"source_path":{"type":"string","description":"Source file of the definition, on a source_only_conflict."}}}]},"SkillProblem":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","properties":{"edit_mode":{"type":"string","enum":["structured","source_only"],"description":"Edit mode of the skill definition, on a source_only_conflict."},"source_only_reasons":{"type":"array","items":{"type":"string"},"description":"Why the skill can only be edited as raw source, on a source_only_conflict."},"source_path":{"type":"string","description":"Source file of the skill definition, on a source_only_conflict."}}}]},"ProjectSkillDocument":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"source_path":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]},"allowed_tools":{"type":"array","items":{"type":"string"}},"owner_agent_id":{"type":"string"},"short_name":{"type":"string"},"instructions":{"type":"string","description":"The Markdown body of `SKILL.md`, excluding frontmatter."},"sections":{"type":"object","additionalProperties":{"type":"string"},"description":"Read-only sections derived from `## ` headings in the body. Empty if the body cannot be split into sections. Use `instructions` for the complete, authoritative body; this field cannot be updated."},"source":{"type":"string"},"source_only_reasons":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","source_path","edit_mode","instructions","sections","source","source_only_reasons"]},"ToolProblem":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","properties":{"edit_mode":{"type":"string","enum":["structured","source_only"],"description":"Edit mode of the tool definition, on a source_only_conflict."},"source_only_reasons":{"type":"array","items":{"type":"string"},"description":"Why the tool can only be edited as raw source, on a source_only_conflict."},"source_path":{"type":"string","description":"Source file of the tool definition, on a source_only_conflict."}}}]},"TaskProblem":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","properties":{"edit_mode":{"type":"string","enum":["structured","source_only"],"description":"Edit mode of the task definition, on a source_only_conflict."},"source_only_reasons":{"type":"array","items":{"type":"string"},"description":"Why the task can only be edited as raw source, on a source_only_conflict."},"source_path":{"type":"string","description":"Source file of the task definition, on a source_only_conflict."}}}]},"AutomationProblem":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","properties":{"reason":{"type":"string","enum":["already_exists","source_only"],"description":"On a conflict: already_exists when the identifier is taken, source_only when the definition can only be edited as source."},"edit_mode":{"type":"string","enum":["structured","source_only"],"description":"Edit mode of the definition, when reason is source_only."},"source_only_reasons":{"type":"array","items":{"type":"string"},"description":"Why the definition can only be edited as source, when reason is source_only."},"source_path":{"type":"string","description":"Source file of the definition, when reason is source_only."}}}]},"EvalSourceDocument":{"type":"object","properties":{"kind":{"type":"string","enum":["eval-source-document"]},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"target":{"type":"string"},"source":{"type":"object","properties":{"content":{"type":"string"}}},"dataset":{"type":"object","properties":{"kind":{"type":"string","enum":["inline","json","jsonl","dynamic"]},"path":{"type":"string"},"examples":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"input":{},"reference":{},"metadata":{"type":"object","additionalProperties":{}}},"required":["id"]}},"editable":{"type":"boolean"},"dynamic":{"type":"boolean"}},"required":["kind","editable","dynamic"]},"metrics":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"family":{"type":"string","enum":["answer","agent","ops","judge","knowledge","check"]},"severity":{"type":"string","enum":["gate","soft","budget"]},"threshold":{"type":"object","properties":{"min":{"type":"number"},"max":{"type":"number"}}},"config":{"type":"object","additionalProperties":{}},"editable":{"type":"boolean"},"dynamic":{"type":"boolean"}},"required":["name","family","severity","editable","dynamic"]}},"repetitions":{"type":"integer","exclusiveMinimum":0},"tags":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object","additionalProperties":{}},"capabilities":{"type":"array","items":{"type":"string","enum":["project.evals.read","project.evals.write","project.evals.run"]}},"target_kind":{"type":"string","enum":["agent"],"description":"What the eval runs against: always agent."},"source_path":{"type":"string","description":"Source file path where the eval definition lives."},"export_name":{"type":"string","description":"Name of the export that declares the eval in its source file."},"editable_fields":{"type":"array","items":{"type":"string","enum":["name","description","target","dataset","repetitions","tags","metadata","metrics","check"]},"description":"Fields that update_eval can change."},"dynamic_fields":{"type":"array","items":{"type":"string","enum":["name","description","target","dataset","repetitions","tags","metadata","metrics","check"]},"description":"Fields computed in source, which update_eval cannot change."},"edit_mode":{"type":"string","enum":["structured","source_only"],"description":"Editing mode of the eval. Returned with a source document, not in the list."},"source_only_reasons":{"type":"array","items":{"type":"string"},"description":"Why the eval can only be edited as source. Returned with a source document, not in the list."}},"required":["kind","id","name","target","source","dataset","metrics","repetitions","tags","metadata","capabilities","target_kind","source_path","export_name","editable_fields","dynamic_fields"]},"WorkflowProblem":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","properties":{"edit_mode":{"type":"string","enum":["structured","source_only"],"description":"Edit mode of the workflow definition, on a source_only_conflict."},"source_only_reasons":{"type":"array","items":{"type":"string"},"description":"Why the workflow can only be edited as raw source, on a source_only_conflict."},"source_path":{"type":"string","description":"Source file of the workflow definition, on a source_only_conflict."}}}]},"HistoricalRunTarget":{"type":"object","properties":{"type":{"type":"string","enum":["agent","task","workflow","eval"],"description":"Execution definition type."},"agent_kind":{"type":"string","enum":["project"],"description":"Server-recorded project agent identity; absence retains legacy identity semantics."},"name":{"type":"string","minLength":1,"maxLength":256,"description":"Display name captured at admission when available."},"id":{"type":["string","null"],"minLength":1,"maxLength":512,"pattern":"^\\S+$","description":"Definition ID; null when unavailable on a historical run."}},"required":["type","id"],"additionalProperties":false,"description":"Execution definition; its ID may be null only on historical runs.","x-ref-description":"Execution definition; its ID may be null only on historical runs."},"RunFailure":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":128,"description":"Stable failure code."},"message":{"type":"string","minLength":1,"maxLength":4000,"description":"Human-readable failure message."},"details":{"type":"object","additionalProperties":{},"description":"Additional failure details."}},"required":["code","message"],"additionalProperties":false,"description":"Failure details, present only when the run failed.","x-ref-description":"Failure details, present only when the run failed."},"RunLabels":{"type":"object","additionalProperties":{"type":"string","maxLength":256},"description":"Labels used to organize runs.","maxProperties":50,"propertyNames":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_.-]+$"},"x-ref-description":"Labels used to organize runs."},"RunRuntime":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["main_branch"],"description":"Runtime selection kind."}},"required":["type"],"additionalProperties":false,"description":"Selected main-branch deployment."},{"type":"object","properties":{"type":{"type":"string","enum":["environment"],"description":"Runtime selection kind."},"id":{"type":"string","format":"uuid","description":"Environment UUID."}},"required":["type","id"],"additionalProperties":false,"description":"Selected environment."},{"type":"object","properties":{"type":{"type":"string","enum":["preview_branch"],"description":"Runtime selection kind."},"id":{"type":"string","format":"uuid","description":"Preview branch UUID."}},"required":["type","id"],"additionalProperties":false,"description":"Selected preview branch."},{"type":"object","properties":{"type":{"type":"string","enum":["registered"],"description":"Runtime selection kind."},"id":{"type":"string","minLength":1,"maxLength":128,"description":"Registered runtime identifier."}},"required":["type","id"],"additionalProperties":false,"description":"Selected registered runtime."}],"description":"Resolved logical runtime selection; main_branch identifies the selected main-branch deployment, not a worker process.","x-ref-description":"Resolved logical runtime selection; main_branch identifies the selected main-branch deployment, not a worker process."},"RunWait":{"oneOf":[{"type":"object","properties":{"resume_at":{"type":"string","format":"date-time","description":"Scheduled automatic resume time."},"reason":{"type":"string","enum":["manual_pause"],"description":"Condition required to resume the run."}},"required":["reason"],"description":"Waiting for manual resumption."},{"type":"object","properties":{"resume_at":{"type":"string","format":"date-time","description":"Scheduled automatic resume time."},"reason":{"type":"string","enum":["tool_result"],"description":"Condition required to resume the run."},"tool_call_id":{"type":"string","minLength":1,"maxLength":128,"description":"Tool call awaiting a result."}},"required":["reason","tool_call_id"],"description":"Waiting for a tool result."},{"type":"object","properties":{"resume_at":{"type":"string","format":"date-time","description":"Scheduled automatic resume time."},"reason":{"type":"string","enum":["integration_connected"],"description":"Condition required to resume the run."},"integration":{"type":"string","minLength":1,"maxLength":128,"description":"Integration awaiting connection."}},"required":["reason","integration"],"description":"Waiting for an integration connection."},{"type":"object","properties":{"resume_at":{"type":"string","format":"date-time","description":"Scheduled automatic resume time."},"reason":{"type":"string","enum":["approval"],"description":"Condition required to resume the run."},"wait_id":{"type":"string","minLength":1,"maxLength":128,"description":"Durable wait identifier."},"node_ids":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"minItems":1,"description":"Workflow nodes awaiting approval."}},"required":["reason","wait_id","node_ids"],"description":"Waiting for workflow approval."},{"type":"object","properties":{"resume_at":{"type":"string","format":"date-time","description":"Scheduled automatic resume time."},"reason":{"type":"string","enum":["event"],"description":"Condition required to resume the run."},"wait_id":{"type":"string","minLength":1,"maxLength":128,"description":"Durable wait identifier."},"name":{"type":"string","minLength":1,"maxLength":128,"description":"Event required to resume."}},"required":["reason","wait_id","name"],"description":"Waiting for a named event."},{"type":"object","properties":{"resume_at":{"type":"string","format":"date-time","description":"Scheduled automatic resume time."},"reason":{"type":"string","enum":["input_request"],"description":"Condition required to resume the run."},"input_request_ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"description":"Input requests awaiting responses."}},"required":["reason","input_request_ids"],"description":"Waiting for input responses."},{"type":"object","properties":{"resume_at":{"type":"string","format":"date-time","description":"Scheduled automatic resume time."},"reason":{"type":"string","enum":["child_run"],"description":"Condition required to resume the run."},"dependencies":{"type":"array","items":{"type":"object","properties":{"run_id":{"type":"string","format":"uuid","description":"Canonical UUID of the child run."},"correlation":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["tool_call"],"description":"Child invocation kind."},"id":{"type":"string","minLength":1,"maxLength":128,"description":"Tool call identifier."}},"required":["type","id"],"additionalProperties":false,"description":"Child started by a tool call."},{"type":"object","properties":{"type":{"type":"string","enum":["workflow_node"],"description":"Child invocation kind."},"id":{"type":"string","minLength":1,"maxLength":128,"description":"Workflow node identifier."}},"required":["type","id"],"additionalProperties":false,"description":"Child started by a workflow node."}]}},"required":["run_id","correlation"],"additionalProperties":false},"minItems":1,"description":"Child runs that must finish."}},"required":["reason","dependencies"],"description":"Waiting for child runs."},{"type":"object","properties":{"resume_at":{"type":"string","format":"date-time","description":"Scheduled automatic resume time."},"reason":{"type":"string","enum":["timer"],"description":"Condition required to resume the run."}},"required":["resume_at","reason"],"description":"Waiting until the scheduled resume time."}],"description":"The current durable wait, with only the fields required to satisfy that wait."},"RunPause":{"type":"object","properties":{"requested_at":{"type":"string","format":"date-time","description":"Time the pause was requested."}},"required":["requested_at"],"additionalProperties":false,"description":"When a pause was requested; control.waiting confirms when execution is paused."},"RunCancellation":{"type":"object","properties":{"requested_at":{"type":"string","format":"date-time","description":"Time cancellation was requested."},"stopped_at":{"type":["string","null"],"format":"date-time","description":"Time the runtime confirmed its stop; null until confirmed."}},"required":["requested_at","stopped_at"]},"RunTrigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["user"]},"id":{"type":"string","format":"uuid"}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["api_key"]},"id":{"type":"string","minLength":1,"maxLength":128},"name":{"type":"string","description":"Display name of the API key, revoked keys included; omitted when unknown."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["service_account"]},"id":{"type":"string","minLength":1,"maxLength":128}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["system"]},"id":{"type":"string","minLength":1,"maxLength":128}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["schedule"]},"id":{"type":"string","format":"uuid"}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]},"id":{"type":"string","minLength":1,"maxLength":128}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["agent"]},"id":{"type":"string","minLength":1,"maxLength":512,"pattern":"^\\S+$"},"tool_call_id":{"type":"string","minLength":1,"maxLength":128}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["task"]},"id":{"type":"string","minLength":1,"maxLength":512,"pattern":"^\\S+$"}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["workflow"]},"id":{"type":"string","minLength":1,"maxLength":512,"pattern":"^\\S+$"},"node_id":{"type":"string","minLength":1,"maxLength":128}},"required":["type","id"],"additionalProperties":false}],"description":"How execution was initiated.","x-ref-description":"How execution was initiated."},"TokenUsage":{"type":"object","properties":{"input":{"type":["integer","null"],"minimum":0,"description":"Input tokens excluding cache reads and writes.","format":"int64"},"output":{"type":["integer","null"],"minimum":0,"description":"Output tokens including reasoning.","format":"int64"},"cache":{"type":"object","properties":{"read":{"type":["integer","null"],"minimum":0,"description":"Tokens read from the provider cache.","format":"int64"},"write":{"type":["integer","null"],"minimum":0,"description":"Tokens written to the provider cache.","format":"int64"}},"required":["read","write"]},"reasoning":{"type":["integer","null"],"minimum":0,"description":"Reasoning tokens included in output.","format":"int64"},"total":{"type":["integer","null"],"minimum":0,"description":"Sum of input, output, cache-read and cache-write tokens.","format":"int64"}},"required":["input","output","cache","total"],"description":"Input excludes cache reads/writes; output includes reasoning. Total is input + output + cache.read + cache.write. Null means unknown, never zero."},"Cost":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR"],"description":"Currency of reference usage value and provider costs."},"status":{"type":"string","enum":["estimated","posted","unavailable"],"description":"Whether charges are estimated, posted or unavailable."},"provider":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d{1,8})?$","description":"Recorded provider USD cost converted to EUR at the catalog reference rate; null when unknown."},"platform":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d{1,8})?$","description":"Reference usage value minus estimated provider cost; null when either amount is unknown."},"total":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d{1,8})?$","description":"Billed credits valued at EUR 0.10 per credit, independent of subscription or purchase discounts."},"credits":{"type":["string","null"],"pattern":"^-?\\d+(\\.\\d{1,8})?$","description":"Billed credit units."}},"required":["currency","status","provider","platform","total","credits"],"description":"Estimated EUR usage value before tax: total values billed credits at EUR 0.10 each; provider converts recorded USD cost at the catalog reference rate; platform is total minus provider and can be negative. These amounts are visible to authorized run readers and do not represent invoice charges or actual purchase prices. Descendants sum the same per-run amounts. Credits are exact billed units. Signed decimal strings have at most eight fractional digits. Unknown provider costs leave provider and platform null. Status is independent of token capture; unavailable requires all amounts null. Posted amounts come from the billing ledger and may change through later adjustments.","allOf":[{"if":{"properties":{"status":{"enum":["unavailable"]}},"required":["status"]},"then":{"properties":{"provider":{"type":"null"},"platform":{"type":"null"},"total":{"type":"null"},"credits":{"type":"null"}}},"else":{}}]},"Usage":{"type":"object","properties":{"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded model funding; omitted when any call has unknown funding."},"tokens":{"$ref":"#/components/schemas/TokenUsage"},"cost":{"$ref":"#/components/schemas/Cost"},"model_calls":{"type":["integer","null"],"minimum":0,"description":"Billed provider call count.","format":"int64"},"capture_status":{"type":"string","enum":["complete","partial","missing"],"description":"Token capture coverage."}},"required":["tokens","cost","capture_status"],"description":"Usage when available; unknown measurements are null.","x-ref-description":"Usage when available; unknown measurements are null."},"RunArtifact":{"type":"object","properties":{"artifact_id":{"type":"string","minLength":1,"maxLength":128,"description":"Immutable artifact identifier."},"type":{"type":"string","minLength":1,"description":"Artifact kind."},"media_type":{"type":"string","minLength":1,"description":"File media type."},"size_bytes":{"type":"integer","minimum":0,"description":"File size in bytes."},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 digest of the file."},"href":{"type":"string","format":"uri","description":"Authorized artifact URL."}},"required":["artifact_id","type","media_type","size_bytes","sha256","href"],"description":"An immutable file reference authorized through the run’s project and conversation permissions."},"Run":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique run UUID."},"run_id":{"type":"string","minLength":1,"description":"Public run ID that run events (metadata.run_id) and runtime tools name. Equals id for runs the server names; older runs keep their run_ ID."},"status":{"type":"string","enum":["pending","running","waiting","completed","failed","cancelled"],"description":"Current execution state."},"project_id":{"type":"string","format":"uuid","description":"Project containing the run."},"target":{"$ref":"#/components/schemas/HistoricalRunTarget"},"input":{"description":"Business input supplied when the run was created."},"output":{"description":"Final business output; null until successful finalization."},"error":{"$ref":"#/components/schemas/RunFailure"},"title":{"type":"string","description":"Display title, omitted when unset."},"labels":{"$ref":"#/components/schemas/RunLabels"},"parent_run_id":{"type":"string","format":"uuid","description":"Immediate parent run ID, present on child runs."},"root_run_id":{"type":"string","format":"uuid","description":"Top-level ancestor run ID, present on child runs."},"created_at":{"type":"string","format":"date-time","description":"When the run was accepted."},"updated_at":{"type":"string","format":"date-time","description":"When the resource last changed, including usage updates."},"started_at":{"type":"string","format":"date-time","description":"When the first execution attempt started, omitted before execution."},"finished_at":{"type":"string","format":"date-time","description":"When the run completed, failed or was cancelled."},"config":{"type":"object","additionalProperties":{"description":"A JSON value."},"description":"Definition-specific execution configuration."},"execution":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Current or final execution assignment identity; absent before assignment or when unavailable."},"runtime_instance":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Actual executing process identity."},"name":{"type":"string","description":"Process name captured for this execution."},"mode":{"type":"string","enum":["service","worker"]}},"required":["id","mode"],"description":"Actual process attribution; additive compatibility bridge while runtime retains logical selection."},"runtime":{"$ref":"#/components/schemas/RunRuntime"},"timeout_seconds":{"type":"integer","exclusiveMinimum":0,"description":"Deadline for the whole run in seconds, measured from its first start and including retries."},"retry_limit":{"type":"integer","minimum":0,"description":"Maximum retries after the first attempt; only retryable failures are retried."},"attempt":{"type":"integer","minimum":1,"description":"Current or last execution attempt, starting at 1; absent before execution."},"exit_code":{"type":["integer","null"],"description":"Runtime process exit code, or null when no exit code was recorded."},"duration_ms":{"type":["integer","null"],"minimum":0,"description":"Elapsed time from first start to finish, including waits and retries; null when not finished.","format":"int64"},"tool_error_count":{"type":"integer","minimum":0,"description":"Recorded failed tool invocations during this run."},"logs":{"type":"string","description":"Captured runtime text logs, when available."},"start_mode":{"type":"string","description":"Recorded execution start mode, when available."},"worker":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Agent worker ID."},"name":{"type":"string","description":"Worker display name, omitted when the worker registered without one."},"worker_key":{"type":"string","description":"Key the worker registered under, unique per project and kind; omitted when the worker is gone."},"implementation_kind":{"type":"string","description":"Agent implementation the worker runs, such as codex; omitted when the worker is gone."},"claimed_at":{"type":"string","format":"date-time","description":"When the worker claimed the run."}},"required":["id","claimed_at"],"description":"Agent worker that claimed and executed the run; present only on worker-executed runs."}},"description":"Resolved execution settings and diagnostics."},"control":{"type":"object","properties":{"waiting":{"$ref":"#/components/schemas/RunWait"},"pause":{"$ref":"#/components/schemas/RunPause"},"cancellation":{"$ref":"#/components/schemas/RunCancellation"}},"description":"Pending control requests and the current wait."},"task_id":{"type":"string","minLength":1,"maxLength":200,"description":"Orchestration task ID, distinct from the execution definition."},"conversation_id":{"type":"string","format":"uuid","description":"Conversation containing the run."},"input_message_id":{"type":"string","format":"uuid","description":"Conversation message that supplied the input."},"output_message_id":{"type":"string","format":"uuid","description":"Conversation message containing the result."},"batch_id":{"type":"string","format":"uuid","description":"Batch containing the run."},"trigger":{"$ref":"#/components/schemas/RunTrigger"},"usage":{"$ref":"#/components/schemas/Usage"},"descendants":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"description":"Total descendants at every depth."},"active":{"type":"integer","minimum":0,"description":"Descendants that are pending, running or waiting."},"has_failures":{"type":"boolean","description":"Whether any descendant has failed."},"usage":{"allOf":[{"$ref":"#/components/schemas/Usage"},{"description":"Aggregate usage of every descendant, excluding this run.","x-ref-description":"Aggregate usage of every descendant, excluding this run."}]}},"required":["total","active","has_failures"],"description":"Counts and usage across all descendant runs, excluding this run."},"artifacts":{"type":"array","items":{"$ref":"#/components/schemas/RunArtifact"},"description":"Files produced by the run."},"schemas":{"type":"object","properties":{"input":{"type":["object","null"],"properties":{"schema":{"description":"JSON Schema captured for this run; object schemas and boolean schemas are supported.","anyOf":[{"type":"boolean"},{"type":"object","additionalProperties":{"description":"A JSON value."}}]},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 digest of the pinned schema."}},"required":["schema","sha256"]},"output":{"type":["object","null"],"properties":{"schema":{"description":"JSON Schema captured for this run; object schemas and boolean schemas are supported.","anyOf":[{"type":"boolean"},{"type":"object","additionalProperties":{"description":"A JSON value."}}]},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 digest of the pinned schema."}},"required":["schema","sha256"]}},"required":["input","output"],"description":"Pinned schemas for business input and output; null means no declared schema."},"metadata":{"type":"object","additionalProperties":{"description":"A JSON value."},"description":"Additional resource metadata."}},"required":["id","run_id","status","project_id","target","input","output","created_at","updated_at"],"description":"One execution resource returned by reads, creation, updates, and lifecycle actions. Omit irrelevant fields and empty groups. Errors appear only on failure; parent/root IDs only on child runs; timestamps appear when reached. Output is null until successful finalization.","allOf":[{"if":{"properties":{"status":{"enum":["failed"]}},"required":["status"]},"then":{"required":["error"]},"else":{"not":{"required":["error"]}}},{"if":{"properties":{"status":{"enum":["completed","failed","cancelled"]}},"required":["status"]},"then":{"required":["finished_at"]},"else":{"not":{"required":["finished_at"]}}},{"if":{"properties":{"status":{"enum":["pending","running","waiting","failed","cancelled"]}},"required":["status"]},"then":{"properties":{"output":{"type":"null"}}},"else":{}},{"if":{"properties":{"status":{"enum":["waiting"]}},"required":["status"]},"then":{"required":["control"],"properties":{"control":{"required":["waiting"]}}},"else":{"properties":{"control":{"not":{"required":["waiting"]}}}}},{"if":{"properties":{"control":{"required":["pause"]}},"required":["control"]},"then":{"properties":{"status":{"enum":["pending","running","waiting"]}}}},{"if":{"required":["trigger"],"properties":{"trigger":{"properties":{"type":{"enum":["agent","task","workflow"]}},"required":["type"]}}},"then":{"required":["parent_run_id","root_run_id"]}},{"if":{"properties":{"status":{"const":"completed"}},"required":["status"]},"then":{"properties":{"descendants":{"properties":{"active":{"const":0}}}}}}],"dependentRequired":{"parent_run_id":["root_run_id"],"root_run_id":["parent_run_id"]}},"RunAnalytics":{"type":"object","properties":{"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["account"]},"account_id":{"type":"string","format":"uuid"},"project_id":{"type":["string","null"],"format":"uuid"}},"required":["kind","account_id","project_id"]},{"type":"object","properties":{"kind":{"type":"string","enum":["user"]},"user_id":{"type":"string","format":"uuid"},"project_id":{"type":["string","null"],"format":"uuid"}},"required":["kind","user_id","project_id"]}]},"group_by":{"type":"array","items":{"type":"string","enum":["project"]}},"summary":{"type":"object","properties":{"total_runs":{"type":"number","description":"Agent runs created in the selected interval."},"completed_runs":{"type":"number","description":"Matching runs currently completed."},"failed_runs":{"type":"number","description":"Matching runs currently failed."},"average_duration_ms":{"type":["number","null"],"description":"Mean finished-run duration in milliseconds."},"p95_duration_ms":{"type":["number","null"],"description":"95th percentile finished-run duration in milliseconds."},"last_run_at":{"type":["string","null"],"description":"Latest matching run creation timestamp."},"previous":{"type":"object","properties":{"total_runs":{"type":"number","description":"Agent runs created in the selected interval."},"completed_runs":{"type":"number","description":"Matching runs currently completed."},"failed_runs":{"type":"number","description":"Matching runs currently failed."},"average_duration_ms":{"type":["number","null"],"description":"Mean finished-run duration in milliseconds."},"p95_duration_ms":{"type":["number","null"],"description":"95th percentile finished-run duration in milliseconds."},"last_run_at":{"type":["string","null"],"description":"Latest matching run creation timestamp."}},"required":["total_runs","completed_runs","failed_runs","average_duration_ms","p95_duration_ms","last_run_at"]}},"required":["total_runs","completed_runs","failed_runs","average_duration_ms","p95_duration_ms","last_run_at"]},"timeframe":{"type":"object","properties":{"from":{"type":"string","format":"date-time","description":"Inclusive start."},"to":{"type":"string","format":"date-time","description":"Exclusive end."},"timezone":{"type":"string"},"granularity":{"type":"string","enum":["hour","day","week","month"]},"bucket_count":{"type":"integer","minimum":0},"previous":{"type":"object","properties":{"from":{"type":"string","format":"date-time","description":"Inclusive start."},"to":{"type":"string","format":"date-time","description":"Exclusive end."},"timezone":{"type":"string"},"granularity":{"type":"string","enum":["hour","day","week","month"]},"bucket_count":{"type":"integer","minimum":0}},"required":["from","to","timezone","granularity","bucket_count"]}},"required":["from","to","timezone","granularity","bucket_count"]},"series":{"type":"array","items":{"type":"object","properties":{"runs":{"type":"number"},"completed_runs":{"type":"number"},"failed_runs":{"type":"number"},"bucket_start":{"type":"string"},"groups":{"type":"array","items":{"type":"object","properties":{"runs":{"type":"number"},"completed_runs":{"type":"number"},"failed_runs":{"type":"number"},"dimensions":{"type":"object","properties":{"project_id":{"type":["string","null"],"format":"uuid"}},"required":["project_id"]}},"required":["runs","completed_runs","failed_runs","dimensions"]}}},"required":["runs","completed_runs","failed_runs","bucket_start"]}},"statuses":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","description":"Status or outcome label."},"count":{"type":"number","description":"Number of matching records."}},"required":["status","count"]}},"models":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","description":"AI provider."},"model":{"type":"string","description":"AI model identifier."},"count":{"type":"number","description":"Number of uses."}},"required":["provider","model","count"]}},"tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Recorded waiting tool name."},"count":{"type":"number","description":"Runs with this recorded waiting tool."}},"required":["name","count"]}},"projects":{"type":"array","items":{"type":"object","properties":{"project_id":{"type":["string","null"],"format":"uuid","description":"Project ID, or null for unscoped usage."},"project_name":{"type":"string","description":"Project display name."},"project_slug":{"type":["string","null"],"description":"Project slug, or null when unavailable."},"count":{"type":"number","description":"Number of matching records."}},"required":["project_id","project_name","project_slug","count"]}},"recent_runs":{"type":"array","items":{"$ref":"#/components/schemas/Run"}}},"required":["summary","timeframe","series","statuses","models","tools","projects","recent_runs"]},"TargetRunProblem":{"type":"object","properties":{"type":{"type":"string","description":"Problem type URI reference."},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599,"format":"int64"},"code":{"type":"string","minLength":1,"maxLength":128},"cause":{"type":"string","enum":["schedule_concurrency_forbidden","schedule_fire_in_progress","schedule_run_limit_reached"],"description":"Schedule admission refusal."},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"]}}},"required":["type","title","status","code"]},"AccountWithMembership":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["personal","team"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"membership":{"type":"object","properties":{"role":{"type":"string","enum":["owner","admin","member"]},"capabilities":{"type":"array","items":{"type":"string","enum":["account.read","account.settings.manage","account.members.read","account.members.manage","account.invitations.read","account.invitations.manage","account.projects.read","account.projects.create","account.billing.read","account.billing.manage","account.ownership.transfer","account.delete"]}}},"required":["role","capabilities"],"description":"The caller's own membership in this account, including their resolved role and capabilities."}},"required":["id","slug","name","kind","created_at","updated_at","membership"]},"AccountMember":{"type":"object","properties":{"user_id":{"type":"string","format":"uuid"},"email":{"type":"string"},"name":{"type":["string","null"]},"avatar_src":{"type":["string","null"]},"role":{"type":"string","enum":["owner","admin","member"]},"invited_by_user_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["user_id","email","name","avatar_src","role","invited_by_user_id","created_at","updated_at"]},"AccountInvitation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"account_id":{"type":"string","format":"uuid"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member"]},"status":{"type":"string","enum":["pending","accepted","revoked","expired"],"description":"Pending invitations are reported as expired after `expires_at`."},"expires_at":{"type":"string"},"invited_by_user_id":{"type":["string","null"],"format":"uuid"},"accepted_by_user_id":{"type":["string","null"],"format":"uuid"},"resolved_at":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["id","account_id","email","role","status","expires_at","invited_by_user_id","accepted_by_user_id","resolved_at","created_at"]},"AccountInvitationCreated":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"account_id":{"type":"string","format":"uuid"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member"]},"status":{"type":"string","enum":["pending","accepted","revoked","expired"],"description":"Pending invitations are reported as expired after `expires_at`."},"expires_at":{"type":"string"},"invited_by_user_id":{"type":["string","null"],"format":"uuid"},"accepted_by_user_id":{"type":["string","null"],"format":"uuid"},"resolved_at":{"type":["string","null"]},"created_at":{"type":"string"},"token":{"type":"string","description":"Raw acceptance token. Returned exactly once; the server stores only its hash."}},"required":["id","account_id","email","role","status","expires_at","invited_by_user_id","accepted_by_user_id","resolved_at","created_at","token"]},"AccountInvitationPreview":{"type":"object","properties":{"account_id":{"type":"string","format":"uuid"},"account_name":{"type":"string"},"role":{"type":"string","enum":["admin","member"]},"expires_at":{"type":"string"},"status":{"type":"string","enum":["pending","accepted"]}},"required":["account_id","account_name","role","expires_at","status"]},"AccountProject":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Project UUID."},"slug":{"type":"string","description":"Project slug."},"name":{"type":"string","description":"Project display name."},"account_id":{"type":"string","format":"uuid","description":"Account UUID to which this project is assigned."},"type":{"type":"string","enum":["regular","default","template"],"description":"Project classification: regular, default, or template."},"is_template":{"type":"boolean","description":"Whether the project is available as a template."},"system_managed":{"type":"boolean","description":"Whether the platform manages this project."},"created_at":{"type":"string","description":"Project creation timestamp in ISO 8601 UTC."},"updated_at":{"type":"string","description":"Project last-update timestamp in ISO 8601 UTC."}},"required":["id","slug","name","account_id","type","is_template","system_managed","created_at","updated_at"]},"AccountInferencePolicy":{"type":"object","properties":{"account_id":{"type":"string","format":"uuid"},"models":{"type":"object","properties":{"allowed":{"type":["array","null"],"items":{"type":"string"},"description":"Canonical model IDs that may be used. Null means no restriction; an empty list allows nothing."},"denied":{"type":"array","items":{"type":"string"},"description":"Canonical model IDs that may not be used. A denial overrides an allowance; an empty list denies nothing."}},"required":["allowed","denied"],"description":"Models the account allows and denies. Every project of the account inherits them and can only narrow them."},"default_model":{"type":["string","null"],"description":"Default model ID. Null uses the built-in default, mistral/mistral-small-2503. A project default wins over the account default."}},"required":["account_id","models","default_model"]},"AccountInferenceProviderPolicyPreview":{"type":"object","properties":{"provider":{"type":"string","enum":["anthropic","openai"]},"account_blocked_models":{"type":"array","items":{"type":"string"}},"project_count":{"type":"integer","minimum":0},"restricted_projects":{"type":"array","items":{"type":"object","properties":{"project_id":{"type":"string","format":"uuid"},"project_name":{"type":"string"},"blocked_models":{"type":"array","items":{"type":"string"}}},"required":["project_id","project_name","blocked_models"],"additionalProperties":false}}},"required":["provider","account_blocked_models","project_count","restricted_projects"],"additionalProperties":false},"AccountInferenceProviders":{"type":"object","properties":{"enabled":{"type":"boolean"},"providers":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["anthropic","openai"]},"mode":{"type":"string","enum":["managed","customer"]},"credential_status":{"type":"string","enum":["missing","active","revoked"]},"key_suffix":{"type":["string","null"],"minLength":4,"maxLength":4},"revision":{"type":"integer","minimum":0},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["provider","mode","credential_status","key_suffix","revision","updated_at"],"additionalProperties":false}}},"required":["enabled","providers"],"additionalProperties":false},"AccountInferenceProvider":{"type":"object","properties":{"provider":{"type":"string","enum":["anthropic","openai"]},"mode":{"type":"string","enum":["managed","customer"]},"credential_status":{"type":"string","enum":["missing","active","revoked"]},"key_suffix":{"type":["string","null"],"minLength":4,"maxLength":4},"revision":{"type":"integer","minimum":0},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["provider","mode","credential_status","key_suffix","revision","updated_at"],"additionalProperties":false},"ApiKeyInferenceLimitsSummary":{"type":["object","null"],"properties":{"allowed_models":{"type":["array","null"],"items":{"type":"string"}},"requests_per_minute":{"type":["integer","null"]},"updated_at":{"type":"string"}},"required":["allowed_models","requests_per_minute","updated_at"],"description":"The key's inference limits, or null when it carries none. Always null for an account key, and for a key on a project where the caller lacks `project.api_keys.read`. Read-only here; manage them through `/api-keys/{id}/limits`."},"ApiKeyInferenceLimits":{"type":"object","properties":{"api_key_id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"configured":{"type":"boolean","description":"Whether the key carries limits. False means every limit below is a default."},"enforced":{"type":"boolean","description":"Whether the gateway enforces the key’s limits. If false, stored limits do not restrict requests."},"allowed_models":{"type":["array","null"],"items":{"type":"string"}},"requests_per_minute":{"type":["integer","null"]},"effective_allowed_models":{"type":["array","null"],"items":{"type":"string"},"description":"The key’s `allowed_models` after applying the project policy’s model restrictions. Other constraints, such as hosts, jurisdictions, and tier, apply to each request. Null if the key has no model list."},"created_at":{"type":["string","null"]},"updated_at":{"type":["string","null"]},"updated_by":{"type":["string","null"],"format":"uuid"}},"required":["api_key_id","project_id","configured","enforced","allowed_models","requests_per_minute","effective_allowed_models","created_at","updated_at","updated_by"]},"ReplaceApiKeyInferenceLimitsRequest":{"type":"object","properties":{"allowed_models":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"Allowed catalog model IDs from `GET /ai/models`. Aliases are normalized to `<vendor>/<model>`, and duplicates are removed. Retired models return `422` with a replacement; unknown models return `400`. Null or omitted means no model restriction. A model excluded by project policy can be stored, but is excluded from `effective_allowed_models` and rejected at request time."},"requests_per_minute":{"type":["integer","null"],"minimum":1,"maximum":10000,"description":"Inference requests this key may make per minute. Null or omitted: no rate limit."}},"additionalProperties":false},"IntegrationConnection":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"connection_generation_id":{"type":"string","format":"uuid"},"integration":{"type":"string"},"display_name":{"type":["string","null"]},"can_disconnect":{"type":"boolean"},"can_reconnect":{"type":"boolean"},"project":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"name":{"type":"string"}},"required":["id","slug","name"]},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"status":{"type":"string","enum":["connected","expired","disconnected"]},"scope":{"type":"string","enum":["user"]},"user_id":{"type":"string","format":"uuid"}},"required":["id","connection_generation_id","integration","display_name","can_disconnect","can_reconnect","project","created_at","updated_at","status","scope","user_id"]},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"connection_generation_id":{"type":"string","format":"uuid"},"integration":{"type":"string"},"display_name":{"type":["string","null"]},"can_disconnect":{"type":"boolean"},"can_reconnect":{"type":"boolean"},"project":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"name":{"type":"string"}},"required":["id","slug","name"]},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"status":{"type":"string","enum":["connected","expired","disconnected"]},"scope":{"type":"string","enum":["project"]},"user_id":{"type":"null"}},"required":["id","connection_generation_id","integration","display_name","can_disconnect","can_reconnect","project","created_at","updated_at","status","scope","user_id"]}]},"ConnectionList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationConnection"}},"page_info":{"$ref":"#/components/schemas/PageInfo"},"total":{"type":"integer","minimum":0}},"required":["data","page_info","total"]},"AccountConnectionList":{"allOf":[{"$ref":"#/components/schemas/ConnectionList"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationConnection"},"description":"Requires an interactive user identity. Returns the calling user’s own private project-user connections and shared project connections in projects where that user has viewer access. An integration filter restricts both connection scopes."}}}]},"Environment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"project_id":{"type":"string","format":"uuid"},"protected":{"type":"boolean"},"domains":{"type":"array","items":{"type":"string"},"description":"Custom domains attached to the environment."},"environment_variables":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"value":{"type":"string","enum":["********"],"description":"Always masked; secret values are never returned."},"has_value":{"type":"boolean"}},"required":["id","key","value","has_value"]},"description":"Variable metadata with masked values."},"deployment":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":["string","null"]},"updated_at":{"type":["string","null"]},"release":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"export_status":{"type":["string","null"]},"build_status":{"type":["string","null"]},"deploy_status":{"type":["string","null"]},"created_at":{"type":["string","null"]},"updated_at":{"type":["string","null"]}},"required":["id","name","export_status","build_status","deploy_status","created_at","updated_at"]}},"required":["id","created_at","updated_at","release"],"description":"Latest deployment in the environment."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","project_id","protected","domains","environment_variables"]},"ProjectConnectionList":{"allOf":[{"$ref":"#/components/schemas/ConnectionList"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationConnection"},"description":"Interactive users see their own private project-user connections and shared project connections in the selected project. Noninteractive callers see only shared project connections. An integration filter restricts both connection scopes."}}}]},"ConnectSession":{"type":"object","properties":{"session_token":{"type":"string","description":"One-time connect session token, embedded in connect_url."},"connect_url":{"type":"string","description":"URL to open in a browser. It starts provider consent through GET /oauth/connect/{integration}.","example":"https://api.veryfront.com/oauth/connect/github?session_token=ocs_example"},"expires_at":{"type":"string","format":"date-time","description":"UTC time (RFC 3339) after which connect_url no longer starts consent."}},"required":["session_token","connect_url","expires_at"]},"ConnectionStatus":{"type":"object","properties":{"integration":{"type":"string","description":"Integration name that was checked."},"scope":{"type":"string","enum":["user","project"],"description":"Connection owner: user for your own connection in the project, project for the shared one."},"connected":{"type":"boolean","description":"True when a usable connection exists for this owner."},"connection_id":{"type":["string","null"],"format":"uuid","description":"ID of the current connection; null when connected is false. Pass it to delete_connection."},"connection_generation_id":{"type":["string","null"],"format":"uuid","description":"Generation of the current connection; null when connected is false."}},"required":["integration","scope","connected","connection_id","connection_generation_id"]},"ConnectionDeletion":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"provider_revoked":{"type":"boolean","description":"True when the provider confirmed revocation. False: credentials were deleted, revocation unconfirmed."}},"required":["ok","provider_revoked"]},"InferencePolicy":{"type":"object","properties":{"project_id":{"type":"string","format":"uuid"},"configured":{"type":"boolean","description":"Whether the project states a policy. False returns the defaults the project is served under: EU-only, with an `eu-resident` minimum tier, while the EU default is on; every allowed model once it has ended. A row that constrains nothing is routed exactly like no row; routing changes begin at the first non-null constraint."},"enforced":{"type":"boolean","description":"Whether the gateway can apply this stored policy. True for every readable policy: each stated constraint is enforced, and so is the default \"eu-resident\" tier floor while the EU default is on. False only when a stored value (a tier or precision) is one this build cannot read, because the gateway then refuses every request for the project instead of applying it."},"created_at":{"type":["string","null"],"description":"Records policy creation in ISO 8601 format, or null when no policy row exists."},"updated_at":{"type":["string","null"],"description":"Records the last policy update in ISO 8601 format, or null when no policy row exists."},"updated_by":{"type":["string","null"],"format":"uuid","description":"Records the user ID responsible for the last policy update, or null when no actor is recorded."},"models":{"type":"object","properties":{"allowed":{"type":["array","null"],"items":{"type":"string"},"description":"Canonical model IDs that may be used. Null means no restriction; an empty list allows nothing."},"denied":{"type":"array","items":{"type":"string"},"description":"Canonical model IDs that may not be used. A denial overrides an allowance; an empty list denies nothing."}},"required":["allowed","denied"],"description":"Models the project itself allows and denies. They only narrow its account."},"default_model":{"type":["string","null"],"description":"The project's own default model. Null uses the account default, then the built-in default."},"account":{"type":["object","null"],"properties":{"models":{"type":"object","properties":{"allowed":{"type":["array","null"],"items":{"type":"string"},"description":"Canonical model IDs that may be used. Null means no restriction; an empty list allows nothing."},"denied":{"type":"array","items":{"type":"string"},"description":"Canonical model IDs that may not be used. A denial overrides an allowance; an empty list denies nothing."}},"required":["allowed","denied"]},"default_model":{"type":["string","null"],"description":"Default model ID. Null uses the built-in default, mistral/mistral-small-2503. A project default wins over the account default."}},"required":["models","default_model"],"description":"The policy the project inherits from its account: its models and default_model. Null for a project without an account."},"effective":{"type":"object","properties":{"models":{"type":"object","properties":{"allowed":{"type":["array","null"],"items":{"type":"string"},"description":"Canonical model IDs that may be used. Null means no restriction; an empty list allows nothing."},"denied":{"type":"array","items":{"type":"string"},"description":"Canonical model IDs that may not be used. A denial overrides an allowance; an empty list denies nothing."}},"required":["allowed","denied"]},"default_model":{"type":["string","null"],"description":"The model a call naming none gets: the project default, then the account default, then the built-in default, the first one allowed and served under the project's whole policy. Null when none is. A customer-funded default still needs a usable credential at run time. Project members can read this default through `GET /ai/models` deployments[].is_policy_default without settings access; API-key limits may narrow that discovery answer further."}},"required":["models","default_model"],"description":"What applies to the project: its own and its account's rules composed (allowed lists intersect, denied lists combine), and the default model a call naming none gets."}},"required":["project_id","configured","enforced","created_at","updated_at","updated_by","models","default_model","account","effective"]},"ContentSearchResponse":{"type":"object","properties":{"document_scope_version":{"type":"number","enum":[1]},"data":{"type":"array","items":{"type":"object","properties":{"chunk":{"type":"object","properties":{"id":{"type":"string"},"file_path":{"type":"string"},"file_id":{"type":"string"},"file_version_id":{"type":"string"},"index":{"type":"number"},"content":{"type":"string"},"start_offset":{"type":"number"},"end_offset":{"type":"number"},"token_count":{"type":"number"},"metadata":{"type":"object","additionalProperties":{}}},"required":["id","file_path","file_version_id","index","content","start_offset","end_offset","token_count"]},"score":{"type":"number"},"match_type":{"type":"string","enum":["semantic","keyword","hybrid"]}},"required":["chunk","score","match_type"]},"description":"Vector search matches ordered by relevance."},"page_info":{"$ref":"#/components/schemas/PageInfo"},"search_time_ms":{"type":"number","description":"Server-side search duration in milliseconds."},"total_matches":{"type":"number","description":"Total number of matches reported by the search backend."}},"required":["data","page_info","search_time_ms","total_matches"],"example":{"data":[{"chunk":{"id":"7c9e6679-7425-40de-944b-e07fc1f90ae7","file_path":"src/pages/index.tsx","file_id":"f47ac10b-58cc-4372-a567-0e02b2c3d479","file_version_id":"9b2f4c11-3c6a-4b0e-9d1f-2a7f3f6c8e10","index":0,"content":"export default function Home() {\n  return <main>Hello</main>\n}\n","start_offset":0,"end_offset":63,"token_count":18,"metadata":{"language":"tsx"}},"score":0.87,"match_type":"semantic"}],"page_info":{"self":null,"first":null,"next":null,"prev":null},"search_time_ms":42,"total_matches":1}},"ContentSearchBody":{"type":"object","properties":{"model":{"type":"object","properties":{"name":{"type":"string","minLength":1},"provider":{"type":"string","minLength":1}},"required":["name","provider"]},"document_scope":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"path_flavor":{"type":"string","enum":["posix"]},"include_all":{"type":"boolean"},"includes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":4096},"maxItems":1024},"excludes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":4096},"maxItems":1024},"content_dir":{"type":"string","minLength":1,"maxLength":4096},"project_dir":{"type":"string","minLength":1,"maxLength":4096},"resolved_content_dir":{"type":"string","minLength":1,"maxLength":4096},"resolved_project_dir":{"type":"string","minLength":1,"maxLength":4096}},"required":["version","path_flavor","include_all","includes","excludes","content_dir","resolved_content_dir"],"additionalProperties":false},"vector":{"type":"array","items":{"type":"number"},"minItems":768,"maxItems":4096,"description":"Pre-computed query embedding vector. Generate it with an embedding provider before sending the request."},"dimension":{"anyOf":[{"type":"number","enum":[768]},{"type":"number","enum":[1024]},{"type":"number","enum":[1536]},{"type":"number","enum":[3072]},{"type":"number","enum":[4096]}],"description":"Embedding vector dimension: 768, 1024, 1536, 3072, or 4096."},"limit":{"type":"number","minimum":1,"maximum":100,"default":10,"description":"Maximum search results to return, as an integer from 1 to 100."},"cursor":{"type":"string","description":"Opaque cursor returned from `page_info.next`."},"threshold":{"type":"number","minimum":0,"maximum":1,"default":0.7,"description":"Minimum similarity score for returned semantic matches."}},"required":["vector","dimension"],"example":{"vector":[0,0.4207,0.4546,0.0706,-0.3784,-0.4795,-0.1397,0.3285,0.4947,0.2061,-0.272,-0.5,-0.2683,0.2101,0.4953,0.3251,-0.144,-0.4807,-0.3755,0.0749,0.4565,0.4183,-0.0044,-0.4231,-0.4528,-0.0662,0.3813,0.4782,0.1355,-0.3318,-0.494,-0.202,0.2757,0.5,0.2645,-0.2141,-0.4959,-0.3218,0.1482,0.4819,0.3726,-0.0793,-0.4583,-0.4159,0.0089,0.4255,0.4509,0.0618,-0.3841,-0.4769,-0.1312,0.3351,0.4933,0.198,-0.2794,-0.4999,-0.2608,0.2181,0.4964,0.3184,-0.1524,-0.4831,-0.3696,0.0837,0.46,0.4134,-0.0133,-0.4278,-0.449,-0.0574,0.3869,0.4755,0.1269,-0.3384,-0.4926,-0.1939,0.2831,0.4998,0.257,-0.2221,-0.4969,-0.3149,0.1566,0.4842,0.3666,-0.088,-0.4617,-0.4109,0.0177,0.43,0.447,0.053,-0.3897,-0.4741,-0.1226,0.3416,0.4918,0.1898,-0.2867,-0.4996,-0.2532,0.226,0.4974,0.3115,-0.1608,-0.4853,-0.3636,0.0924,0.4634,0.4084,-0.0221,-0.4323,-0.445,-0.0486,0.3925,0.4727,0.1183,-0.3448,-0.491,-0.1857,0.2903,0.4994,0.2494,-0.23,-0.4978,-0.308,0.165,0.4863,0.3605,-0.0967,-0.4651,-0.4058,0.0265,0.4345,0.443,0.0442,-0.3952,-0.4713,-0.114,0.348,0.4901,0.1816,-0.2939,-0.4992,-0.2455,0.2339,0.4982,0.3045,-0.1692,-0.4873,-0.3574,0.1011,0.4667,0.4032,-0.031,-0.4367,-0.4409,-0.0398,0.3979,0.4698,0.1097,-0.3512,-0.4892,-0.1775,0.2975,0.4989,0.2416,-0.2378,-0.4986,-0.301,0.1733,0.4883,0.3543,-0.1054,-0.4682,-0.4006,0.0354,0.4388,0.4388,0.0354,-0.4006,-0.4682,-0.1054,0.3543,0.4883,0.1733,-0.301,-0.4986,-0.2378,0.2417,0.4989,0.2975,-0.1775,-0.4892,-0.3512,0.1097,0.4698,0.3979,-0.0398,-0.4409,-0.4366,-0.0309,0.4032,0.4667,0.1011,-0.3574,-0.4873,-0.1692,0.3045,0.4982,0.2339,-0.2455,-0.4992,-0.2939,0.1816,0.4901,0.348,-0.114,-0.4713,-0.3952,0.0442,0.443,0.4345,0.0265,-0.4058,-0.465,-0.0967,0.3605,0.4863,0.165,-0.308,-0.4978,-0.2299,0.2494,0.4994,0.2903,-0.1857,-0.491,-0.3448,0.1183,0.4727,0.3925,-0.0486,-0.445,-0.4323,-0.0221,0.4084,0.4634,0.0924,-0.3636,-0.4853,-0.1608,0.3115,0.4974,0.226,-0.2532,-0.4996,-0.2867,0.1898,0.4918,0.3416,-0.1226,-0.4741,-0.3897,0.053,0.447,0.43,0.0177,-0.4109,-0.4617,-0.088,0.3666,0.4842,0.1566,-0.315,-0.4969,-0.222,0.257,0.4998,0.283,-0.1939,-0.4926,-0.3384,0.1269,0.4755,0.3869,-0.0574,-0.449,-0.4278,-0.0133,0.4134,0.46,0.0837,-0.3696,-0.4831,-0.1524,0.3184,0.4964,0.2181,-0.2608,-0.4999,-0.2794,0.198,0.4933,0.3351,-0.1312,-0.4769,-0.3841,0.0618,0.4509,0.4254,0.0088,-0.4159,-0.4583,-0.0793,0.3726,0.4819,0.1482,-0.3218,-0.4959,-0.2141,0.2646,0.5,0.2757,-0.202,-0.494,-0.3318,0.1355,0.4782,0.3813,-0.0662,-0.4528,-0.4231,-0.0044,0.4183,0.4565,0.0749,-0.3755,-0.4807,-0.1439,0.3252,0.4953,0.2101,-0.2683,-0.5,-0.272,0.2061,0.4947,0.3285,-0.1397,-0.4795,-0.3784,0.0706,0.4547,0.4207,0,-0.4207,-0.4546,-0.0705,0.3784,0.4795,0.1397,-0.3285,-0.4947,-0.206,0.272,0.5,0.2683,-0.2101,-0.4953,-0.3251,0.144,0.4807,0.3755,-0.075,-0.4565,-0.4183,0.0044,0.4231,0.4528,0.0662,-0.3813,-0.4782,-0.1354,0.3318,0.494,0.202,-0.2757,-0.5,-0.2645,0.2141,0.4959,0.3218,-0.1482,-0.4819,-0.3725,0.0793,0.4583,0.4159,-0.0089,-0.4255,-0.4509,-0.0618,0.3841,0.4769,0.1312,-0.3351,-0.4933,-0.1979,0.2794,0.4999,0.2608,-0.2181,-0.4964,-0.3184,0.1524,0.4831,0.3696,-0.0837,-0.46,-0.4134,0.0133,0.4278,0.449,0.0574,-0.387,-0.4755,-0.1269,0.3384,0.4926,0.1939,-0.2831,-0.4998,-0.257,0.2221,0.4969,0.3149,-0.1566,-0.4842,-0.3666,0.0881,0.4617,0.4109,-0.0177,-0.43,-0.447,-0.053,0.3897,0.4741,0.1226,-0.3416,-0.4918,-0.1898,0.2867,0.4996,0.2532,-0.226,-0.4974,-0.3115,0.1608,0.4853,0.3636,-0.0924,-0.4634,-0.4084,0.0221,0.4323,0.445,0.0486,-0.3925,-0.4727,-0.1183,0.3449,0.491,0.1857,-0.2903,-0.4994,-0.2493,0.23,0.4978,0.308,-0.165,-0.4863,-0.3605,0.0968,0.4651,0.4058,-0.0266,-0.4345,-0.443,-0.0442,0.3952,0.4713,0.114,-0.3481,-0.4901,-0.1816,0.2939,0.4992,0.2455,-0.2339,-0.4982,-0.3045,0.1692,0.4873,0.3574,-0.1011,-0.4667,-0.4032,0.031,0.4367,0.4409,0.0398,-0.3979,-0.4698,-0.1097,0.3512,0.4892,0.1774,-0.2975,-0.4989,-0.2416,0.2378,0.4986,0.301,-0.1733,-0.4883,-0.3543,0.1054,0.4682,0.4006,-0.0354,-0.4388,-0.4388,-0.0353,0.4006,0.4682,0.1054,-0.3544,-0.4883,-0.1733,0.301,0.4986,0.2377,-0.2417,-0.4989,-0.2974,0.1775,0.4892,0.3512,-0.1097,-0.4698,-0.3979,0.0398,0.4409,0.4366,0.0309,-0.4032,-0.4666,-0.101,0.3575,0.4873,0.1691,-0.3045,-0.4982,-0.2338,0.2455,0.4992,0.2939,-0.1816,-0.4901,-0.348,0.1141,0.4713,0.3952,-0.0442,-0.443,-0.4345,-0.0265,0.4058,0.465,0.0967,-0.3605,-0.4863,-0.165,0.308,0.4978,0.2299,-0.2494,-0.4994,-0.2903,0.1857,0.491,0.3448,-0.1184,-0.4727,-0.3925,0.0486,0.445,0.4323,0.0221,-0.4084,-0.4634,-0.0924,0.3636,0.4853,0.1608,-0.3115,-0.4974,-0.226,0.2532,0.4996,0.2867,-0.1898,-0.4918,-0.3416,0.1227,0.4742,0.3897,-0.053,-0.447,-0.43,-0.0177,0.4109,0.4617,0.088,-0.3666,-0.4842,-0.1566,0.315,0.4969,0.222,-0.257,-0.4998,-0.283,0.1939,0.4926,0.3384,-0.1269,-0.4755,-0.3869,0.0574,0.449,0.4277,0.0132,-0.4134,-0.46,-0.0836,0.3696,0.4831,0.1524,-0.3184,-0.4964,-0.2181,0.2608,0.4999,0.2794,-0.198,-0.4933,-0.3351,0.1312,0.4769,0.3841,-0.0618,-0.4509,-0.4254,-0.0088,0.4159,0.4582,0.0793,-0.3726,-0.4819,-0.1482,0.3218,0.4959,0.2141,-0.2646,-0.5,-0.2757,0.202,0.494,0.3318,-0.1355,-0.4782,-0.3813,0.0662,0.4528,0.4231,0.0044,-0.4183,-0.4565,-0.0749,0.3755,0.4807,0.1439,-0.3252,-0.4953,-0.2101,0.2683,0.5,0.272,-0.2061,-0.4947,-0.3285,0.1397,0.4795,0.3784,-0.0706,-0.4547,-0.4207,0,0.4208,0.4546,0.0705,-0.3784,-0.4795,-0.1397,0.3285,0.4947,0.206,-0.272,-0.5,-0.2683,0.2101,0.4953,0.3251,-0.144,-0.4807,-0.3755,0.075,0.4565,0.4183,-0.0045,-0.4231,-0.4528,-0.0661,0.3813,0.4782,0.1354,-0.3318,-0.494,-0.202,0.2757,0.5,0.2645,-0.2141,-0.4959,-0.3217,0.1482,0.4819,0.3725,-0.0793,-0.4583,-0.4159,0.0089,0.4255,0.4509,0.0618,-0.3841,-0.4769,-0.1312,0.3351,0.4933,0.1979,-0.2794,-0.4999,-0.2607,0.2181],"dimension":768,"limit":10,"threshold":0.7}},"FileChunk":{"type":"object","properties":{"id":{"type":"string"},"file_path":{"type":"string"},"file_id":{"type":"string"},"file_version_id":{"type":"string"},"index":{"type":"number"},"content":{"type":"string"},"start_offset":{"type":"number"},"end_offset":{"type":"number"},"token_count":{"type":"number"},"source_checksum":{"type":"string"},"metadata":{"type":"object","additionalProperties":{}},"created_at":{"type":"string"},"embedding":{"type":"object","properties":{"id":{"type":"string"},"model":{"type":"string"},"model_provider":{"type":"string"},"dimension":{"type":"integer"},"vector":{"type":"array","items":{"type":"number"}},"created_at":{"type":"string"},"status":{"type":"string","enum":["ready","stale","missing"]}},"required":["id","model","status"]}},"required":["id","file_path","file_version_id","index","content","start_offset","end_offset","token_count","source_checksum","created_at"]},"FileChunkList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FileChunk"},"description":"File chunks in the requested branch, environment, or release context."},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]},"CommitConflictProblem":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"versions":{"type":"array","items":{"type":"object","properties":{"file_id":{"type":"string","format":"uuid"},"version_id":{"type":"string","format":"uuid"},"path":{"type":"string"}},"required":["version_id","path"]}},"conflicts":{"type":"array","items":{"type":"object","properties":{"file_id":{"type":"string","format":"uuid"},"path":{"type":"string"},"error":{"type":"string"}},"required":["file_id","path","error"]}}},"required":["success","versions","conflicts"]}]},"CacheEntrySummary":{"type":"object","properties":{"key":{"type":"string","description":"Cache key."},"expires_at":{"type":["string","null"],"format":"date-time","description":"RFC 3339 UTC time the entry expires, or null for a miss or for an entry written through the legacy no-expiry path (ttl=0)."}},"required":["key","expires_at"],"description":"A cache entry without its value."},"CacheEntryList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CacheEntrySummary"},"description":"Cache entries in Redis scan order; pages can repeat a key."},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]},"CacheEntry":{"type":"object","properties":{"project_id":{"type":"string","description":"Project that owns the cache."},"key":{"type":"string","description":"Cache key."},"found":{"type":"boolean","description":"Whether a live entry exists for the key. A miss is a result, not an error."},"value":{"type":["string","null"],"description":"Stored value, always decompressed; null when found is false."},"expires_at":{"type":["string","null"],"format":"date-time","description":"RFC 3339 UTC time the entry expires, or null for a miss or for an entry written through the legacy no-expiry path (ttl=0)."}},"required":["project_id","key","found","value","expires_at"],"description":"One cache entry, or a miss for its key."},"CacheEntryBatch":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CacheEntry"}}},"required":["data"]},"CacheEntryWriteBatch":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CacheEntrySummary"}}},"required":["data"]},"ExternalFile":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":1024,"description":"Provider item ID. Opaque. SharePoint items use `{siteId}|{itemId}` and site roots `sp-site:{siteId}`. Site IDs also accept Microsoft Graph root and hostname aliases."},"provider":{"type":"string","enum":["onedrive","sharepoint","drive"],"description":"Provider that stores the item."},"name":{"type":"string","description":"File or folder name."},"kind":{"type":"string","enum":["file","folder"],"description":"Whether the item is a file or a folder."},"parent_id":{"type":["string","null"],"minLength":1,"maxLength":1024,"description":"Provider ID of the parent folder, or null."},"path":{"type":"string","description":"Provider path of the item, with the same meaning as on the legacy routes."},"mime_type":{"type":"string","minLength":1,"description":"MIME type. Folders report the provider folder type or `folder`."},"size_bytes":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Size in bytes. Folders may report 0."},"modified_at":{"type":["string","null"],"format":"date-time","description":"Last modification time in RFC 3339 UTC, or null when the provider reports none.","example":"2026-03-02T09:15:27.000Z"},"etag":{"type":["string","null"],"minLength":1,"maxLength":1024,"pattern":"^(?:\\*|(?:W\\/)?\"[\\x21\\x23-\\x7e]*\"(?:[ \\t]*,[ \\t]*(?:W\\/)?\"[\\x21\\x23-\\x7e]*\")*|[!#$%&'*+.^_`|~0-9A-Za-z-]+)$","description":"Provider version tag. Send it as `If-Match` on update to refuse a stale write."},"thumbnail_url":{"type":["string","null"],"description":"Provider thumbnail URL (https), or null."},"web_url":{"type":["string","null"],"description":"Provider URL (https) that opens the item, or null."}},"required":["id","provider","name","kind","parent_id","path","mime_type","size_bytes","modified_at","etag","thumbnail_url","web_url"]},"ExternalFileList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ExternalFile"},"description":"Items in provider order."},"page_info":{"type":"object","properties":{"self":{"type":["string","null"],"description":"Cursor of this page, or null for the first page."},"first":{"type":"null","description":"Always null."},"next":{"type":["string","null"],"description":"Opaque cursor for the next page, or null."},"prev":{"type":"null","description":"Always null: providers page forward only."}},"required":["self","first","next","prev"]}},"required":["data","page_info"]},"ExternalFileProblem":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","properties":{"code":{"type":"string","enum":["invalid_input","unauthenticated","not_found","forbidden","conflict","limit_exceeded","not_ready","internal"],"description":"Stable error code."},"reason":{"type":"string","enum":["provider_connection_required","personal_connection_required","provider_unavailable","provider_rate_limited","file_too_large","content_too_large","storage_quota_exceeded"],"description":"Why the error happened, where a code has more than one cause."},"provider":{"type":"string","enum":["onedrive","sharepoint","drive"],"description":"Provider of the request."},"connect_url":{"type":"string","format":"uri","description":"With not_ready: URL that starts connecting your own provider account. A hint, not a redirect."},"retry_after_seconds":{"type":"integer","minimum":0,"description":"Seconds to wait before retrying."},"size_bytes":{"type":"integer","minimum":0,"description":"Size of the file that hit a limit."},"limit_bytes":{"type":"integer","minimum":0,"description":"Byte limit that was exceeded."},"limit_chars":{"type":"integer","minimum":0,"description":"Character limit that was exceeded."}},"required":["code"]}]},"ExternalFileContent":{"type":"object","properties":{"file":{"$ref":"#/components/schemas/ExternalFile"},"content":{"type":"string","description":"Complete UTF-8 text or base64 content. More than 100000 encoded characters or 50 MiB returns limit_exceeded instead of partial content; use importExternalFile for larger files. Folders return invalid_input."},"content_encoding":{"type":"string","enum":["utf8","base64"],"description":"`utf8` for text MIME types, `base64` otherwise."}},"required":["file","content","content_encoding"]},"CreateExternalFileRequest":{"type":"object","properties":{"folder_id":{"type":"string","minLength":1,"maxLength":1024,"description":"Folder item ID, or `root`. SharePoint uses `sp-site:{siteId}` for a site and `{siteId}|{itemId}` inside one."},"name":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[^/]*$","description":"File name, 1-255 characters without a slash. Creates a new file without replacing an existing one. OneDrive and SharePoint return conflict for an existing name; Google Drive creates a new item with the same name."},"content":{"type":"string","maxLength":10000000,"description":"File content, at most 10000000 characters as sent."},"content_encoding":{"type":"string","enum":["utf8","base64"],"description":"Encoding of content: `utf8` (default) or `base64`."},"mime_type":{"type":"string","minLength":3,"maxLength":255,"description":"MIME type. Defaults from the name, else text/plain (utf8) or application/octet-stream (base64)."}},"required":["folder_id","name","content"]},"UpdateExternalFileRequest":{"type":"object","properties":{"content":{"type":"string","maxLength":10000000,"description":"Replacement content; folders cannot be updated. At most 10000000 characters as sent. Send If-Match to refuse a stale write with 409."},"content_encoding":{"type":"string","enum":["utf8","base64"],"description":"Encoding of content: `utf8` (default) or `base64`."}},"required":["content"]},"MoveExternalFileRequest":{"type":"object","properties":{"folder_id":{"type":"string","minLength":1,"maxLength":1024,"description":"Destination folder item ID, or root. Destination folder. Provider name conflicts return conflict; Google Drive allows duplicate names. SharePoint moves remain within the same site."},"name":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[^/]*$","description":"New name, 1-255 characters without / or control characters; the current name when omitted."}},"required":["folder_id"]},"ExternalFileDeletion":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"status":{"type":"string","enum":["deleted","trashed"],"description":"`deleted` when the provider removed the item (Google Drive), `trashed` when it moved it to the recycle bin (OneDrive, SharePoint)."}},"required":["ok","status"]},"CreateExternalFolderRequest":{"type":"object","properties":{"folder_id":{"type":"string","minLength":1,"maxLength":1024,"description":"Parent folder item ID, or `root`."},"name":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[^/]*$","description":"Folder name, 1-255 characters without `/`."}},"required":["folder_id","name"]},"ExternalFileImport":{"type":"object","properties":{"upload":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":1024,"description":"Upload ID."},"project_id":{"type":"string","minLength":1,"maxLength":1024,"description":"Project that owns the upload."},"path":{"type":"string","description":"Upload path inside the project Uploads."},"name":{"type":"string","description":"Stored provider file name. Google Docs and Slides export as PDF; Sheets export as XLSX, retaining the exported extension."},"mime_type":{"type":"string","minLength":1,"description":"Stored content type."},"size_bytes":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Stored size in bytes."},"visibility":{"type":"string","enum":["project","public","private"],"description":"Effective visibility of the upload: the explicit visibility sent with the import, else inherited from the destination path."}},"required":["id","project_id","path","name","mime_type","size_bytes","visibility"]},"source":{"type":"object","properties":{"provider":{"type":"string","enum":["onedrive","sharepoint","drive"]},"file_id":{"type":"string","minLength":1,"maxLength":1024,"description":"Provider item ID that was imported."}},"required":["provider","file_id"]}},"required":["upload","source"]},"ImportExternalFileRequest":{"type":"object","properties":{"folder_path":{"type":"string","minLength":1,"description":"Destination folder inside project Uploads, relative (no leading `/`). The Uploads root when omitted."},"timestamp_prefix":{"type":"boolean","description":"Prefix the stored name with a timestamp to avoid a name conflict. Defaults to false."},"visibility":{"type":"string","enum":["project","public","private"],"description":"Visibility of the new upload: `project`, `public` or `private`. Omitted, the upload inherits the destination's visibility. Setting it needs upload admin access on the destination, and `public` a paid plan; a refusal imports nothing."}}},"Server":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"short_id":{"type":"string"},"user_id":{"type":"string","format":"uuid"},"environment_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"hostname":{"type":"string"},"status":{"type":"string","enum":["pending","provisioning","running","error","deleting"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","short_id","user_id","environment_ids","hostname","status","created_at","updated_at"]},"Sandbox":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"short_id":{"type":"string"},"endpoint":{"type":"string","description":"Sandbox endpoint URL."},"status":{"type":"string","enum":["pending","provisioning","running","error","deleting"],"description":"Sandbox lifecycle status."},"project_id":{"type":["string","null"],"format":"uuid"},"run_id":{"type":["string","null"],"format":"uuid","description":"Agent run that created this sandbox."},"stopped_at":{"type":["string","null"],"description":"Compute cleanup completed; only session history remains."},"access_scope":{"type":"string","enum":["project","private"]},"workspace_storage":{"type":"string","enum":["ephemeral","persistent"],"description":"Persistent workspaces survive runtime pod replacement. Deleting the sandbox also deletes its workspace."},"ttl_mode":{"type":"string","enum":["default","duration","always_on"]},"ttl_hours":{"type":["integer","null"],"exclusiveMinimum":0},"expires_at":{"type":["string","null"]},"created_at":{"type":"string"},"last_activity_at":{"type":["string","null"]},"variable_snapshot":{"type":"object","properties":{"source_environment_id":{"type":["string","null"],"format":"uuid"},"variable_count":{"type":"integer","minimum":0},"copied_at":{"type":["string","null"]}},"required":["source_environment_id","variable_count","copied_at"],"description":"Snapshot provenance on sandbox details. Variables are copied once, without live synchronization. No variable keys or values are included."}},"required":["id","short_id","endpoint","status","project_id","access_scope","workspace_storage","ttl_mode","ttl_hours","expires_at","created_at","last_activity_at"]},"SandboxCommandInput":{"type":"object","properties":{"command":{"type":"string","minLength":1},"cwd":{"type":"string"},"timeout_seconds":{"type":"integer","exclusiveMinimum":0,"maximum":55,"default":30},"env":{"type":"object","additionalProperties":{"type":"string"}}},"required":["command"],"additionalProperties":false},"SandboxBackgroundCommandInput":{"type":"object","properties":{"command":{"type":"string","minLength":1},"cwd":{"type":"string"},"timeout_seconds":{"type":"integer","exclusiveMinimum":0,"maximum":600,"default":600},"env":{"type":"object","additionalProperties":{"type":"string"}}},"required":["command"],"additionalProperties":false},"NeutralOpenAiError":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"param":{"type":["string","null"]},"code":{"type":["string","null"]},"veryfront":{"type":"object","additionalProperties":{}}},"required":["message","type","param","code"]}},"required":["error"]},"NeutralAnthropicError":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error":{"type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"veryfront":{"type":"object","additionalProperties":{}}},"required":["type","message"]}},"required":["type","error"]},"AnthropicTokenCountResponse":{"type":"object","properties":{"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["input_tokens"]},"VeryfrontListedModelProcessing":{"type":"object","properties":{"processing":{"type":"string","description":"Where inference is processed: `eu`, `us`, `worldwide` or `unknown` (not recorded). An open string.","example":"eu"},"processing_label":{"type":"string","description":"The processing location in words, for display, e.g. `EU (EEA + Switzerland data zone)`.","example":"EU (EEA + Switzerland data zone)"},"model_provider":{"type":"object","properties":{"id":{"type":"string","description":"Stable identifier."},"name":{"type":"string","description":"Display name."}},"required":["id","name"],"description":"Who made the model.","example":{"id":"mistral","name":"Mistral"}},"inference_providers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stable identifier."},"name":{"type":"string","description":"Display name."},"region":{"type":"string","description":"Where inference runs. Known values: `eu`, `us`, `worldwide`, `unknown`. Tolerate values you have not seen."}},"required":["id","name","region"],"description":"Who runs the model."},"description":"Who runs the model and where, one entry per deployment the caller may use, in routing order. `region` is `eu`, `us`, `worldwide` or `unknown`; an open string.","example":[{"id":"google-vertex","name":"Google","region":"eu"}]}},"required":["processing","processing_label","model_provider","inference_providers"]},"NeutralOpenAiModelList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["model"]},"created":{"type":"number"},"owned_by":{"type":"string"},"veryfront":{"$ref":"#/components/schemas/VeryfrontListedModelProcessing"}},"required":["id","object","created","owned_by","veryfront"]}}},"required":["object","data"]},"NeutralAnthropicModelList":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["model"]},"id":{"type":"string"},"display_name":{"type":"string"},"created_at":{"type":"string"},"description":{"type":"string"},"veryfront":{"$ref":"#/components/schemas/VeryfrontListedModelProcessing"}},"required":["type","id","display_name","created_at","veryfront"]}},"has_more":{"type":"boolean"},"first_id":{"type":["string","null"]},"last_id":{"type":["string","null"]}},"required":["data","has_more","first_id","last_id"]},"NeutralGoogleError":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"},"status":{"type":"string"},"details":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"@type":{"type":"string","enum":["type.googleapis.com/google.rpc.ErrorInfo"]},"reason":{"type":"string"},"domain":{"type":"string"}},"required":["@type","reason","domain"]},{"type":"object","properties":{"@type":{"type":"string","enum":["type.googleapis.com/google.rpc.RetryInfo"]},"retryDelay":{"type":"string"}},"required":["@type","retryDelay"]},{"type":"object","properties":{"@type":{"type":"string","enum":["type.googleapis.com/google.rpc.QuotaFailure"]},"violations":{"type":"array","items":{"type":"object","properties":{"quotaId":{"type":"string"}},"required":["quotaId"]}}},"required":["@type","violations"]}]}},"veryfront":{"type":"object","additionalProperties":{}}},"required":["code","message","status"]}},"required":["error"]},"NeutralGoogleModelList":{"type":"object","properties":{"models":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"displayName":{"type":"string"},"description":{"type":"string"},"veryfront":{"$ref":"#/components/schemas/VeryfrontListedModelProcessing"}},"required":["name","displayName","veryfront"]}},"nextPageToken":{"type":"string"}},"required":["models"]},"GatewayBillingGroupFinalizeResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"funding":{"type":"string","enum":["customer","mixed"]},"billing_group_id":{"type":"string"},"already_finalized":{"type":"boolean"},"request_count":{"type":"integer","minimum":0},"charged_credits":{"type":"number","minimum":0},"target_credits":{"type":"number","minimum":0},"adjustment_credits":{"type":"number","minimum":0},"adjustment":{"type":"string","enum":["none","refund","spend"]},"provider_cost_usd":{"type":"number","minimum":0},"veryfront_charge_usd":{"type":"number","minimum":0},"veryfront_billed_usd":{"type":"number","minimum":0},"usage_capture_status":{"type":"string","enum":["complete","partial","missing"]}},"required":["ok","billing_group_id","already_finalized","request_count","charged_credits","target_credits","adjustment_credits","adjustment","provider_cost_usd","veryfront_charge_usd","veryfront_billed_usd","usage_capture_status"]},"CreditProblem":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","properties":{"balance":{"type":"number","description":"Current credit balance"},"required":{"type":"number","description":"Credits required for this request"}},"required":["balance","required"]}]},"GatewayBillingGroupFinalizeRequest":{"type":"object","properties":{"billing_group_id":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[A-Za-z0-9._:-]+$"}},"required":["billing_group_id"]},"AgentPushRuntimeServiceResponse":{"type":"object","properties":{"service":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"service_name":{"type":"string","minLength":1,"maxLength":128},"service_key":{"type":"string","minLength":1,"maxLength":128},"scope_kind":{"type":"string","enum":["global","project"]},"scope_key":{"type":"string","minLength":1},"project_id":{"type":["string","null"],"format":"uuid"},"agent_id":{"type":["string","null"]},"base_url":{"type":"string","format":"uri"},"invoke_url":{"type":"string","format":"uri"},"status":{"type":"string","enum":["active","disabled"]},"capabilities":{},"metadata":{},"managed_source":{"type":["object","null"],"properties":{"project_id":{"type":"string","format":"uuid"},"environment_id":{"type":"string","format":"uuid"},"release_id":{"type":"string","format":"uuid"}},"required":["project_id","environment_id","release_id"],"additionalProperties":false},"version":{"type":["string","null"]},"runtime":{"type":["string","null"]},"region":{"type":["string","null"]},"last_heartbeat_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","service_name","service_key","scope_kind","scope_key","project_id","agent_id","base_url","invoke_url","status","managed_source","version","runtime","region","last_heartbeat_at","created_at","updated_at"]}},"required":["service"]},"CanonicalV1Error":{"type":"object","properties":{"code":{"type":"string","enum":["INVALID_EVENT_REQUEST","UNKNOWN_RUN_EVENT_TYPE","AMBIGUOUS_RUN_EVENT_TYPE_ALIAS","EVENT_NOT_FOUND","CANONICAL_FILTER_UNRESOLVED","EVENT_KEY_CONFLICT","UNSAFE_EVENT_ID","DURABLE_STREAM_UNAVAILABLE","EVENT_READ_FAILED"]},"message":{"type":"string"},"event_ids":{"type":"array","items":{"type":"integer","exclusiveMinimum":0,"minimum":-9007199254740991,"maximum":9007199254740991},"maxItems":100}},"required":["code","message"],"additionalProperties":false},"ListRunEventTypesResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"group":{"type":["string","null"],"minLength":1},"scope":{"type":"string","enum":["ag-ui","control-plane","extension"]},"event_class":{"type":"string","enum":["fact","delta"]},"status":{"type":"string","enum":["active","live_only","reserved","deprecated"]},"viewer_visibility":{"type":"string","enum":["full","sanitised","type_only"]},"description":{"type":"string","minLength":1},"fields":{"type":"array","items":{"type":"string","minLength":1}},"legacy_types":{"type":"array","items":{"type":"string","minLength":1}},"custom_names":{"type":"array","items":{"type":"string","minLength":1}}},"required":["type","name","group","scope","event_class","status","viewer_visibility","description","fields"],"additionalProperties":false}}},"required":["data"]},"RunEvent":{"oneOf":[{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["RUN_STARTED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/RunStartedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["RUN_STARTED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["RUN_FINISHED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/RunFinishedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["RUN_FINISHED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["RUN_ERROR"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/RunErrorPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["RUN_ERROR"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["TEXT_MESSAGE_START"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/TextMessageStartPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT_MESSAGE_START"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["TEXT_MESSAGE_CONTENT"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/TextMessageContentPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT_MESSAGE_CONTENT"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["TEXT_MESSAGE_END"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/TextMessageEndPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT_MESSAGE_END"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["TOOL_CALL_START"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ToolCallStartPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["TOOL_CALL_START"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["TOOL_CALL_ARGS"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ToolCallArgsPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["TOOL_CALL_ARGS"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["TOOL_CALL_CHUNK"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ToolCallChunkPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["TOOL_CALL_CHUNK"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["TOOL_CALL_END"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ToolCallEndPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["TOOL_CALL_END"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["TOOL_CALL_RESULT"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ToolCallResultPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["TOOL_CALL_RESULT"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["STATE_SNAPSHOT"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/StateSnapshotPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["STATE_SNAPSHOT"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["STATE_DELTA"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/StateDeltaPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["STATE_DELTA"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["MESSAGES_SNAPSHOT"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/MessagesSnapshotPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["MESSAGES_SNAPSHOT"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["STEP_STARTED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/StepStartedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["STEP_STARTED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["STEP_FINISHED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/StepFinishedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["STEP_FINISHED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["REASONING_START"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ReasoningStartPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["REASONING_START"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["REASONING_MESSAGE_START"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ReasoningMessageStartPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["REASONING_MESSAGE_START"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["REASONING_MESSAGE_CONTENT"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ReasoningMessageContentPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["REASONING_MESSAGE_CONTENT"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["REASONING_MESSAGE_END"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ReasoningMessageEndPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["REASONING_MESSAGE_END"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["REASONING_CONTENT"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ReasoningContentPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["REASONING_CONTENT"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["REASONING_END"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ReasoningEndPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["REASONING_END"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["ACTIVITY_SNAPSHOT"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ActivitySnapshotPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["ACTIVITY_SNAPSHOT"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["ACTIVITY_DELTA"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ActivityDeltaPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["ACTIVITY_DELTA"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_TASK_INPUT_ACCEPTED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunTaskInputAcceptedPayload"},{"$ref":"#/components/schemas/AgentRunTaskInputAcceptedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_TASK_INPUT_ADMITTED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunTaskInputAdmittedPayload"},{"$ref":"#/components/schemas/AgentRunTaskInputAdmittedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_AUTHORIZATION_SEALED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunAuthorizationSealedPayload"},{"$ref":"#/components/schemas/AgentRunAuthorizationSealedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_REQUEST_ENQUEUED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunRequestEnqueuedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_REQUEST_ENQUEUED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_DEFAULT_CHAT_START_ENQUEUED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunDefaultChatStartEnqueuedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_DEFAULT_CHAT_START_ENQUEUED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_TOOL_RESULT_SUBMITTED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunToolResultSubmittedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_TOOL_RESULT_SUBMITTED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_TOOL_RESULT_DELIVERY_FAILED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunToolResultDeliveryFailedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_TOOL_RESULT_DELIVERY_FAILED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_INTEGRATION_CONNECTION_REFUSED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunIntegrationConnectionRefusedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_INTEGRATION_CONNECTION_REFUSED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_RUNTIME_OWNER_BOUND"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunRuntimeOwnerBoundPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_RUNTIME_OWNER_BOUND"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_WORKER_EXECUTION_ACCEPTED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunWorkerExecutionAcceptedPayload"},{"$ref":"#/components/schemas/AgentRunWorkerExecutionAcceptedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_RUNTIME_INVOKE_RETRIED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunRuntimeInvokeRetriedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_RUNTIME_INVOKE_RETRIED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_CONTEXT_COMPACTED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunContextCompactedPayload"},{"$ref":"#/components/schemas/AgentRunContextCompactedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_TOOL_EXPOSURE_CHECKPOINTED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunToolExposureCheckpointedPayload"},{"$ref":"#/components/schemas/AgentRunToolExposureCheckpointedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_PROVIDER_REPLAY_CHECKPOINTED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunProviderReplayCheckpointedPayloadRead"},{"$ref":"#/components/schemas/AgentRunProviderReplayCheckpointedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_PROVIDER_REPLAY_TURN_STARTED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunProviderReplayTurnStartedPayload"},{"$ref":"#/components/schemas/AgentRunProviderReplayTurnStartedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_PROVIDER_REPLAY_TURN_FINISHED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunProviderReplayTurnFinishedPayload"},{"$ref":"#/components/schemas/AgentRunProviderReplayTurnFinishedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_MODEL_CALL_CONTEXT_RECORDED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunModelCallContextRecordedPayloadRead"},{"$ref":"#/components/schemas/AgentRunModelCallContextRecordedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_MODEL_CALL_PROVIDER_ATTEMPT_RECORDED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunModelCallProviderAttemptRecordedPayload"},{"$ref":"#/components/schemas/AgentRunModelCallProviderAttemptRecordedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_CONTROL_PLANE_DISPATCH_ACCEPTED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunControlPlaneDispatchAcceptedPayloadRead"},{"$ref":"#/components/schemas/AgentRunControlPlaneDispatchAcceptedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_DETACHED_ACCEPTED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunDetachedAcceptedPayload"},{"$ref":"#/components/schemas/AgentRunDetachedAcceptedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_INVOKE_AGENT_BILLING_MODE_RETAINED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunInvokeAgentBillingModeRetainedPayload"},{"$ref":"#/components/schemas/AgentRunInvokeAgentBillingModeRetainedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_BILLING_USAGE_RETAINED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunBillingUsageRetainedPayload"},{"$ref":"#/components/schemas/AgentRunBillingUsageRetainedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_REPLAYED_UPLOADS_SEALED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunReplayedUploadsSealedPayload"},{"$ref":"#/components/schemas/AgentRunReplayedUploadsSealedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_TOOL_CALL_ADMITTED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunToolCallAdmittedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_TOOL_CALL_ADMITTED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_REQUEST_PROVENANCE_RECORDED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunRequestProvenanceRecordedPayload"},{"$ref":"#/components/schemas/AgentRunRequestProvenanceRecordedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_EXECUTION_START_OBSERVED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunExecutionStartObservedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_EXECUTION_START_OBSERVED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["TOOL_CALL_STATUS_CHANGED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ToolCallStatusChangedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["TOOL_CALL_STATUS_CHANGED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["INPUT_REQUEST_CREATED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/InputRequestCreatedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["INPUT_REQUEST_CREATED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["INPUT_REQUEST_UPDATED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/InputRequestUpdatedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["INPUT_REQUEST_UPDATED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["CHILD_RUN_STATUS_CHANGED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ChildRunStatusChangedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["CHILD_RUN_STATUS_CHANGED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["MODEL_CALL_COMPLETED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ModelCallCompletedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["MODEL_CALL_COMPLETED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["RUN_PARKED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/RunParkedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["RUN_PARKED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["RUN_LOG_CAPTURED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/RunLogCapturedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["RUN_LOG_CAPTURED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["STREAM_HEARTBEAT_EMITTED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/StreamHeartbeatEmittedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["STREAM_HEARTBEAT_EMITTED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["URL_CITED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/UrlCitedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["URL_CITED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["DOCUMENT_CITED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/DocumentCitedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["DOCUMENT_CITED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["FILE_ATTACHED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/FileAttachedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["FILE_ATTACHED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["FILES_CHANGED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/FilesChangedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["FILES_CHANGED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["RUNTIME_EVENT_RECORDED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/RuntimeEventRecordedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["RUNTIME_EVENT_RECORDED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_CONTROL_PLANE_DISPATCH_RECEIPT"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunControlPlaneDispatchReceiptPayload"},{"$ref":"#/components/schemas/AgentRunControlPlaneDispatchReceiptPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_TOOL_EXPOSURE_CHECKPOINT"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunToolExposureCheckpointPayload"},{"$ref":"#/components/schemas/AgentRunToolExposureCheckpointPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_PROVIDER_REPLAY_CHECKPOINT"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunProviderReplayCheckpointPayloadRead"},{"$ref":"#/components/schemas/AgentRunProviderReplayCheckpointPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_MODEL_CALL_CONTEXT"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunModelCallContextPayload"},{"$ref":"#/components/schemas/AgentRunModelCallContextPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":"integer","minimum":0},"event_type":{"type":"string","not":{"enum":["RUN_STARTED","RUN_FINISHED","RUN_ERROR","TEXT_MESSAGE_START","TEXT_MESSAGE_CONTENT","TEXT_MESSAGE_END","TOOL_CALL_START","TOOL_CALL_ARGS","TOOL_CALL_CHUNK","TOOL_CALL_END","TOOL_CALL_RESULT","STATE_SNAPSHOT","STATE_DELTA","MESSAGES_SNAPSHOT","STEP_STARTED","STEP_FINISHED","REASONING_START","REASONING_MESSAGE_START","REASONING_MESSAGE_CONTENT","REASONING_MESSAGE_END","REASONING_CONTENT","REASONING_END","ACTIVITY_SNAPSHOT","ACTIVITY_DELTA","AGENT_RUN_TASK_INPUT_ACCEPTED","AGENT_RUN_TASK_INPUT_ADMITTED","AGENT_RUN_AUTHORIZATION_SEALED","AGENT_RUN_REQUEST_ENQUEUED","AGENT_RUN_DEFAULT_CHAT_START_ENQUEUED","AGENT_RUN_TOOL_RESULT_SUBMITTED","AGENT_RUN_TOOL_RESULT_DELIVERY_FAILED","AGENT_RUN_INTEGRATION_CONNECTION_REFUSED","AGENT_RUN_RUNTIME_OWNER_BOUND","AGENT_RUN_WORKER_EXECUTION_ACCEPTED","AGENT_RUN_RUNTIME_INVOKE_RETRIED","AGENT_RUN_CONTEXT_COMPACTED","AGENT_RUN_TOOL_EXPOSURE_CHECKPOINTED","AGENT_RUN_PROVIDER_REPLAY_CHECKPOINTED","AGENT_RUN_PROVIDER_REPLAY_TURN_STARTED","AGENT_RUN_PROVIDER_REPLAY_TURN_FINISHED","AGENT_RUN_MODEL_CALL_CONTEXT_RECORDED","AGENT_RUN_MODEL_CALL_PROVIDER_ATTEMPT_RECORDED","AGENT_RUN_CONTROL_PLANE_DISPATCH_ACCEPTED","AGENT_RUN_DETACHED_ACCEPTED","AGENT_RUN_INVOKE_AGENT_BILLING_MODE_RETAINED","AGENT_RUN_BILLING_USAGE_RETAINED","AGENT_RUN_REPLAYED_UPLOADS_SEALED","AGENT_RUN_TOOL_CALL_ADMITTED","AGENT_RUN_REQUEST_PROVENANCE_RECORDED","AGENT_RUN_EXECUTION_START_OBSERVED","TOOL_CALL_STATUS_CHANGED","INPUT_REQUEST_CREATED","INPUT_REQUEST_UPDATED","CHILD_RUN_STATUS_CHANGED","MODEL_CALL_COMPLETED","RUN_PARKED","RUN_LOG_CAPTURED","STREAM_HEARTBEAT_EMITTED","URL_CITED","DOCUMENT_CITED","FILE_ATTACHED","FILES_CHANGED","RUNTIME_EVENT_RECORDED","AGENT_RUN_CONTROL_PLANE_DISPATCH_RECEIPT","AGENT_RUN_TOOL_EXPOSURE_CHECKPOINT","AGENT_RUN_PROVIDER_REPLAY_CHECKPOINT","AGENT_RUN_MODEL_CALL_CONTEXT"]}},"payload":{"description":"Payload of an unrecognized historical or future event."},"is_error":{"type":"boolean"},"created_at":{"type":"string"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false}]},"RunsPageInfo":{"type":"object","properties":{"next":{"type":["string","null"]}},"required":["next"],"description":"Opaque cursor for the next page; null means there are no more results."},"ListRunEventsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RunEvent"}},"page_info":{"$ref":"#/components/schemas/RunsPageInfo"}},"required":["data","page_info"]},"TargetRunEvent":{"type":"object","description":"A CloudEvent with an Agent Events Protocol payload. Full schemas are included in x-agent-event-envelope-schema and x-agent-event-payload-schemas.","additionalProperties":true,"x-agent-event-envelope-schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"urn:veryfront:run-events:target:envelope:1","title":"Agent Events Protocol target CloudEvent","type":"object","properties":{"specversion":{"const":"1.0"},"id":{"type":"string","minLength":1,"format":"ce-string"},"source":{"type":"string","minLength":1,"format":"uri-reference"},"type":{"enum":["com.veryfront.run.requested","com.veryfront.run.enqueued","com.veryfront.run.started","com.veryfront.run.succeeded","com.veryfront.run.failed","com.veryfront.run.cancelled","com.veryfront.run.log.captured","com.veryfront.child-run.reported","com.veryfront.step.started","com.veryfront.step.succeeded","com.veryfront.step.failed","com.veryfront.step.cancelled","com.veryfront.step.ended","com.veryfront.tool-call.started","com.veryfront.tool-call.arguments.delta.emitted","com.veryfront.tool-call.arguments.ended","com.veryfront.tool-call.refused","com.veryfront.tool-call.status.reported","com.veryfront.tool-call.result.recorded","com.veryfront.tool-call.result.submitted","com.veryfront.tool-call.result.delivery.failed","com.veryfront.model-call.input.captured","com.veryfront.model-call.usage.recorded","com.veryfront.input-request.created","com.veryfront.input-request.updated","com.veryfront.message.text.started","com.veryfront.message.text.delta.emitted","com.veryfront.message.text.ended","com.veryfront.message.reasoning.started","com.veryfront.message.reasoning.delta.emitted","com.veryfront.message.reasoning.ended","com.veryfront.message.url.referenced","com.veryfront.message.document.referenced","com.veryfront.message.file.attached","com.veryfront.stream.heartbeat.emitted","com.veryfront.stream.closed"]},"datacontenttype":{"const":"application/json"},"dataschema":{"type":"string","minLength":1,"format":"uri"},"data":{"type":"object"},"subject":{"type":"string","minLength":1,"format":"ce-string"},"time":{"type":"string","format":"date-time"},"recordedat":{"type":"string","format":"date-time"},"runid":{"type":"string","minLength":1,"format":"ce-string"},"runkind":{"enum":["agent","workflow","task"]},"conversationid":{"type":"string","minLength":1,"format":"ce-string"},"modelcallid":{"type":"string","minLength":1,"format":"ce-string"},"attemptid":{"type":"string","minLength":1,"format":"ce-string"},"traceparent":{"type":"string","pattern":"^00-(?!0{32}-)[0-9a-f]{32}-(?!0{16}-)[0-9a-f]{16}-[0-9a-f]{2}$"},"tracestate":{"type":"string","minLength":1,"maxLength":512,"format":"w3c-tracestate"}},"required":["specversion","id","source","type","datacontenttype","dataschema","data"],"propertyNames":{"pattern":"^[a-z0-9]+$"},"additionalProperties":{"anyOf":[{"type":"string","format":"ce-string"},{"type":"boolean"},{"type":"integer","minimum":-2147483648,"maximum":2147483647}]},"dependentRequired":{"runkind":["runid"],"attemptid":["modelcallid"],"tracestate":["traceparent"]},"allOf":[{"if":{"properties":{"type":{"const":"com.veryfront.run.requested"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/RunRequested"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/RunRequested"}},"required":["runid"]}},{"if":{"properties":{"type":{"const":"com.veryfront.run.enqueued"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/RunEnqueued"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/RunEnqueued"}},"required":["runid"]}},{"if":{"properties":{"type":{"const":"com.veryfront.run.started"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/RunStarted"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/RunStarted"}},"required":["runid"]}},{"if":{"properties":{"type":{"const":"com.veryfront.run.succeeded"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/RunSucceeded"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/RunSucceeded"}},"required":["runid"]}},{"if":{"properties":{"type":{"const":"com.veryfront.run.failed"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/RunFailed"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/RunFailed"}},"required":["runid"]}},{"if":{"properties":{"type":{"const":"com.veryfront.run.cancelled"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/RunCancelled"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/RunCancelled"}},"required":["runid"]}},{"if":{"properties":{"type":{"const":"com.veryfront.run.log.captured"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/RunLogCaptured"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/RunLogCaptured"}},"required":["runid"]}},{"if":{"properties":{"type":{"const":"com.veryfront.child-run.reported"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/ChildRunReported"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/ChildRunReported"}},"required":["runid"]}},{"if":{"properties":{"type":{"const":"com.veryfront.step.started"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/StepStarted"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/StepStarted"}},"required":["runid"]}},{"if":{"properties":{"type":{"const":"com.veryfront.step.succeeded"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/StepSucceeded"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/StepSucceeded"}},"required":["runid"]}},{"if":{"properties":{"type":{"const":"com.veryfront.step.failed"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/StepFailed"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/StepFailed"}},"required":["runid"]}},{"if":{"properties":{"type":{"const":"com.veryfront.step.cancelled"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/StepCancelled"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/StepCancelled"}},"required":["runid"]}},{"if":{"properties":{"type":{"const":"com.veryfront.step.ended"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/StepEnded"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/StepEnded"}},"required":["runid"]}},{"if":{"properties":{"type":{"const":"com.veryfront.tool-call.started"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/ToolCallStarted"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/ToolCallStarted"}}}},{"if":{"properties":{"type":{"const":"com.veryfront.tool-call.arguments.delta.emitted"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/ToolCallArgumentsDeltaEmitted"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/ToolCallArgumentsDeltaEmitted"}}}},{"if":{"properties":{"type":{"const":"com.veryfront.tool-call.arguments.ended"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/ToolCallArgumentsEnded"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/ToolCallArgumentsEnded"}}}},{"if":{"properties":{"type":{"const":"com.veryfront.tool-call.refused"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/ToolCallRefused"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/ToolCallRefused"}}}},{"if":{"properties":{"type":{"const":"com.veryfront.tool-call.status.reported"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/ToolCallStatusReported"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/ToolCallStatusReported"}}}},{"if":{"properties":{"type":{"const":"com.veryfront.tool-call.result.recorded"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/ToolCallResultRecorded"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/ToolCallResultRecorded"}}}},{"if":{"properties":{"type":{"const":"com.veryfront.tool-call.result.submitted"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/ToolCallResultSubmitted"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/ToolCallResultSubmitted"}}}},{"if":{"properties":{"type":{"const":"com.veryfront.tool-call.result.delivery.failed"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/ToolCallResultDeliveryFailed"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/ToolCallResultDeliveryFailed"}}}},{"if":{"properties":{"type":{"const":"com.veryfront.model-call.input.captured"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/ModelCallInputCaptured"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/ModelCallInputCaptured"}},"required":["modelcallid"]}},{"if":{"properties":{"type":{"const":"com.veryfront.model-call.usage.recorded"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/ModelCallUsageRecorded"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/ModelCallUsageRecorded"}},"required":["modelcallid"]}},{"if":{"properties":{"type":{"const":"com.veryfront.input-request.created"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/InputRequestCreated"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/InputRequestCreated"}}}},{"if":{"properties":{"type":{"const":"com.veryfront.input-request.updated"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/InputRequestUpdated"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/InputRequestUpdated"}}}},{"if":{"properties":{"type":{"const":"com.veryfront.message.text.started"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/MessageTextStarted"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/MessageTextStarted"}}}},{"if":{"properties":{"type":{"const":"com.veryfront.message.text.delta.emitted"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/MessageTextDeltaEmitted"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/MessageTextDeltaEmitted"}}}},{"if":{"properties":{"type":{"const":"com.veryfront.message.text.ended"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/MessageTextEnded"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/MessageTextEnded"}}}},{"if":{"properties":{"type":{"const":"com.veryfront.message.reasoning.started"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/MessageReasoningStarted"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/MessageReasoningStarted"}}}},{"if":{"properties":{"type":{"const":"com.veryfront.message.reasoning.delta.emitted"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/MessageReasoningDeltaEmitted"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/MessageReasoningDeltaEmitted"}}}},{"if":{"properties":{"type":{"const":"com.veryfront.message.reasoning.ended"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/MessageReasoningEnded"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/MessageReasoningEnded"}}}},{"if":{"properties":{"type":{"const":"com.veryfront.message.url.referenced"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/MessageUrlReferenced"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/MessageUrlReferenced"}}}},{"if":{"properties":{"type":{"const":"com.veryfront.message.document.referenced"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/MessageDocumentReferenced"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/MessageDocumentReferenced"}}}},{"if":{"properties":{"type":{"const":"com.veryfront.message.file.attached"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/MessageFileAttached"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/MessageFileAttached"}}}},{"if":{"properties":{"type":{"const":"com.veryfront.stream.heartbeat.emitted"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/StreamHeartbeatEmitted"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/StreamHeartbeatEmitted"}}}},{"if":{"properties":{"type":{"const":"com.veryfront.stream.closed"}},"required":["type"]},"then":{"properties":{"dataschema":{"const":"urn:veryfront:run-events:target:payloads:1#/$defs/StreamClosed"},"data":{"$ref":"urn:veryfront:run-events:target:payloads:1#/$defs/StreamClosed"}}}},{"if":{"properties":{"type":{"const":"com.veryfront.model-call.usage.recorded"},"data":{"properties":{"scope":{"const":"attempt"}},"required":["scope"]}},"required":["type","data"]},"then":{"required":["attemptid"]}},{"if":{"properties":{"type":{"const":"com.veryfront.model-call.usage.recorded"},"data":{"properties":{"scope":{"const":"call"}},"required":["scope"]}},"required":["type","data"]},"then":{"not":{"required":["attemptid"]}}},{"if":{"properties":{"type":{"enum":["com.veryfront.stream.heartbeat.emitted","com.veryfront.stream.closed"]}},"required":["type"]},"then":{"not":{"required":["recordedat"]}}},{"not":{"required":["vfversion"]}},{"not":{"required":["extensions"]}},{"not":{"required":["data_base64"]}},{"not":{"required":["metadata"]}},{"not":{"required":["event_id"]}},{"not":{"required":["event_type"]}},{"not":{"required":["payload"]}},{"not":{"required":["kind"]}},{"not":{"required":["legacy"]}},{"not":{"required":["modelcontextid"]}}]},"x-agent-event-schema-by-type":{"com.veryfront.run.requested":"urn:veryfront:run-events:target:payloads:1#/$defs/RunRequested","com.veryfront.run.enqueued":"urn:veryfront:run-events:target:payloads:1#/$defs/RunEnqueued","com.veryfront.run.started":"urn:veryfront:run-events:target:payloads:1#/$defs/RunStarted","com.veryfront.run.succeeded":"urn:veryfront:run-events:target:payloads:1#/$defs/RunSucceeded","com.veryfront.run.failed":"urn:veryfront:run-events:target:payloads:1#/$defs/RunFailed","com.veryfront.run.cancelled":"urn:veryfront:run-events:target:payloads:1#/$defs/RunCancelled","com.veryfront.run.log.captured":"urn:veryfront:run-events:target:payloads:1#/$defs/RunLogCaptured","com.veryfront.child-run.reported":"urn:veryfront:run-events:target:payloads:1#/$defs/ChildRunReported","com.veryfront.step.started":"urn:veryfront:run-events:target:payloads:1#/$defs/StepStarted","com.veryfront.step.succeeded":"urn:veryfront:run-events:target:payloads:1#/$defs/StepSucceeded","com.veryfront.step.failed":"urn:veryfront:run-events:target:payloads:1#/$defs/StepFailed","com.veryfront.step.cancelled":"urn:veryfront:run-events:target:payloads:1#/$defs/StepCancelled","com.veryfront.step.ended":"urn:veryfront:run-events:target:payloads:1#/$defs/StepEnded","com.veryfront.tool-call.started":"urn:veryfront:run-events:target:payloads:1#/$defs/ToolCallStarted","com.veryfront.tool-call.arguments.delta.emitted":"urn:veryfront:run-events:target:payloads:1#/$defs/ToolCallArgumentsDeltaEmitted","com.veryfront.tool-call.arguments.ended":"urn:veryfront:run-events:target:payloads:1#/$defs/ToolCallArgumentsEnded","com.veryfront.tool-call.refused":"urn:veryfront:run-events:target:payloads:1#/$defs/ToolCallRefused","com.veryfront.tool-call.status.reported":"urn:veryfront:run-events:target:payloads:1#/$defs/ToolCallStatusReported","com.veryfront.tool-call.result.recorded":"urn:veryfront:run-events:target:payloads:1#/$defs/ToolCallResultRecorded","com.veryfront.tool-call.result.submitted":"urn:veryfront:run-events:target:payloads:1#/$defs/ToolCallResultSubmitted","com.veryfront.tool-call.result.delivery.failed":"urn:veryfront:run-events:target:payloads:1#/$defs/ToolCallResultDeliveryFailed","com.veryfront.model-call.input.captured":"urn:veryfront:run-events:target:payloads:1#/$defs/ModelCallInputCaptured","com.veryfront.model-call.usage.recorded":"urn:veryfront:run-events:target:payloads:1#/$defs/ModelCallUsageRecorded","com.veryfront.input-request.created":"urn:veryfront:run-events:target:payloads:1#/$defs/InputRequestCreated","com.veryfront.input-request.updated":"urn:veryfront:run-events:target:payloads:1#/$defs/InputRequestUpdated","com.veryfront.message.text.started":"urn:veryfront:run-events:target:payloads:1#/$defs/MessageTextStarted","com.veryfront.message.text.delta.emitted":"urn:veryfront:run-events:target:payloads:1#/$defs/MessageTextDeltaEmitted","com.veryfront.message.text.ended":"urn:veryfront:run-events:target:payloads:1#/$defs/MessageTextEnded","com.veryfront.message.reasoning.started":"urn:veryfront:run-events:target:payloads:1#/$defs/MessageReasoningStarted","com.veryfront.message.reasoning.delta.emitted":"urn:veryfront:run-events:target:payloads:1#/$defs/MessageReasoningDeltaEmitted","com.veryfront.message.reasoning.ended":"urn:veryfront:run-events:target:payloads:1#/$defs/MessageReasoningEnded","com.veryfront.message.url.referenced":"urn:veryfront:run-events:target:payloads:1#/$defs/MessageUrlReferenced","com.veryfront.message.document.referenced":"urn:veryfront:run-events:target:payloads:1#/$defs/MessageDocumentReferenced","com.veryfront.message.file.attached":"urn:veryfront:run-events:target:payloads:1#/$defs/MessageFileAttached","com.veryfront.stream.heartbeat.emitted":"urn:veryfront:run-events:target:payloads:1#/$defs/StreamHeartbeatEmitted","com.veryfront.stream.closed":"urn:veryfront:run-events:target:payloads:1#/$defs/StreamClosed"},"x-agent-event-payload-schemas":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"urn:veryfront:run-events:target:payloads:1","title":"Agent Events Protocol target payloads","description":"Working draft portable payload contracts. com.veryfront is a publisher namespace. Select exactly one root definition using envelope.type; data has no duplicate type. Existing source schemas remain migration evidence, not this target.","x-profile":"portable-public-core","x-event-count":36,"x-payload-selection":"Envelope type selects the x-event-type definition. The bundle itself is not a payload union.","x-excluded-private-events":["com.veryfront.run.authorization.sealed","com.veryfront.run.billing.mode.retained","com.veryfront.run.billing.usage.retained","com.veryfront.run.context.compacted","com.veryfront.run.dispatch.accepted","com.veryfront.run.dispatch.requested","com.veryfront.run.input.uploads.sealed","com.veryfront.run.provider.replay.boundary.recorded","com.veryfront.run.provider.replay.boundary.required","com.veryfront.run.provider.replay.checkpointed","com.veryfront.run.runtime.owner.changed","com.veryfront.run.runtime.retry.recorded","com.veryfront.run.tool.exposure.checkpointed"],"x-excluded-synchronization-events":["com.veryfront.messages.snapshot.emitted","com.veryfront.shared-state.delta.emitted","com.veryfront.shared-state.snapshot.emitted"],"$defs":{"JsonValue":{"anyOf":[{"type":"null"},{"type":"boolean"},{"type":"number"},{"type":"string"},{"type":"array","items":{"$ref":"#/$defs/JsonValue"}},{"$ref":"#/$defs/JsonObject"}]},"JsonObject":{"type":"object","additionalProperties":{"$ref":"#/$defs/JsonValue"}},"Extensions":{"type":"object","propertyNames":{"type":"string","minLength":1,"format":"uri"},"additionalProperties":{"$ref":"#/$defs/JsonObject"},"description":"Optional producer-owned absolute URI namespaces, such as https://example.test/extensions or urn:org.example:telemetry. Each value is a JSON object; core fields remain closed. Publishing extensions still requires authorization."},"ErrorInfo":{"type":"object","properties":{"code":{"type":"string","minLength":1},"message":{"type":"string"}},"required":[],"additionalProperties":false,"minProperties":1},"ModelDescriptor":{"type":"object","properties":{"provider":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["provider","name"],"additionalProperties":false},"ModelInput":{"oneOf":[{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/$defs/JsonValue"}},"tools":{"type":"array","items":{"$ref":"#/$defs/JsonValue"}},"parameters":{"$ref":"#/$defs/JsonObject"}},"required":["messages"],"additionalProperties":false},{"type":"object","properties":{"redacted":{"const":true}},"required":["redacted"],"additionalProperties":false}],"description":"Full captured model input or an explicit authorized redaction. Redaction is not missing-input recovery."},"TokenUsage":{"type":"object","properties":{"input":{"type":"integer","minimum":0},"output":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0},"cacheRead":{"type":"integer","minimum":0},"cacheWrite":{"type":"integer","minimum":0},"reasoning":{"type":"integer","minimum":0}},"required":["input","output"],"additionalProperties":false,"description":"Input/output token counts are the base counters. cacheRead and cacheWrite are subsets of input; reasoning is a subset of output. These counters are not additive charges and must not be added to input/output or total. Optional total is actually reported, not synthesized. Cross-field subset bounds are semantic conformance checks.","x-semantic-constraints":["cacheRead <= input when present","cacheWrite <= input when present","reasoning <= output when present"]},"InputField":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"required":{"type":"boolean"},"options":{"type":"array","items":{"$ref":"#/$defs/JsonValue"}}},"required":["name","type"],"additionalProperties":false},"InputRequestSnapshot":{"type":"object","properties":{"id":{"type":"string","minLength":1},"status":{"enum":["open","submitted","cancelled","expired"]},"title":{"type":"string","minLength":1},"description":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/$defs/InputField"},"minItems":1},"schema":{"$ref":"#/$defs/JsonObject"},"response":{"$ref":"#/$defs/JsonValue"},"expiresAt":{"type":"string","format":"date-time"},"toolCallId":{"type":"string","minLength":1,"description":"Exact logical tool-call occurrence that created the request, when known. Immutable; provider-local IDs do not establish this relation."}},"required":["id","status"],"additionalProperties":false},"InputRequestReference":{"type":"object","properties":{"id":{"type":"string","minLength":1},"uri":{"type":"string","format":"uri"},"toolCallId":{"type":"string","minLength":1,"description":"Exact logical tool-call occurrence that created the request, when known. Immutable; provider-local IDs do not establish this relation."}},"required":["id","uri"],"additionalProperties":false},"InputRequestChanges":{"type":"object","properties":{"status":{"enum":["open","submitted","cancelled","expired"]},"title":{"type":"string","minLength":1},"description":{"type":["string","null"]},"fields":{"type":"array","items":{"$ref":"#/$defs/InputField"},"minItems":1},"schema":{"$ref":"#/$defs/JsonObject"},"response":{"$ref":"#/$defs/JsonValue"},"expiresAt":{"type":["string","null"],"format":"date-time"}},"required":[],"additionalProperties":false,"minProperties":1},"ChildRun":{"type":"object","properties":{"id":{"type":"string","minLength":1},"status":{"enum":["queued","running","waiting","succeeded","failed","cancelled","unknown"]},"kind":{"type":"string","minLength":1},"conversationId":{"type":"string","minLength":1}},"required":["id","status"],"additionalProperties":false},"RunRequested":{"type":"object","properties":{"extensions":{"$ref":"#/$defs/Extensions"}},"required":[],"additionalProperties":false,"title":"com.veryfront.run.requested","x-event-type":"com.veryfront.run.requested","x-envelope-required":["runid"],"x-semantics":"Owning run lifecycle fact. The envelope runid is authoritative. No execution snapshot or internal runtime protocol is required.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data."},"RunEnqueued":{"type":"object","properties":{"extensions":{"$ref":"#/$defs/Extensions"}},"required":[],"additionalProperties":false,"title":"com.veryfront.run.enqueued","x-event-type":"com.veryfront.run.enqueued","x-envelope-required":["runid"],"x-semantics":"Owning run lifecycle fact. The envelope runid is authoritative. No execution snapshot or internal runtime protocol is required.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data."},"RunStarted":{"type":"object","properties":{"extensions":{"$ref":"#/$defs/Extensions"}},"required":[],"additionalProperties":false,"title":"com.veryfront.run.started","x-event-type":"com.veryfront.run.started","x-envelope-required":["runid"],"x-semantics":"Owning run lifecycle fact. The envelope runid is authoritative. No execution snapshot or internal runtime protocol is required.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data."},"RunSucceeded":{"type":"object","properties":{"extensions":{"$ref":"#/$defs/Extensions"}},"required":[],"additionalProperties":false,"title":"com.veryfront.run.succeeded","x-event-type":"com.veryfront.run.succeeded","x-envelope-required":["runid"],"x-semantics":"Owning run lifecycle fact. The envelope runid is authoritative. No execution snapshot or internal runtime protocol is required.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data."},"RunFailed":{"type":"object","properties":{"error":{"$ref":"#/$defs/ErrorInfo"},"extensions":{"$ref":"#/$defs/Extensions"}},"required":[],"additionalProperties":false,"title":"com.veryfront.run.failed","x-event-type":"com.veryfront.run.failed","x-envelope-required":["runid"],"x-semantics":"Owning failed run transition; optional error details do not classify an unrelated transport or delivery error.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data."},"RunCancelled":{"type":"object","properties":{"reason":{"type":"string","minLength":1},"extensions":{"$ref":"#/$defs/Extensions"}},"required":[],"additionalProperties":false,"title":"com.veryfront.run.cancelled","x-event-type":"com.veryfront.run.cancelled","x-envelope-required":["runid"],"x-semantics":"Owning cancelled run transition. A cancellation reason is optional and is not synthesized from every run error.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data."},"RunLogCaptured":{"type":"object","properties":{"text":{"type":"string"},"extensions":{"$ref":"#/$defs/Extensions"}},"required":["text"],"additionalProperties":false,"title":"com.veryfront.run.log.captured","x-event-type":"com.veryfront.run.log.captured","x-envelope-required":["runid"],"x-semantics":"Captured log string. No line splitting, severity or timestamp is invented.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data."},"ChildRunReported":{"type":"object","properties":{"childRun":{"$ref":"#/$defs/ChildRun"},"toolCallId":{"type":"string","minLength":1},"extensions":{"$ref":"#/$defs/Extensions"}},"required":["childRun"],"additionalProperties":false,"title":"com.veryfront.child-run.reported","x-event-type":"com.veryfront.child-run.reported","x-envelope-required":["runid"],"x-semantics":"Reports a real association to the recipient run named by envelope runid. It does not create a run or synthesize creator/parent ancestry. unknown must be explicitly reported; missing/unrecognized status is not defaulted.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data."},"StepStarted":{"type":"object","properties":{"stepId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"extensions":{"$ref":"#/$defs/Extensions"}},"required":["stepId"],"additionalProperties":false,"title":"com.veryfront.step.started","x-event-type":"com.veryfront.step.started","x-envelope-required":["runid"],"x-semantics":"Exact producer-owned step occurrence scoped to the envelope runid. Outcome belongs to the owning step transition; ended does not assert a classified outcome.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data."},"StepSucceeded":{"type":"object","properties":{"stepId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"extensions":{"$ref":"#/$defs/Extensions"}},"required":["stepId"],"additionalProperties":false,"title":"com.veryfront.step.succeeded","x-event-type":"com.veryfront.step.succeeded","x-envelope-required":["runid"],"x-semantics":"Exact producer-owned step occurrence scoped to the envelope runid. Outcome belongs to the owning step transition; ended does not assert a classified outcome.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data."},"StepFailed":{"type":"object","properties":{"stepId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"error":{"$ref":"#/$defs/ErrorInfo"},"extensions":{"$ref":"#/$defs/Extensions"}},"required":["stepId"],"additionalProperties":false,"title":"com.veryfront.step.failed","x-event-type":"com.veryfront.step.failed","x-envelope-required":["runid"],"x-semantics":"Exact producer-owned step occurrence scoped to the envelope runid. Outcome belongs to the owning step transition; ended does not assert a classified outcome.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data."},"StepCancelled":{"type":"object","properties":{"stepId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"reason":{"type":"string","minLength":1},"extensions":{"$ref":"#/$defs/Extensions"}},"required":["stepId"],"additionalProperties":false,"title":"com.veryfront.step.cancelled","x-event-type":"com.veryfront.step.cancelled","x-envelope-required":["runid"],"x-semantics":"Exact producer-owned step occurrence scoped to the envelope runid. Outcome belongs to the owning step transition; ended does not assert a classified outcome.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data."},"StepEnded":{"type":"object","properties":{"stepId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"extensions":{"$ref":"#/$defs/Extensions"}},"required":["stepId"],"additionalProperties":false,"title":"com.veryfront.step.ended","x-event-type":"com.veryfront.step.ended","x-envelope-required":["runid"],"x-semantics":"Exact producer-owned step occurrence scoped to the envelope runid. Outcome belongs to the owning step transition; ended does not assert a classified outcome.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data."},"ToolCallStarted":{"type":"object","properties":{"toolCallId":{"type":"string","minLength":1},"messageId":{"type":"string","minLength":1},"input":{"$ref":"#/$defs/JsonValue"},"extensions":{"$ref":"#/$defs/Extensions"},"toolName":{"type":"string","minLength":1}},"required":["toolCallId","toolName"],"additionalProperties":false,"title":"com.veryfront.tool-call.started","x-event-type":"com.veryfront.tool-call.started","x-envelope-required":[],"x-semantics":"Introduces an exact public tool-call occurrence. Introduction and input assembly do not prove tool execution.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data."},"ToolCallArgumentsDeltaEmitted":{"type":"object","properties":{"toolCallId":{"type":"string","minLength":1},"delta":{"type":"string"},"extensions":{"$ref":"#/$defs/Extensions"}},"required":["toolCallId","delta"],"additionalProperties":false,"title":"com.veryfront.tool-call.arguments.delta.emitted","x-event-type":"com.veryfront.tool-call.arguments.delta.emitted","x-envelope-required":[],"x-semantics":"Argument string fragment for the same public toolCallId. It is not a tool output or execution outcome.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data."},"ToolCallArgumentsEnded":{"type":"object","properties":{"toolCallId":{"type":"string","minLength":1},"input":{"$ref":"#/$defs/JsonValue"},"extensions":{"$ref":"#/$defs/Extensions"}},"required":["toolCallId"],"additionalProperties":false,"title":"com.veryfront.tool-call.arguments.ended","x-event-type":"com.veryfront.tool-call.arguments.ended","x-envelope-required":[],"x-semantics":"Argument assembly ended. Optional input is included only when the completed value is known; no execution completion is inferred.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data."},"ToolCallRefused":{"type":"object","properties":{"toolCallId":{"type":"string","minLength":1},"reason":{"anyOf":[{"enum":["missing_integration_connection","permission_denied","budget_exhausted","invalid_input"]},{"type":"string","minLength":1,"format":"uri"}],"description":"Reported classified refusal code. Common codes or an absolute URI identifying a producer-defined code; arbitrary error text is not a code."},"integration":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"extensions":{"$ref":"#/$defs/Extensions"},"toolName":{"type":"string","minLength":1}},"required":["toolCallId","reason"],"additionalProperties":false,"title":"com.veryfront.tool-call.refused","x-event-type":"com.veryfront.tool-call.refused","x-envelope-required":[],"x-semantics":"Owning executor refused this exact call for the reported classified reason. It does not prove a provider attempt, a generic call end or run failure.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data."},"ToolCallStatusReported":{"type":"object","properties":{"toolCallId":{"type":"string","minLength":1},"status":{"enum":["introduced","argumentsReady","queued","running","waiting","succeeded","failed","cancelled","refused","unknown"]},"message":{"type":"string","minLength":1},"extensions":{"$ref":"#/$defs/Extensions"}},"required":["toolCallId","status"],"additionalProperties":false,"title":"com.veryfront.tool-call.status.reported","x-event-type":"com.veryfront.tool-call.status.reported","x-envelope-required":[],"x-semantics":"Explicit reported status for the exact call. Terminal execution statuses require owning execution evidence; unknown is never a default for missing/unrecognized source text.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data."},"ToolCallResultRecorded":{"type":"object","properties":{"toolCallId":{"type":"string","minLength":1},"output":{"$ref":"#/$defs/JsonValue"},"outputRedacted":{"const":true},"isError":{"type":"boolean"},"extensions":{"$ref":"#/$defs/Extensions"}},"required":["toolCallId"],"additionalProperties":false,"title":"com.veryfront.tool-call.result.recorded","x-event-type":"com.veryfront.tool-call.result.recorded","x-envelope-required":[],"x-semantics":"Exact call result recorded. Result recording/submission is not proof of execution success or receiver delivery. isError is included only when explicitly reported; unknown is omitted.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data.","oneOf":[{"required":["output"],"not":{"required":["outputRedacted"]}},{"required":["outputRedacted"],"not":{"required":["output"]}}]},"ToolCallResultSubmitted":{"type":"object","properties":{"toolCallId":{"type":"string","minLength":1},"output":{"$ref":"#/$defs/JsonValue"},"outputRedacted":{"const":true},"isError":{"type":"boolean"},"extensions":{"$ref":"#/$defs/Extensions"}},"required":["toolCallId"],"additionalProperties":false,"title":"com.veryfront.tool-call.result.submitted","x-event-type":"com.veryfront.tool-call.result.submitted","x-envelope-required":[],"x-semantics":"Exact call result submitted. Result recording/submission is not proof of execution success or receiver delivery. isError is included only when explicitly reported; unknown is omitted.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data.","oneOf":[{"required":["output"],"not":{"required":["outputRedacted"]}},{"required":["outputRedacted"],"not":{"required":["output"]}}]},"ToolCallResultDeliveryFailed":{"type":"object","properties":{"toolCallId":{"type":"string","minLength":1},"error":{"$ref":"#/$defs/ErrorInfo"},"extensions":{"$ref":"#/$defs/Extensions"}},"required":["toolCallId"],"additionalProperties":false,"title":"com.veryfront.tool-call.result.delivery.failed","x-event-type":"com.veryfront.tool-call.result.delivery.failed","x-envelope-required":[],"x-semantics":"The result delivery failed for this exact call; transport/receiver delivery failure does not establish tool execution failure or run failure.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data."},"ModelCallInputCaptured":{"type":"object","properties":{"model":{"$ref":"#/$defs/ModelDescriptor"},"input":{"$ref":"#/$defs/ModelInput"},"extensions":{"$ref":"#/$defs/Extensions"}},"required":["model","input"],"additionalProperties":false,"title":"com.veryfront.model-call.input.captured","x-event-type":"com.veryfront.model-call.input.captured","x-envelope-required":["modelcallid"],"x-semantics":"Captured model input linked by envelope modelcallid; attemptid is included only if the exact provider attempt is known. Provider-native input JSON is intentional data, not an AG-UI or Veryfront wrapper.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data."},"ModelCallUsageRecorded":{"type":"object","properties":{"model":{"$ref":"#/$defs/ModelDescriptor"},"tokens":{"$ref":"#/$defs/TokenUsage"},"durationMs":{"type":"number","minimum":0,"description":"Measured wall time for the stated scope: attempt dispatch to final response/error, or first call dispatch to final completion including retries and waits. Excludes preparation; omit when boundaries were not measured."},"extensions":{"$ref":"#/$defs/Extensions"},"scope":{"enum":["attempt","call"],"description":"Accounting scope. attempt requires exact envelope attemptid; call is an actual call aggregate and omits attemptid. Missing identity never selects a scope."}},"required":["model","tokens","scope"],"additionalProperties":false,"title":"com.veryfront.model-call.usage.recorded","x-event-type":"com.veryfront.model-call.usage.recorded","x-envelope-required":["modelcallid"],"x-semantics":"Reported token usage for an actual known attempt or call accounting bucket, selected by scope and linked by envelope modelcallid. Attempt scope additionally requires exact attemptid. Call aggregates and their constituent attempts are alternative accounting views and must not be added together. Unknown bucket or required counters prevents canonical publication; no provider attempt, call aggregate, total or billing value is invented.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data.","x-attempt-scope-envelope-required":["attemptid"]},"InputRequestCreated":{"type":"object","properties":{"inputRequest":{"oneOf":[{"$ref":"#/$defs/InputRequestSnapshot"},{"$ref":"#/$defs/InputRequestReference"}]},"extensions":{"$ref":"#/$defs/Extensions"}},"required":["inputRequest"],"additionalProperties":false,"title":"com.veryfront.input-request.created","x-event-type":"com.veryfront.input-request.created","x-envelope-required":[],"x-semantics":"Typed authorized snapshot or resolvable reference. Created snapshots show open initial state. Updated snapshots show authoritative after-state; updated references require a nonempty typed change set. Optional details may be absent/redacted, but ID and typed state/reference remain meaningful.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data.","allOf":[{"if":{"properties":{"inputRequest":{"required":["status"]}},"required":["inputRequest"]},"then":{"properties":{"inputRequest":{"properties":{"status":{"const":"open"}}}}}}]},"InputRequestUpdated":{"type":"object","properties":{"inputRequest":{"oneOf":[{"$ref":"#/$defs/InputRequestSnapshot"},{"$ref":"#/$defs/InputRequestReference"}]},"changes":{"$ref":"#/$defs/InputRequestChanges"},"extensions":{"$ref":"#/$defs/Extensions"}},"required":["inputRequest"],"additionalProperties":false,"title":"com.veryfront.input-request.updated","x-event-type":"com.veryfront.input-request.updated","x-envelope-required":[],"x-semantics":"Typed authorized snapshot or resolvable reference. Updated snapshots are the whole authoritative after-state and prohibit changes. Updated references require a nonempty typed change set. Optional details may be absent/redacted, but ID and typed state/reference remain meaningful.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data.","allOf":[{"if":{"properties":{"inputRequest":{"required":["uri"]}},"required":["inputRequest"]},"then":{"required":["changes"]},"else":{"not":{"required":["changes"]}}}]},"MessageTextStarted":{"type":"object","properties":{"messageId":{"type":"string","minLength":1},"contentId":{"type":"string","minLength":1},"role":{"enum":["assistant","user","system","developer","tool"]},"extensions":{"$ref":"#/$defs/Extensions"}},"required":["messageId","contentId"],"additionalProperties":false,"title":"com.veryfront.message.text.started","x-event-type":"com.veryfront.message.text.started","x-envelope-required":[],"x-semantics":"Exact message/content segment identity. Reasoning content is only explicitly publishable text; provider-native signed/redacted replay material is not rendered or reclassified. Redacted deltas retain identity without inventing text.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data."},"MessageTextDeltaEmitted":{"type":"object","properties":{"messageId":{"type":"string","minLength":1},"contentId":{"type":"string","minLength":1},"delta":{"type":"string"},"contentRedacted":{"const":true},"extensions":{"$ref":"#/$defs/Extensions"}},"required":["messageId","contentId"],"additionalProperties":false,"title":"com.veryfront.message.text.delta.emitted","x-event-type":"com.veryfront.message.text.delta.emitted","x-envelope-required":[],"x-semantics":"Exact message/content segment identity. Reasoning content is only explicitly publishable text; provider-native signed/redacted replay material is not rendered or reclassified. Redacted deltas retain identity without inventing text.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data.","oneOf":[{"required":["delta"],"not":{"required":["contentRedacted"]}},{"required":["contentRedacted"],"not":{"required":["delta"]}}]},"MessageTextEnded":{"type":"object","properties":{"messageId":{"type":"string","minLength":1},"contentId":{"type":"string","minLength":1},"extensions":{"$ref":"#/$defs/Extensions"}},"required":["messageId","contentId"],"additionalProperties":false,"title":"com.veryfront.message.text.ended","x-event-type":"com.veryfront.message.text.ended","x-envelope-required":[],"x-semantics":"Exact message/content segment identity. Reasoning content is only explicitly publishable text; provider-native signed/redacted replay material is not rendered or reclassified. Redacted deltas retain identity without inventing text.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data."},"MessageReasoningStarted":{"type":"object","properties":{"messageId":{"type":"string","minLength":1},"contentId":{"type":"string","minLength":1},"extensions":{"$ref":"#/$defs/Extensions"}},"required":["messageId","contentId"],"additionalProperties":false,"title":"com.veryfront.message.reasoning.started","x-event-type":"com.veryfront.message.reasoning.started","x-envelope-required":[],"x-semantics":"Exact message/content segment identity. Reasoning content is only explicitly publishable text; provider-native signed/redacted replay material is not rendered or reclassified. Redacted deltas retain identity without inventing text.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data."},"MessageReasoningDeltaEmitted":{"type":"object","properties":{"messageId":{"type":"string","minLength":1},"contentId":{"type":"string","minLength":1},"delta":{"type":"string"},"contentRedacted":{"const":true},"extensions":{"$ref":"#/$defs/Extensions"}},"required":["messageId","contentId"],"additionalProperties":false,"title":"com.veryfront.message.reasoning.delta.emitted","x-event-type":"com.veryfront.message.reasoning.delta.emitted","x-envelope-required":[],"x-semantics":"Exact message/content segment identity. Reasoning content is only explicitly publishable text; provider-native signed/redacted replay material is not rendered or reclassified. Redacted deltas retain identity without inventing text.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data.","oneOf":[{"required":["delta"],"not":{"required":["contentRedacted"]}},{"required":["contentRedacted"],"not":{"required":["delta"]}}]},"MessageReasoningEnded":{"type":"object","properties":{"messageId":{"type":"string","minLength":1},"contentId":{"type":"string","minLength":1},"extensions":{"$ref":"#/$defs/Extensions"}},"required":["messageId","contentId"],"additionalProperties":false,"title":"com.veryfront.message.reasoning.ended","x-event-type":"com.veryfront.message.reasoning.ended","x-envelope-required":[],"x-semantics":"Exact message/content segment identity. Reasoning content is only explicitly publishable text; provider-native signed/redacted replay material is not rendered or reclassified. Redacted deltas retain identity without inventing text.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data."},"MessageUrlReferenced":{"type":"object","properties":{"messageId":{"type":"string","minLength":1},"contentId":{"type":"string","minLength":1},"sourceId":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"},"title":{"type":"string","minLength":1},"extensions":{"$ref":"#/$defs/Extensions"}},"required":["messageId","sourceId","url"],"additionalProperties":false,"title":"com.veryfront.message.url.referenced","x-event-type":"com.veryfront.message.url.referenced","x-envelope-required":[],"x-semantics":"Reference belongs to this exact message. Optional contentId scopes the segment; sourceId/URL cannot substitute for message ownership.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data."},"MessageDocumentReferenced":{"type":"object","properties":{"messageId":{"type":"string","minLength":1},"contentId":{"type":"string","minLength":1},"sourceId":{"type":"string","minLength":1},"mediaType":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"filename":{"type":"string","minLength":1},"extensions":{"$ref":"#/$defs/Extensions"}},"required":["messageId","sourceId","mediaType"],"additionalProperties":false,"title":"com.veryfront.message.document.referenced","x-event-type":"com.veryfront.message.document.referenced","x-envelope-required":[],"x-semantics":"Document reference belongs to this exact message. Optional contentId scopes the segment; source identity is separate from message identity.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data."},"MessageFileAttached":{"type":"object","properties":{"messageId":{"type":"string","minLength":1},"contentId":{"type":"string","minLength":1},"mediaType":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"},"filename":{"type":"string","minLength":1},"extensions":{"$ref":"#/$defs/Extensions"}},"required":["messageId","mediaType"],"additionalProperties":false,"title":"com.veryfront.message.file.attached","x-event-type":"com.veryfront.message.file.attached","x-envelope-required":[],"x-semantics":"Attachment descriptor belongs to this exact message. Optional contentId scopes the segment. Omitted URL/filename may reflect authorized descriptor-only disclosure; no missing locator is fabricated.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data."},"StreamHeartbeatEmitted":{"type":"object","properties":{"extensions":{"$ref":"#/$defs/Extensions"}},"required":[],"additionalProperties":false,"title":"com.veryfront.stream.heartbeat.emitted","x-event-type":"com.veryfront.stream.heartbeat.emitted","x-envelope-required":[],"x-semantics":"Optional liveness notification. It carries no execution transition, durable cursor, provider attempt or completion acknowledgement.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data."},"StreamClosed":{"type":"object","properties":{"reason":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"},{"type":"string","minLength":1,"format":"uri"}],"description":"Nonempty closure reason code. integration_auth_required is valid only when that actual stream closure is observed; waiting alone does not establish closure."},"extensions":{"$ref":"#/$defs/Extensions"}},"required":["reason"],"additionalProperties":false,"title":"com.veryfront.stream.closed","x-event-type":"com.veryfront.stream.closed","x-envelope-required":[],"x-semantics":"Optional delivery notification that this stream was observed to close for the reported reason. It establishes no paused, cancelled, succeeded or failed execution outcome. Legacy run.paused or RUN_PARKED alone is insufficient source evidence.","x-data-omission":"Only declared optional fields may be omitted. Unknown required evidence is not defaulted; redaction alternatives, where present, are explicit. This is not a type-only fallback for malformed source data."}}}},"TargetRunEventsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TargetRunEvent"}},"page_info":{"type":"object","properties":{"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["next_cursor","has_more"],"additionalProperties":false}},"required":["data","page_info"],"additionalProperties":false},"AppendRunEventsResponse":{"type":"object","properties":{"latest_event_id":{"type":"integer","minimum":0},"latest_external_event_sequence":{"type":"integer","minimum":0},"appended_count":{"type":"integer","minimum":0},"acknowledged_event_ids":{"type":"array","items":{"type":"integer","minimum":1,"maximum":9007199254740991},"maxItems":100},"recovery_checkpoint":{"type":"object","properties":{"snapshot_event_id":{"type":"integer","minimum":1,"maximum":9007199254740991},"snapshot_external_sequence":{"type":"integer","minimum":1,"maximum":9007199254740991},"checkpoint_event_id":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["snapshot_event_id","snapshot_external_sequence","checkpoint_event_id"],"additionalProperties":false},"run_id":{"type":"string","format":"uuid"},"model_call_captures":{"type":"array","items":{"type":"object","properties":{"event_id":{"type":"string","minLength":1},"model_call_id":{"type":"string","format":"uuid"},"run_id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"}},"required":["event_id","model_call_id","run_id","project_id"],"additionalProperties":false},"minItems":1,"maxItems":100},"tool_call_admissions":{"type":"array","items":{"type":"object","properties":{"occurrence_id":{"type":"string","format":"uuid"},"admission_event_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"start_event_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"tool_call_id":{"type":"string","minLength":1},"public_tool_call_id":{"type":"string","minLength":1},"run_id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"}},"required":["occurrence_id","admission_event_id","start_event_id","tool_call_id","public_tool_call_id","run_id","project_id"],"additionalProperties":false},"minItems":1,"maxItems":100}},"required":["latest_event_id","appended_count","run_id"]},"AppendRunEventsRequest":{"type":"object","properties":{"expected_previous_event_id":{"type":["integer","null"],"minimum":0},"expected_previous_external_event_sequence":{"type":["integer","null"],"minimum":0},"external_sequence_scope":{"type":"string","enum":["agent","publish_only"]},"events":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/TextMessageStartPayload"},{"$ref":"#/components/schemas/TextMessageContentPayload"},{"$ref":"#/components/schemas/TextMessageEndPayload"},{"$ref":"#/components/schemas/ToolCallStartPayload"},{"$ref":"#/components/schemas/ToolCallArgsPayload"},{"$ref":"#/components/schemas/ToolCallChunkPayload"},{"$ref":"#/components/schemas/ToolCallEndPayload"},{"$ref":"#/components/schemas/ToolCallResultPayload"},{"$ref":"#/components/schemas/MessagesSnapshotPayload"},{"$ref":"#/components/schemas/StateSnapshotPayload"},{"$ref":"#/components/schemas/StateDeltaPayload"},{"$ref":"#/components/schemas/RunStartedPayload"},{"$ref":"#/components/schemas/RunFinishedPayload"},{"$ref":"#/components/schemas/RunErrorPayload"},{"$ref":"#/components/schemas/StepStartedPayload"},{"$ref":"#/components/schemas/StepFinishedPayload"},{"$ref":"#/components/schemas/ReasoningStartPayload"},{"$ref":"#/components/schemas/ReasoningMessageStartPayload"},{"$ref":"#/components/schemas/ReasoningMessageContentPayload"},{"$ref":"#/components/schemas/ReasoningMessageEndPayload"},{"$ref":"#/components/schemas/ReasoningContentPayload"},{"$ref":"#/components/schemas/ReasoningEndPayload"},{"$ref":"#/components/schemas/ActivitySnapshotPayload"},{"$ref":"#/components/schemas/ActivityDeltaPayload"},{"$ref":"#/components/schemas/ToolCallStatusChangedPayload"},{"$ref":"#/components/schemas/InputRequestCreatedPayload"},{"$ref":"#/components/schemas/InputRequestUpdatedPayload"},{"$ref":"#/components/schemas/ChildRunStatusChangedPayload"},{"$ref":"#/components/schemas/ModelCallCompletedPayload"},{"$ref":"#/components/schemas/RunParkedPayload"},{"$ref":"#/components/schemas/RunLogCapturedPayload"},{"$ref":"#/components/schemas/StreamHeartbeatEmittedPayload"},{"$ref":"#/components/schemas/UrlCitedPayload"},{"$ref":"#/components/schemas/DocumentCitedPayload"},{"$ref":"#/components/schemas/FileAttachedPayload"},{"$ref":"#/components/schemas/FilesChangedPayload"},{"$ref":"#/components/schemas/RuntimeEventRecordedPayload"},{"$ref":"#/components/schemas/AgentRunContextCompactedPayload"},{"$ref":"#/components/schemas/AgentRunControlPlaneDispatchAcceptedPayload"},{"$ref":"#/components/schemas/AgentRunControlPlaneDispatchReceiptPayload"},{"$ref":"#/components/schemas/AgentRunToolExposureCheckpointedPayload"},{"$ref":"#/components/schemas/AgentRunToolExposureCheckpointPayload"},{"$ref":"#/components/schemas/AgentRunProviderReplayCheckpointedPayload"},{"$ref":"#/components/schemas/AgentRunProviderReplayCheckpointPayload"},{"$ref":"#/components/schemas/AgentRunModelCallContextRecordedPayload"},{"$ref":"#/components/schemas/AgentRunModelCallContextPayload"}]},"minItems":1,"maxItems":100},"tool_call_starts":{"type":"array","items":{"type":"object","properties":{"occurrence_id":{"type":"string","format":"uuid"},"event_index":{"type":"integer","minimum":0,"maximum":99}},"required":["occurrence_id","event_index"],"additionalProperties":false},"minItems":1,"maxItems":100},"runtime_observations":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"observations":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["execution_entry"]},"occurrence_id":{"type":"string","format":"uuid"},"event_index":{"type":"integer","minimum":0,"maximum":99}},"required":["kind","occurrence_id","event_index"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["step_started"]},"step_id":{"type":"string","format":"uuid"},"event_index":{"type":"integer","minimum":0,"maximum":99}},"required":["kind","step_id","event_index"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["step_ended"]},"step_id":{"type":"string","format":"uuid"},"event_index":{"type":"integer","minimum":0,"maximum":99}},"required":["kind","step_id","event_index"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["step_message"]},"step_id":{"type":"string","format":"uuid"},"message_span_id":{"type":"string","format":"uuid"},"event_index":{"type":"integer","minimum":0,"maximum":99}},"required":["kind","step_id","message_span_id","event_index"],"additionalProperties":false}]},"minItems":1,"maxItems":100}},"required":["version","observations"],"additionalProperties":false},"recovery_checkpoint":{"type":"object","properties":{"snapshot_event_index":{"type":"integer","minimum":0,"maximum":99},"pending_model_turn_message_ids":{"type":"array","items":{"type":"string","minLength":1,"maxLength":256},"maxItems":100},"snapshot":{"type":"object","additionalProperties":{}}},"required":["snapshot_event_index","pending_model_turn_message_ids","snapshot"],"additionalProperties":false}},"required":["events"]},"ModelCallInputReference":{"type":"object","properties":{"event_id":{"type":"string","pattern":"^[1-9]\\d{0,18}$"},"source":{"type":"string","minLength":1}},"required":["event_id","source"],"additionalProperties":false},"ModelCallInputReferencesPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ModelCallInputReference"}},"page_info":{"type":"object","properties":{"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["next_cursor","has_more"],"additionalProperties":false}},"required":["data","page_info"],"additionalProperties":false},"ModelCallUsageReference":{"type":"object","properties":{"event_id":{"type":"string","format":"uuid"},"source":{"type":"string","minLength":1}},"required":["event_id","source"],"additionalProperties":false},"ModelCallUsageReferencesPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ModelCallUsageReference"}},"page_info":{"type":"object","properties":{"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["next_cursor","has_more"],"additionalProperties":false}},"required":["data","page_info"],"additionalProperties":false},"RunEventSummary":{"type":"object","properties":{"run_id":{"type":"string","format":"uuid"},"total":{"type":"integer","minimum":0},"error_count":{"type":"integer","minimum":0},"first_event_id":{"type":["integer","null"],"minimum":0},"last_event_id":{"type":["integer","null"],"minimum":0},"first_event_at":{"type":["string","null"],"format":"date-time"},"last_event_at":{"type":["string","null"],"format":"date-time"},"by_event_class":{"type":"object","properties":{"fact":{"type":"integer","minimum":0},"delta":{"type":"integer","minimum":0}},"required":["fact","delta"],"additionalProperties":false},"by_event_type":{"type":"array","items":{"type":"object","properties":{"event_type":{"type":"string","minLength":1},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"count":{"type":"integer","minimum":0},"error_count":{"type":"integer","minimum":0}},"required":["event_type","event_class","count","error_count"],"additionalProperties":false}},"buckets":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"count":{"type":"integer","minimum":0},"error_count":{"type":"integer","minimum":0}},"required":["start","end","count","error_count"],"additionalProperties":false},"description":"Half-open time buckets `[start, end)` covering `first_event_at` through `last_event_at + 1 ms`. Boundaries use whole milliseconds; widths differ by at most 1 ms. Boundaries can be passed directly as the event-list `start` and `end` filters. The bucket count cannot exceed the span in milliseconds. Empty if no events match."}},"required":["run_id","total","error_count","first_event_id","last_event_id","first_event_at","last_event_at","by_event_class","by_event_type","buckets"],"additionalProperties":false},"RunSnapshotEvent":{"oneOf":[{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["RUN_STARTED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/RunStartedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["RUN_STARTED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["RUN_FINISHED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/RunFinishedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["RUN_FINISHED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["RUN_ERROR"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/RunErrorPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["RUN_ERROR"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["TEXT_MESSAGE_START"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/TextMessageStartPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT_MESSAGE_START"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["TEXT_MESSAGE_CONTENT"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/TextMessageContentPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT_MESSAGE_CONTENT"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["TEXT_MESSAGE_END"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/TextMessageEndPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["TEXT_MESSAGE_END"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["TOOL_CALL_START"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ToolCallStartPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["TOOL_CALL_START"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["TOOL_CALL_ARGS"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ToolCallArgsPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["TOOL_CALL_ARGS"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["TOOL_CALL_CHUNK"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ToolCallChunkPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["TOOL_CALL_CHUNK"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["TOOL_CALL_END"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ToolCallEndPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["TOOL_CALL_END"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["TOOL_CALL_RESULT"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ToolCallResultPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["TOOL_CALL_RESULT"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["STATE_SNAPSHOT"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/StateSnapshotPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["STATE_SNAPSHOT"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["STATE_DELTA"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/StateDeltaPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["STATE_DELTA"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["MESSAGES_SNAPSHOT"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/MessagesSnapshotPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["MESSAGES_SNAPSHOT"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["STEP_STARTED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/StepStartedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["STEP_STARTED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["STEP_FINISHED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/StepFinishedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["STEP_FINISHED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["REASONING_START"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ReasoningStartPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["REASONING_START"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["REASONING_MESSAGE_START"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ReasoningMessageStartPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["REASONING_MESSAGE_START"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["REASONING_MESSAGE_CONTENT"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ReasoningMessageContentPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["REASONING_MESSAGE_CONTENT"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["REASONING_MESSAGE_END"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ReasoningMessageEndPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["REASONING_MESSAGE_END"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["REASONING_CONTENT"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ReasoningContentPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["REASONING_CONTENT"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["REASONING_END"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ReasoningEndPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["REASONING_END"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["ACTIVITY_SNAPSHOT"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ActivitySnapshotPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["ACTIVITY_SNAPSHOT"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["ACTIVITY_DELTA"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ActivityDeltaPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["ACTIVITY_DELTA"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_TASK_INPUT_ACCEPTED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunTaskInputAcceptedPayload"},{"$ref":"#/components/schemas/AgentRunTaskInputAcceptedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_TASK_INPUT_ADMITTED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunTaskInputAdmittedPayload"},{"$ref":"#/components/schemas/AgentRunTaskInputAdmittedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_AUTHORIZATION_SEALED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunAuthorizationSealedPayload"},{"$ref":"#/components/schemas/AgentRunAuthorizationSealedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_REQUEST_ENQUEUED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunRequestEnqueuedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_REQUEST_ENQUEUED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_DEFAULT_CHAT_START_ENQUEUED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunDefaultChatStartEnqueuedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_DEFAULT_CHAT_START_ENQUEUED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_TOOL_RESULT_SUBMITTED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunToolResultSubmittedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_TOOL_RESULT_SUBMITTED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_TOOL_RESULT_DELIVERY_FAILED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunToolResultDeliveryFailedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_TOOL_RESULT_DELIVERY_FAILED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_INTEGRATION_CONNECTION_REFUSED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunIntegrationConnectionRefusedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_INTEGRATION_CONNECTION_REFUSED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_RUNTIME_OWNER_BOUND"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunRuntimeOwnerBoundPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_RUNTIME_OWNER_BOUND"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_WORKER_EXECUTION_ACCEPTED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunWorkerExecutionAcceptedPayload"},{"$ref":"#/components/schemas/AgentRunWorkerExecutionAcceptedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_RUNTIME_INVOKE_RETRIED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunRuntimeInvokeRetriedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_RUNTIME_INVOKE_RETRIED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_CONTEXT_COMPACTED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunContextCompactedPayload"},{"$ref":"#/components/schemas/AgentRunContextCompactedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_TOOL_EXPOSURE_CHECKPOINTED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunToolExposureCheckpointedPayload"},{"$ref":"#/components/schemas/AgentRunToolExposureCheckpointedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_PROVIDER_REPLAY_CHECKPOINTED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunProviderReplayCheckpointedPayloadRead"},{"$ref":"#/components/schemas/AgentRunProviderReplayCheckpointedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_PROVIDER_REPLAY_TURN_STARTED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunProviderReplayTurnStartedPayload"},{"$ref":"#/components/schemas/AgentRunProviderReplayTurnStartedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_PROVIDER_REPLAY_TURN_FINISHED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunProviderReplayTurnFinishedPayload"},{"$ref":"#/components/schemas/AgentRunProviderReplayTurnFinishedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_MODEL_CALL_CONTEXT_RECORDED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunModelCallContextRecordedPayloadRead"},{"$ref":"#/components/schemas/AgentRunModelCallContextRecordedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_MODEL_CALL_PROVIDER_ATTEMPT_RECORDED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunModelCallProviderAttemptRecordedPayload"},{"$ref":"#/components/schemas/AgentRunModelCallProviderAttemptRecordedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_CONTROL_PLANE_DISPATCH_ACCEPTED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunControlPlaneDispatchAcceptedPayloadRead"},{"$ref":"#/components/schemas/AgentRunControlPlaneDispatchAcceptedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_DETACHED_ACCEPTED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunDetachedAcceptedPayload"},{"$ref":"#/components/schemas/AgentRunDetachedAcceptedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_INVOKE_AGENT_BILLING_MODE_RETAINED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunInvokeAgentBillingModeRetainedPayload"},{"$ref":"#/components/schemas/AgentRunInvokeAgentBillingModeRetainedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_BILLING_USAGE_RETAINED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunBillingUsageRetainedPayload"},{"$ref":"#/components/schemas/AgentRunBillingUsageRetainedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_REPLAYED_UPLOADS_SEALED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunReplayedUploadsSealedPayload"},{"$ref":"#/components/schemas/AgentRunReplayedUploadsSealedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_TOOL_CALL_ADMITTED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunToolCallAdmittedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_TOOL_CALL_ADMITTED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_REQUEST_PROVENANCE_RECORDED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunRequestProvenanceRecordedPayload"},{"$ref":"#/components/schemas/AgentRunRequestProvenanceRecordedPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_EXECUTION_START_OBSERVED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunExecutionStartObservedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_EXECUTION_START_OBSERVED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["TOOL_CALL_STATUS_CHANGED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ToolCallStatusChangedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["TOOL_CALL_STATUS_CHANGED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["INPUT_REQUEST_CREATED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/InputRequestCreatedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["INPUT_REQUEST_CREATED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["INPUT_REQUEST_UPDATED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/InputRequestUpdatedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["INPUT_REQUEST_UPDATED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["CHILD_RUN_STATUS_CHANGED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ChildRunStatusChangedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["CHILD_RUN_STATUS_CHANGED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["MODEL_CALL_COMPLETED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/ModelCallCompletedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["MODEL_CALL_COMPLETED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["RUN_PARKED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/RunParkedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["RUN_PARKED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["RUN_LOG_CAPTURED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/RunLogCapturedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["RUN_LOG_CAPTURED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["STREAM_HEARTBEAT_EMITTED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/StreamHeartbeatEmittedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["STREAM_HEARTBEAT_EMITTED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["URL_CITED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/UrlCitedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["URL_CITED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["DOCUMENT_CITED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/DocumentCitedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["DOCUMENT_CITED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["FILE_ATTACHED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/FileAttachedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["FILE_ATTACHED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["FILES_CHANGED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/FilesChangedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["FILES_CHANGED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["RUNTIME_EVENT_RECORDED"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/RuntimeEventRecordedPayload"},{"type":"object","properties":{"type":{"type":"string","enum":["RUNTIME_EVENT_RECORDED"]}},"required":["type"],"additionalProperties":false}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_CONTROL_PLANE_DISPATCH_RECEIPT"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunControlPlaneDispatchReceiptPayload"},{"$ref":"#/components/schemas/AgentRunControlPlaneDispatchReceiptPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_TOOL_EXPOSURE_CHECKPOINT"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunToolExposureCheckpointPayload"},{"$ref":"#/components/schemas/AgentRunToolExposureCheckpointPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_PROVIDER_REPLAY_CHECKPOINT"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunProviderReplayCheckpointPayloadRead"},{"$ref":"#/components/schemas/AgentRunProviderReplayCheckpointPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","enum":["AGENT_RUN_MODEL_CALL_CONTEXT"]},"payload":{"anyOf":[{"$ref":"#/components/schemas/AgentRunModelCallContextPayload"},{"$ref":"#/components/schemas/AgentRunModelCallContextPayloadRedacted"}]},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false},{"type":"object","properties":{"event_id":{"type":["integer","null"],"minimum":0},"event_type":{"type":"string","not":{"enum":["RUN_STARTED","RUN_FINISHED","RUN_ERROR","TEXT_MESSAGE_START","TEXT_MESSAGE_CONTENT","TEXT_MESSAGE_END","TOOL_CALL_START","TOOL_CALL_ARGS","TOOL_CALL_CHUNK","TOOL_CALL_END","TOOL_CALL_RESULT","STATE_SNAPSHOT","STATE_DELTA","MESSAGES_SNAPSHOT","STEP_STARTED","STEP_FINISHED","REASONING_START","REASONING_MESSAGE_START","REASONING_MESSAGE_CONTENT","REASONING_MESSAGE_END","REASONING_CONTENT","REASONING_END","ACTIVITY_SNAPSHOT","ACTIVITY_DELTA","AGENT_RUN_TASK_INPUT_ACCEPTED","AGENT_RUN_TASK_INPUT_ADMITTED","AGENT_RUN_AUTHORIZATION_SEALED","AGENT_RUN_REQUEST_ENQUEUED","AGENT_RUN_DEFAULT_CHAT_START_ENQUEUED","AGENT_RUN_TOOL_RESULT_SUBMITTED","AGENT_RUN_TOOL_RESULT_DELIVERY_FAILED","AGENT_RUN_INTEGRATION_CONNECTION_REFUSED","AGENT_RUN_RUNTIME_OWNER_BOUND","AGENT_RUN_WORKER_EXECUTION_ACCEPTED","AGENT_RUN_RUNTIME_INVOKE_RETRIED","AGENT_RUN_CONTEXT_COMPACTED","AGENT_RUN_TOOL_EXPOSURE_CHECKPOINTED","AGENT_RUN_PROVIDER_REPLAY_CHECKPOINTED","AGENT_RUN_PROVIDER_REPLAY_TURN_STARTED","AGENT_RUN_PROVIDER_REPLAY_TURN_FINISHED","AGENT_RUN_MODEL_CALL_CONTEXT_RECORDED","AGENT_RUN_MODEL_CALL_PROVIDER_ATTEMPT_RECORDED","AGENT_RUN_CONTROL_PLANE_DISPATCH_ACCEPTED","AGENT_RUN_DETACHED_ACCEPTED","AGENT_RUN_INVOKE_AGENT_BILLING_MODE_RETAINED","AGENT_RUN_BILLING_USAGE_RETAINED","AGENT_RUN_REPLAYED_UPLOADS_SEALED","AGENT_RUN_TOOL_CALL_ADMITTED","AGENT_RUN_REQUEST_PROVENANCE_RECORDED","AGENT_RUN_EXECUTION_START_OBSERVED","TOOL_CALL_STATUS_CHANGED","INPUT_REQUEST_CREATED","INPUT_REQUEST_UPDATED","CHILD_RUN_STATUS_CHANGED","MODEL_CALL_COMPLETED","RUN_PARKED","RUN_LOG_CAPTURED","STREAM_HEARTBEAT_EMITTED","URL_CITED","DOCUMENT_CITED","FILE_ATTACHED","FILES_CHANGED","RUNTIME_EVENT_RECORDED","AGENT_RUN_CONTROL_PLANE_DISPATCH_RECEIPT","AGENT_RUN_TOOL_EXPOSURE_CHECKPOINT","AGENT_RUN_PROVIDER_REPLAY_CHECKPOINT","AGENT_RUN_MODEL_CALL_CONTEXT"]}},"payload":{"description":"Payload of an unrecognized historical or future event."},"is_error":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"run_id":{"type":"string","format":"uuid","description":"Run identifier associated with the record."},"event_class":{"type":"string","enum":["fact","delta"],"description":"The event class associated with this record."},"span_id":{"type":"string","minLength":1,"description":"The span id associated with this record."},"parent_span_id":{"type":["string","null"],"minLength":1,"description":"The parent span id associated with this record."},"turn_id":{"type":["string","null"],"minLength":1,"description":"The turn id associated with this record."},"origin_event_type":{"type":"string","minLength":1,"description":"The origin event type associated with this record."},"origin_custom_name":{"type":["string","null"],"minLength":1,"description":"The origin custom name associated with this record."},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1,"description":"One unrecoverable field item associated with this record."},"description":"List of unrecoverable fields associated with this record."}},"required":["event_id","event_type","payload","is_error","created_at","run_id","event_class","span_id","parent_span_id","turn_id","origin_event_type","origin_custom_name","unrecoverable_fields"],"additionalProperties":false}]},"RunEventSnapshot":{"type":"object","properties":{"after_event_id":{"type":"integer","minimum":0,"description":"Cursor for continuing event reads after this snapshot."},"events":{"type":"array","items":{"$ref":"#/components/schemas/RunSnapshotEvent"}}},"required":["after_event_id","events"],"description":"Replay events with a continuation cursor. For task and workflow histories over 5000 events or 10 MiB, use paginated event reads."},"CreatedRunTarget":{"type":"object","properties":{"type":{"type":"string","enum":["agent","task","workflow"],"description":"Kind of execution definition."},"id":{"type":"string","minLength":1,"maxLength":512,"pattern":"^\\S+$","description":"Definition ID without a kind prefix, such as health-check rather than task:health-check."},"name":{"type":"string","minLength":1,"maxLength":256,"description":"Display name captured at admission when available."},"agent_kind":{"type":"string","enum":["project"],"description":"Server-recorded project agent identity; absence retains legacy identity semantics."}},"required":["type","id"],"additionalProperties":false,"description":"Resolved execution definition.","x-ref-description":"Resolved execution definition."},"CreatedRun":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique run UUID."},"run_id":{"type":"string","minLength":1,"description":"Public run ID that run events (metadata.run_id) and runtime tools name. Equals id for runs the server names; older runs keep their run_ ID."},"status":{"type":"string","enum":["pending","running","waiting","completed","failed","cancelled"],"description":"Current execution state."},"project_id":{"type":"string","format":"uuid","description":"Project containing the run."},"target":{"$ref":"#/components/schemas/CreatedRunTarget"},"input":{"description":"Business input supplied when the run was created."},"output":{"description":"Final business output; null until successful finalization."},"error":{"$ref":"#/components/schemas/RunFailure"},"title":{"type":"string","description":"Display title, omitted when unset."},"labels":{"$ref":"#/components/schemas/RunLabels"},"parent_run_id":{"type":"string","format":"uuid","description":"Immediate parent run ID, present on child runs."},"root_run_id":{"type":"string","format":"uuid","description":"Top-level ancestor run ID, present on child runs."},"created_at":{"type":"string","format":"date-time","description":"When the run was accepted."},"updated_at":{"type":"string","format":"date-time","description":"When the resource last changed, including usage updates."},"started_at":{"type":"string","format":"date-time","description":"When the first execution attempt started, omitted before execution."},"finished_at":{"type":"string","format":"date-time","description":"When the run completed, failed or was cancelled."},"config":{"type":"object","additionalProperties":{"description":"A JSON value."},"description":"Definition-specific execution configuration."},"execution":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Current or final execution assignment identity; absent before assignment or when unavailable."},"runtime_instance":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Actual executing process identity."},"name":{"type":"string","description":"Process name captured for this execution."},"mode":{"type":"string","enum":["service","worker"]}},"required":["id","mode"],"description":"Actual process attribution; additive compatibility bridge while runtime retains logical selection."},"runtime":{"$ref":"#/components/schemas/RunRuntime"},"timeout_seconds":{"type":"integer","exclusiveMinimum":0,"description":"Deadline for the whole run in seconds, measured from its first start and including retries."},"retry_limit":{"type":"integer","minimum":0,"description":"Maximum retries after the first attempt; only retryable failures are retried."},"attempt":{"type":"integer","minimum":1,"description":"Current or last execution attempt, starting at 1; absent before execution."},"exit_code":{"type":["integer","null"],"description":"Runtime process exit code, or null when no exit code was recorded."},"duration_ms":{"type":["integer","null"],"minimum":0,"description":"Elapsed time from first start to finish, including waits and retries; null when not finished.","format":"int64"},"tool_error_count":{"type":"integer","minimum":0,"description":"Recorded failed tool invocations during this run."},"logs":{"type":"string","description":"Captured runtime text logs, when available."},"start_mode":{"type":"string","description":"Recorded execution start mode, when available."},"worker":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Agent worker ID."},"name":{"type":"string","description":"Worker display name, omitted when the worker registered without one."},"worker_key":{"type":"string","description":"Key the worker registered under, unique per project and kind; omitted when the worker is gone."},"implementation_kind":{"type":"string","description":"Agent implementation the worker runs, such as codex; omitted when the worker is gone."},"claimed_at":{"type":"string","format":"date-time","description":"When the worker claimed the run."}},"required":["id","claimed_at"],"description":"Agent worker that claimed and executed the run; present only on worker-executed runs."}},"description":"Resolved execution settings and diagnostics."},"control":{"type":"object","properties":{"waiting":{"$ref":"#/components/schemas/RunWait"},"pause":{"$ref":"#/components/schemas/RunPause"},"cancellation":{"$ref":"#/components/schemas/RunCancellation"}},"description":"Pending control requests and the current wait."},"task_id":{"type":"string","minLength":1,"maxLength":200,"description":"Orchestration task ID, distinct from the execution definition."},"conversation_id":{"type":"string","format":"uuid","description":"Conversation containing the run."},"input_message_id":{"type":"string","format":"uuid","description":"Conversation message that supplied the input."},"output_message_id":{"type":"string","format":"uuid","description":"Conversation message containing the result."},"batch_id":{"type":"string","format":"uuid","description":"Batch containing the run."},"trigger":{"$ref":"#/components/schemas/RunTrigger"},"usage":{"$ref":"#/components/schemas/Usage"},"descendants":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"description":"Total descendants at every depth."},"active":{"type":"integer","minimum":0,"description":"Descendants that are pending, running or waiting."},"has_failures":{"type":"boolean","description":"Whether any descendant has failed."},"usage":{"allOf":[{"$ref":"#/components/schemas/Usage"},{"description":"Aggregate usage of every descendant, excluding this run.","x-ref-description":"Aggregate usage of every descendant, excluding this run."}]}},"required":["total","active","has_failures"],"description":"Counts and usage across all descendant runs, excluding this run."},"artifacts":{"type":"array","items":{"$ref":"#/components/schemas/RunArtifact"},"description":"Files produced by the run."},"schemas":{"type":"object","properties":{"input":{"type":["object","null"],"properties":{"schema":{"description":"JSON Schema captured for this run; object schemas and boolean schemas are supported.","anyOf":[{"type":"boolean"},{"type":"object","additionalProperties":{"description":"A JSON value."}}]},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 digest of the pinned schema."}},"required":["schema","sha256"]},"output":{"type":["object","null"],"properties":{"schema":{"description":"JSON Schema captured for this run; object schemas and boolean schemas are supported.","anyOf":[{"type":"boolean"},{"type":"object","additionalProperties":{"description":"A JSON value."}}]},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 digest of the pinned schema."}},"required":["schema","sha256"]}},"required":["input","output"],"description":"Pinned schemas for business input and output; null means no declared schema."},"metadata":{"type":"object","additionalProperties":{"description":"A JSON value."},"description":"Additional resource metadata."}},"required":["id","run_id","status","project_id","target","input","output","created_at","updated_at","trigger"],"description":"A newly created run with resolved target and recorded trigger.","allOf":[{"if":{"properties":{"status":{"enum":["failed"]}},"required":["status"]},"then":{"required":["error"]},"else":{"not":{"required":["error"]}}},{"if":{"properties":{"status":{"enum":["completed","failed","cancelled"]}},"required":["status"]},"then":{"required":["finished_at"]},"else":{"not":{"required":["finished_at"]}}},{"if":{"properties":{"status":{"enum":["pending","running","waiting","failed","cancelled"]}},"required":["status"]},"then":{"properties":{"output":{"type":"null"}}},"else":{}},{"if":{"properties":{"status":{"enum":["waiting"]}},"required":["status"]},"then":{"required":["control"],"properties":{"control":{"required":["waiting"]}}},"else":{"properties":{"control":{"not":{"required":["waiting"]}}}}},{"if":{"properties":{"control":{"required":["pause"]}},"required":["control"]},"then":{"properties":{"status":{"enum":["pending","running","waiting"]}}}},{"if":{"required":["trigger"],"properties":{"trigger":{"properties":{"type":{"enum":["agent","task","workflow"]}},"required":["type"]}}},"then":{"required":["parent_run_id","root_run_id"]}},{"if":{"properties":{"status":{"const":"completed"}},"required":["status"]},"then":{"properties":{"descendants":{"properties":{"active":{"const":0}}}}}}],"dependentRequired":{"parent_run_id":["root_run_id"],"root_run_id":["parent_run_id"]}},"RunCreationReceipt":{"type":"object","properties":{"run_id":{"type":"string","format":"uuid","description":"UUID of the admitted run (a full run calls it id). A receipt carries no public run ID."},"status":{"type":"string","enum":["pending","running","waiting","completed","failed","cancelled"],"description":"Current execution state."}},"required":["run_id","status"],"additionalProperties":false,"description":"Minimal admission receipt for a caller who cannot read the created run. No private fields are disclosed."},"CreateRunResult":{"anyOf":[{"$ref":"#/components/schemas/CreatedRun"},{"$ref":"#/components/schemas/RunCreationReceipt"}],"description":"The full created run when readable by the caller; otherwise only its admission receipt. Replay uses the same caller visibility."},"RunTarget":{"type":"object","properties":{"type":{"type":"string","enum":["agent","task","workflow"],"description":"Kind of execution definition."},"id":{"type":"string","minLength":1,"maxLength":512,"pattern":"^\\S+$","description":"Definition ID without a kind prefix, such as health-check rather than task:health-check."}},"required":["type","id"],"additionalProperties":false,"description":"Definition executed by this run."},"RunExecutionOptions":{"type":"object","properties":{"runtime":{"allOf":[{"$ref":"#/components/schemas/RunRuntime"},{"description":"Deployment or registered runtime override; omit to use the definition default.","x-ref-description":"Deployment or registered runtime override; omit to use the definition default."}]},"timeout_seconds":{"type":"integer","exclusiveMinimum":0,"description":"Whole-run deadline in seconds, including retries; unsupported target overrides are refused."},"retry_limit":{"type":"integer","minimum":0,"description":"Maximum retries after the first attempt, restricted to retryable failures."}},"additionalProperties":false,"description":"Execution overrides, separate from business input and configuration.","x-ref-description":"Execution overrides, separate from business input and configuration."},"DirectRunRequest":{"type":"object","properties":{"project_id":{"type":"string","format":"uuid","description":"UUID of the project containing the execution definition or saved source."},"title":{"type":"string","minLength":1,"maxLength":255,"description":"Optional display title for the accepted run."},"labels":{"$ref":"#/components/schemas/RunLabels"},"target":{"$ref":"#/components/schemas/RunTarget"},"input":{"description":"Business input passed to the definition unchanged; omitted input resolves to null."},"config":{"type":"object","additionalProperties":{"description":"A JSON value."},"description":"Definition-specific configuration; business keys retain their spelling on every transport. Agent targets with `conversation_id` read `agent_admission` (AgentAdmissionConfig)."},"execution":{"$ref":"#/components/schemas/RunExecutionOptions"},"parent_run_id":{"type":"string","format":"uuid","description":"Canonical UUID of the authenticated runtime parent; ordinary users cannot assert parent authority."},"tool_call_id":{"type":"string","minLength":1,"maxLength":128,"description":"Durable tool invocation on an agent parent; requires parent_run_id and excludes node_id."},"node_id":{"type":"string","minLength":1,"maxLength":128,"description":"Started workflow node on the parent; requires parent_run_id and excludes tool_call_id."},"conversation_id":{"type":"string","format":"uuid","description":"Conversation associated with an agent admission, when applicable."},"batch_id":{"type":"string","format":"uuid","description":"Batch UUID associated with the accepted run."}},"required":["project_id","target"],"additionalProperties":false,"dependentRequired":{"tool_call_id":["parent_run_id"],"node_id":["parent_run_id"]},"allOf":[{"not":{"required":["tool_call_id","node_id"]}},{"if":{"properties":{"target":{"properties":{"type":{"const":"agent"}},"required":["type"]},"config":{"required":["agent_admission"]}},"required":["target","config"]},"then":{"required":["conversation_id"]}},{"if":{"properties":{"target":{"properties":{"type":{"const":"agent"}},"required":["type"]}},"required":["target","conversation_id"]},"then":{"properties":{"config":{"properties":{"agent_admission":{"$ref":"#/components/schemas/AgentAdmissionConfig"}}}}}}]},"ScheduleRunRequest":{"type":"object","properties":{"project_id":{"type":"string","format":"uuid","description":"UUID of the project containing the execution definition or saved source."},"title":{"type":"string","minLength":1,"maxLength":255,"description":"Optional display title for the accepted run."},"labels":{"$ref":"#/components/schemas/RunLabels"},"source":{"type":"object","properties":{"type":{"type":"string","enum":["schedule"],"description":"Execute a saved schedule."},"id":{"type":"string","format":"uuid","description":"UUID of the saved schedule in this project."}},"required":["type","id"],"additionalProperties":false,"description":"Saved schedule supplying the target and execution configuration."}},"required":["project_id","source"],"additionalProperties":false},"WebhookRunRequest":{"type":"object","properties":{"project_id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":255},"labels":{"$ref":"#/components/schemas/RunLabels"},"source":{"type":"object","properties":{"type":{"type":"string","enum":["webhook"],"description":"Saved source kind."},"id":{"type":"string","minLength":1,"maxLength":128,"description":"Saved webhook identifier."}},"required":["type","id"],"additionalProperties":false,"description":"Saved webhook to execute."},"input":{"description":"A JSON value."}},"required":["project_id","source","input"],"additionalProperties":false},"CreateRunRequest":{"anyOf":[{"$ref":"#/components/schemas/DirectRunRequest"},{"$ref":"#/components/schemas/ScheduleRunRequest"},{"$ref":"#/components/schemas/WebhookRunRequest"}],"description":"Create a direct run with project_id, target:{type,id}, and optional input, or execute a saved schedule or webhook. Input is business data; configuration and execution settings are separate."},"FinalizeRunRequest":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["completed"]},"final_text":{"type":"string","description":"Authoritative final text from the current run runtime, including an empty filtered answer. Not accepted for owner finalization."},"output":{"description":"Any JSON value. A text-only agent runtime may omit this to use its durable final text."}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["failed"]},"error":{"$ref":"#/components/schemas/RunFailure"}},"required":["status","error"],"additionalProperties":false}],"description":"Finalizes a run with output or an error."},"SucceedRunRequest":{"type":"object","properties":{"output":{"description":"Final JSON output. Use explicit null when there is no value."}},"required":["output"],"additionalProperties":false,"description":"Final output for a successful run."},"FailRunRequest":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/RunFailure"}},"required":["error"],"additionalProperties":false,"description":"Error for a failed run."},"ResumeRunRequest":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["manual"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_result"]},"tool_call_id":{"type":"string","minLength":1,"maxLength":128},"result":{"description":"A JSON value."},"is_error":{"type":"boolean"}},"required":["type","tool_call_id","result"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["integration_connected"]},"integration":{"type":"string","minLength":1,"maxLength":128}},"required":["type","integration"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["approval"]},"wait_id":{"type":"string","minLength":1,"maxLength":128},"node_id":{"type":"string","minLength":1,"maxLength":128},"approved":{"type":"boolean"},"comment":{"type":"string","maxLength":4000}},"required":["type","wait_id","node_id","approved"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["event"]},"wait_id":{"type":"string","minLength":1,"maxLength":128},"name":{"type":"string","minLength":1,"maxLength":128},"payload":{"description":"A JSON value."}},"required":["type","wait_id","name"],"additionalProperties":false}],"description":"Only a signal matching the current wait is accepted; a mismatch returns 409."},"RunsPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Run"}},"page_info":{"$ref":"#/components/schemas/RunsPageInfo"}},"required":["data","page_info"]},"UpdateRunRequest":{"type":"object","properties":{"title":{"type":["string","null"],"minLength":1,"maxLength":255,"description":"Replace the display title; null clears it."},"labels":{"allOf":[{"$ref":"#/components/schemas/RunLabels"},{"description":"Replace the complete label map; an empty object clears it."}]}},"additionalProperties":false,"description":"Update the run title or labels.","minProperties":1},"RunHeartbeat":{"type":"object","properties":{"run_id":{"type":"string","format":"uuid"},"expires_at":{"type":"string","format":"date-time"}},"required":["run_id","expires_at"]},"RunEventToken":{"type":"object","properties":{"token":{"type":"string","minLength":1},"token_type":{"type":"string","enum":["Bearer"]},"expires_at":{"type":"string","format":"date-time"},"run_id":{"type":"string","format":"uuid"},"permissions":{"type":"array","items":{"type":"string","enum":["run.events.append"]},"minItems":1,"maxItems":1}},"required":["token","token_type","expires_at","run_id","permissions"],"description":"A short-lived event-append credential for the target child run; never grants finalization, heartbeat, or child creation."},"InputRequestField":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"label":{"type":"string","maxLength":1000},"description":{"type":"string","maxLength":4000},"required":{"type":"boolean","default":false},"type":{"type":"string","enum":["password"]}},"required":["name","type"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"label":{"type":"string","maxLength":1000},"description":{"type":"string","maxLength":4000},"required":{"type":"boolean","default":false},"type":{"type":"string","enum":["text","textarea","email","url"]},"default":{"type":"string"}},"required":["name","type"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"label":{"type":"string","maxLength":1000},"description":{"type":"string","maxLength":4000},"required":{"type":"boolean","default":false},"type":{"type":"string","enum":["number"]},"default":{"type":"number"}},"required":["name","type"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"label":{"type":"string","maxLength":1000},"description":{"type":"string","maxLength":4000},"required":{"type":"boolean","default":false},"type":{"type":"string","enum":["checkbox","confirm"]},"default":{"type":"boolean"}},"required":["name","type"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"label":{"type":"string","maxLength":1000},"description":{"type":"string","maxLength":4000},"required":{"type":"boolean","default":false},"type":{"type":"string","enum":["select","radio"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"description":{"type":"string"},"recommended":{"type":"boolean"}},"required":["value","label"],"additionalProperties":false},"minItems":1,"maxItems":100},"default":{"type":"string"}},"required":["name","type","options"],"additionalProperties":false}]},"InputValues":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]},"description":"Submitted values keyed by field name; password values are omitted from reads.","x-ref-description":"Submitted values keyed by field name; password values are omitted from reads."},"Actor":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","service_account","system"]},"id":{"type":"string","minLength":1,"maxLength":128}},"required":["type","id"],"description":"Immediate authenticated initiator, recorded by the server; execution credentials identify their issuing service account, not the original caller."},"UnavailableActor":{"type":"object","properties":{"type":{"type":"string","enum":["unavailable"]},"reason":{"type":"string","enum":["not_recorded","identity_removed"],"description":"`not_recorded`: the server never stored the submitting credential. `identity_removed`: the recorded identity was later revoked or deleted."},"legacy_role":{"type":"string","enum":["human","agent","integration","system","user","api_key","service_account"],"description":"Role tag stored with the response. It is not an authenticated actor type."},"legacy_id":{"type":"string","minLength":1,"maxLength":255,"description":"Actor ID stored with the response. It is not promoted to an authenticated actor."}},"required":["type","reason"],"additionalProperties":false,"description":"A historical response without authoritative submitting-credential provenance. The server never infers or looks up a replacement actor."},"InputResponse":{"type":"object","properties":{"response_id":{"type":"string","format":"uuid","description":"Unique response ID."},"values":{"$ref":"#/components/schemas/InputValues"},"actor":{"anyOf":[{"$ref":"#/components/schemas/Actor"},{"$ref":"#/components/schemas/UnavailableActor"}],"description":"Authenticated principal that submitted the response, or `unavailable` for a historical response without authoritative provenance."},"redacted_fields":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"description":"Names of submitted secret fields omitted from values."},"created_at":{"type":"string","format":"date-time","description":"When the response was submitted."}},"required":["response_id","values","actor","created_at"]},"InputRequest":{"type":"object","properties":{"input_request_id":{"type":"string","format":"uuid","description":"Unique input request ID."},"project_id":{"type":"string","format":"uuid","description":"Project inherited from the run."},"run_id":{"type":"string","format":"uuid","description":"Run waiting for this input."},"title":{"type":"string","minLength":1,"maxLength":1000,"description":"Question or decision shown to the responder."},"fields":{"type":"array","items":{"$ref":"#/components/schemas/InputRequestField"},"description":"Fields the responder can fill in."},"status":{"type":"string","enum":["open","submitted","cancelled","expired"],"description":"Current resolution state."},"requested_responder_type":{"type":"string","enum":["human","agent","system"],"description":"Required responder role; the authenticated actor identifies who actually responded."},"response":{"anyOf":[{"$ref":"#/components/schemas/InputResponse"},{"type":"null"},{"type":"null"}],"description":"Submitted response, or null before submission or after cancellation or expiry."},"created_at":{"type":"string","format":"date-time","description":"When the request was created."},"expires_at":{"type":"string","format":"date-time","description":"When the request expires."},"resolved_at":{"type":"string","format":"date-time","description":"When the request was submitted, cancelled or expired."},"tool_call_id":{"type":"string","minLength":1,"maxLength":128,"description":"Tool invocation waiting for the response."},"conversation_id":{"type":"string","format":"uuid","description":"Conversation inherited from the run."},"description":{"type":"string","description":"Additional instructions for the responder."},"metadata":{"type":"object","additionalProperties":{"description":"A JSON value."},"description":"Additional resource metadata."}},"required":["input_request_id","project_id","run_id","title","fields","status","requested_responder_type","response","created_at"],"allOf":[{"if":{"properties":{"status":{"enum":["submitted"]}},"required":["status"]},"then":{"properties":{"response":{"type":"object"}}},"else":{"properties":{"response":{"type":"null"}}}},{"if":{"properties":{"status":{"enum":["open"]}},"required":["status"]},"then":{"not":{"required":["resolved_at"]}},"else":{"required":["resolved_at"]}}]},"ListInputRequestsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InputRequest"}},"page_info":{"$ref":"#/components/schemas/RunsPageInfo"}},"required":["data","page_info"]},"CreateInputRequestRequest":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":1000},"fields":{"type":"array","items":{"$ref":"#/components/schemas/InputRequestField"},"minItems":1,"maxItems":100},"tool_call_id":{"type":"string","minLength":1,"maxLength":128,"description":"Tool invocation to request input for. Defaults to the run’s current waiting invocation."},"requested_responder_type":{"type":"string","enum":["human","agent","system"],"default":"human"},"description":{"type":"string","maxLength":20000},"expires_at":{"type":"string","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"description":"A JSON value."}}},"required":["title","fields"],"additionalProperties":false},"RespondToInputRequestRequest":{"type":"object","properties":{"values":{"$ref":"#/components/schemas/InputValues"}},"required":["values"],"additionalProperties":false},"Uuid":{"type":"string","format":"uuid"},"ConversationMessage":{"type":"object","properties":{"id":{"type":"string"},"conversation_id":{"type":"string"},"parent_id":{"type":["string","null"]},"seq":{"type":"number"},"role":{"type":"string","enum":["user","assistant","tool"]},"created_by":{"type":["string","null"]},"sender_type":{"type":"string","enum":["user","webhook","service_account","integration","agent","system"],"default":"user"},"sender_id":{"type":["string","null"]},"sender_display_name":{"type":["string","null"]},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string","maxLength":100000}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"upload_id":{"type":"string","format":"uuid"},"media_type":{"type":"string"},"url":{"type":"string"}},"required":["type","upload_id","media_type"]},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"upload_id":{"type":"string","format":"uuid"},"media_type":{"type":"string"},"filename":{"type":"string"},"url":{"type":"string"}},"required":["type","media_type"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_call"]},"id":{"type":"string"},"name":{"type":"string"},"input":{"type":"object","additionalProperties":{}},"state":{"type":"string","enum":["streaming","pending","completed","error"]}},"required":["type","id","name","input","state"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_result"]},"tool_call_id":{"type":"string"},"output":{},"is_error":{"type":"boolean"}},"required":["type","tool_call_id"]},{"type":"object","properties":{"type":{"type":"string","enum":["reasoning"]},"text":{"type":"string","maxLength":100000},"signature":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["citation"]},"source_id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"quote":{"type":"string"}},"required":["type","source_id"]},{"type":"object","properties":{"type":{"type":"string","enum":["source_document"]},"source_id":{"type":"string"},"media_type":{"type":"string"},"title":{"type":"string"},"filename":{"type":"string"}},"required":["type","source_id","media_type","title"]},{"type":"object","properties":{"type":{"type":"string","enum":["step_start"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"code":{"type":"string"},"message":{"type":"string"}},"required":["type","code","message"]},{"type":"object","properties":{"type":{"type":"string","enum":["data"]},"name":{"type":"string"},"value":{}},"required":["type","name"]}]}},"model":{"type":["string","null"]},"run_usage":{"type":["object","null"],"properties":{"funding":{"type":"string","enum":["managed","customer","mixed"]},"capture_status":{"type":"string","enum":["complete","partial","missing","unknown"]},"scope":{"type":"string","enum":["run"]},"model":{"type":["string","null"]},"input_tokens":{"type":"integer","minimum":0},"output_tokens":{"type":"integer","minimum":0},"cache_creation_input_tokens":{"type":"integer","minimum":0},"cache_read_input_tokens":{"type":"integer","minimum":0},"reasoning_tokens":{"type":"integer","minimum":0},"total_tokens":{"type":"integer","minimum":0},"model_calls":{"type":"integer","minimum":0},"cost_credits":{"type":["string","null"]}},"required":["scope","model","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens","reasoning_tokens","total_tokens","model_calls","cost_credits"]},"token_usage":{"type":["object","null"],"properties":{"input":{"type":"number"},"output":{"type":"number"},"reasoning_tokens":{"type":"integer","minimum":0}}},"finish_reason":{"type":["string","null"]},"cost_credits":{"type":["string","null"]},"status":{"type":"string","enum":["pending","streaming","completed","failed","cancelled"]},"edited_at":{"type":["string","null"]},"idempotency_key":{"type":["string","null"]},"metadata":{"type":["object","null"],"additionalProperties":{}},"created_at":{"type":"string"},"updated_at":{"type":["string","null"]}},"required":["id","conversation_id","seq","role","parts","status","created_at"]},"BudgetScope":{"type":"object","properties":{"kind":{"type":"string","enum":["api_key","member","project"],"description":"Budget scope name. API key takes precedence, followed by project member, then project. Matches `scope` in a `402` `ai-budget-exceeded` response."},"project_id":{"type":["string","null"],"format":"uuid"},"user_id":{"type":["string","null"],"format":"uuid"},"api_key_id":{"type":["string","null"],"format":"uuid"}},"required":["kind","project_id","user_id","api_key_id"]},"Budget":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"scope":{"$ref":"#/components/schemas/BudgetScope"},"monthly_limit_usd":{"type":"number","description":"The monthly AI spend limit, in USD"},"monthly_limit_credits":{"type":"number","description":"The same limit in credits, the unit spend is counted in"},"status":{"allOf":[{"$ref":"#/components/schemas/SubjectBudgetStatus"},{"type":"object"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","scope","monthly_limit_usd","monthly_limit_credits","status","created_at","updated_at"]},"BudgetScopeInput":{"type":"object","properties":{"project_reference":{"type":"string","minLength":1,"description":"The project whose spend this budget caps. Required whenever `user_id` is set."},"user_id":{"type":"string","format":"uuid","description":"The person whose spend on that project this budget caps. A new member cap cannot target the caller or the project owner."},"api_key_id":{"type":"string","format":"uuid","description":"The API key whose spend this budget caps, wherever the key is used."}},"description":"A budget caps monthly AI spending for a project, person, API key, or combination of these fields. A request must match every field in the budget scope. If several budgets apply, the most specific exhausted budget rejects the request before account credit and provider spending checks. Only one budget is allowed per scope (409); change an existing limit with an update. The scope cannot change later; create a separate budget for a different scope. API keys and runtime credentials are refused. A member cap cannot target the caller. A new member cap cannot target the project owner."},"CreateBudgetInput":{"type":"object","properties":{"scope":{"$ref":"#/components/schemas/BudgetScopeInput"},"monthly_limit_credits":{"type":"number","minimum":0,"maximum":8589934591.999999,"description":"Monthly AI spending limit in credits. Usage already recorded this month counts toward the limit. At most 8589934591.999999 credits, with at most six decimal places. A value of 0 blocks all spending within the scope.","example":500}},"required":["scope","monthly_limit_credits"]},"UpdateBudgetInput":{"type":"object","properties":{"monthly_limit_credits":{"type":"number","minimum":0,"maximum":8589934591.999999,"description":"New monthly AI spending limit in credits. Usage already recorded this month is retained; if the new limit is below it, the next call in the scope is rejected. At most 8589934591.999999 credits, with at most six decimal places.","example":500}},"required":["monthly_limit_credits"],"description":"API keys and runtime credentials are refused. A member cap cannot target the caller."},"OAuthServerProblem":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","properties":{"error":{"type":"string","enum":["server_error"],"description":"Error code of the RFC 6749 section 5.2 error response; always server_error, the RFC 6749 section 4.1.2.1 code for a server failure."},"error_description":{"type":"string","description":"Error description of the RFC 6749 section 5.2 error response; repeats detail."}},"required":["error","error_description"]}]},"OAuthAuthorizationProblem":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","properties":{"error":{"type":"string","description":"RFC 6749 section 4.1.2.1 error code, such as invalid_request or unauthorized_client."},"error_description":{"type":"string","description":"RFC 6749 section 4.1.2.1 error description; repeats detail."}},"required":["error","error_description"]}]},"MagicLinkCreateResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Success status"},"message":{"type":"string","description":"Status message"}},"required":["success","message"]},"Jwk":{"type":"object","properties":{"kty":{"type":"string","enum":["RSA"],"description":"Key type"},"use":{"type":"string","enum":["sig"],"description":"Public key use"},"alg":{"type":"string","enum":["RS256"],"description":"Signing algorithm"},"kid":{"type":"string","description":"Key identifier"},"n":{"type":"string","description":"RSA modulus, base64url encoded"},"e":{"type":"string","description":"RSA public exponent, base64url encoded"}},"required":["kty","use","alg","kid","n","e"]},"JwksResponse":{"type":"object","properties":{"keys":{"type":"array","items":{"$ref":"#/components/schemas/Jwk"},"description":"JSON Web Key Set"}},"required":["keys"]},"OAuthTokenResponse":{"type":"object","properties":{"access_token":{"type":"string","description":"JWT access token for short-lived access. Lifetime uses nonzero options.expire, otherwise the configured JWT expiry."},"token_type":{"type":"string","enum":["Bearer"],"description":"Token type"},"user":{"type":"object","additionalProperties":{},"description":"User information (empty object for client_credentials)"}},"required":["access_token","token_type","user"]},"OAuthTokenOptions":{"type":"object","properties":{"shared_user_id":{"type":"string","description":"Scoped user ID for limited access tokens"},"expire":{"type":"number","description":"Token expiration in seconds"},"scopes":{"type":"array","items":{"type":"string"},"description":"Requested scopes for the token (must be subset of allowed scopes for the client)"}}},"OAuthTokenRequest":{"type":"object","properties":{"grant_type":{"type":"string","enum":["client_credentials"],"description":"Platform client-credentials grant for the Veryfront proxy. Agents and applications use API keys instead.","example":"client_credentials"},"client_id":{"type":"string","description":"Client ID for client_credentials token exchange"},"client_secret":{"type":"string","description":"Client secret for client_credentials token exchange"},"options":{"$ref":"#/components/schemas/OAuthTokenOptions"},"project_reference":{"type":"string","description":"Project UUID or slug for scoped tokens. Select at most one of project_reference or custom_domain; unknown projects return 400."},"custom_domain":{"type":"string","description":"Custom domain to resolve project (alternative to project_reference)"}},"required":["grant_type","client_id","client_secret"]},"OAuthLogoutResponse":{"type":"object","properties":{"logout":{"type":"boolean","description":"Logout success status"}},"required":["logout"]},"RuntimeVersionResponse":{"type":"object","properties":{"artifact":{"type":["string","null"],"pattern":"^\\d{14}-[a-f0-9]{12,40}$"},"agent":{"type":"object","properties":{"artifact":{"type":["string","null"],"pattern":"^\\d{14}-[a-f0-9]{12,40}$"}},"required":["artifact"]}},"required":["artifact","agent"]},"ErrorSummary":{"type":"object","properties":{"slug":{"type":"string","example":"resource-not-found"},"title":{"type":"string","example":"Resource Not Found"},"status":{"type":"number","example":404},"category":{"type":"string","example":"RESOURCE"},"suggestion":{"type":"string"}},"required":["slug","title","status","category"]},"ListErrorsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ErrorSummary"},"description":"Every matching error type, sorted by slug. The list is not paginated."}},"required":["data"]},"ErrorSolution":{"type":"object","properties":{"message":{"type":"string"},"steps":{"type":"array","items":{"type":"string"}},"example":{"type":"string"},"tips":{"type":"array","items":{"type":"string"}},"related_errors":{"type":"array","items":{"type":"string"},"description":"Slugs of related error types."}},"required":["message"]},"ErrorDetail":{"type":"object","properties":{"slug":{"type":"string","example":"resource-not-found"},"title":{"type":"string","example":"Resource Not Found"},"status":{"type":"number","example":404},"category":{"type":"string","example":"RESOURCE"},"suggestion":{"type":"string"},"solution":{"$ref":"#/components/schemas/ErrorSolution"},"docs":{"type":"string","example":"https://veryfront.com/docs/api/errors/resource-not-found"}},"required":["slug","title","status","category","docs"]},"ProjectAgent":{"$ref":"#/components/schemas/AgentSource"},"AgentRunProviderReplayCheckpointedPayloadRead":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_PROVIDER_REPLAY_CHECKPOINTED"]},"version":{"type":"number","enum":[1]},"messageId":{"type":"string","minLength":1,"maxLength":256},"provider":{"type":"string","enum":["anthropic","openai-responses"]},"providerMessageBlockCounts":{"type":"array","items":{"type":"integer","minimum":1,"maximum":100},"minItems":1,"maxItems":100},"totalPartCount":{"type":"integer","minimum":1,"maximum":10000},"elapsedMs":{"type":"number","minimum":0},"emittedAt":{"type":"integer","minimum":0},"providerBlockCount":{"type":"integer","minimum":1,"maximum":100}},"required":["type","version","messageId","provider","totalPartCount","providerBlockCount"],"additionalProperties":false},"AgentRunModelCallContextRecordedPayloadRead":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_MODEL_CALL_CONTEXT_RECORDED","AGENT_RUN_MODEL_CALL_CONTEXT"]},"modelCallId":{"type":"string","format":"uuid"},"model":{"type":"object","properties":{"id":{"type":"string","minLength":1},"modelProvider":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},"request":{"type":"object","properties":{"maxOutputTokens":{"type":"number","minimum":0},"temperature":{"type":"number"},"topP":{"type":"number"},"topK":{"type":"number"},"stopSequences":{"type":"array","items":{"type":"string"}},"seed":{"type":"number"},"presencePenalty":{"type":"number"},"frequencyPenalty":{"type":"number"},"parallelToolCalls":{"type":"boolean"},"responseFormat":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"name":{"type":"string"},"schema":{},"description":{"type":"string"},"strict":{"type":"boolean"}},"required":["type","name","schema"],"additionalProperties":false}]},"reasoning":{"type":"object","properties":{"enabled":{"type":"boolean"},"effort":{"type":"string","enum":["low","medium","high","max"]},"budgetTokens":{"type":"integer","minimum":0}},"additionalProperties":false}},"additionalProperties":false},"messages":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["system"]},"content":{"type":"string"},"providerOptions":{"type":"object","additionalProperties":{"type":"object","properties":{"cacheControl":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false}},"required":["cacheControl"],"additionalProperties":false}}},"required":["role","content"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["user"]},"content":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["image","file"]},"mediaType":{"type":"string"},"url":{"type":"string"},"filename":{"type":"string"}},"required":["type","mediaType","url"],"additionalProperties":false}]}}},"required":["role","content"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"providerMetadata":{"type":"object","description":"Provider-generated assistant controls preserved as finite, acyclic JSON data for faithful replay.","additionalProperties":{}},"content":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool-call"]},"toolCallId":{"type":"string"},"toolName":{"type":"string"},"input":{},"providerExecuted":{"type":"boolean"}},"required":["type","toolCallId","toolName","input"],"additionalProperties":false}]}}},"required":["role","content"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["tool"]},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["tool-result"]},"toolCallId":{"type":"string"},"toolName":{"type":"string"},"output":{"type":"object","properties":{"type":{"type":"string","enum":["json"]},"value":{}},"required":["type","value"],"additionalProperties":false}},"required":["type","toolCallId","toolName","output"],"additionalProperties":false}}},"required":["role","content"],"additionalProperties":false}]}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string"},"description":{"type":"string"},"inputSchema":{}},"required":["type","name","inputSchema"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["provider"]},"name":{"type":"string"},"id":{"type":"string"},"args":{"type":"object","additionalProperties":{}}},"required":["type","name","id","args"],"additionalProperties":false}]}},"elapsedMs":{"type":"number","minimum":0},"emittedAt":{"type":"integer","minimum":0}},"required":["type","messages"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_MODEL_CALL_CONTEXT_RECORDED","AGENT_RUN_MODEL_CALL_CONTEXT"]},"modelCallId":{"type":"string","format":"uuid"},"model":{"type":"object","properties":{"id":{"type":"string","minLength":1},"modelProvider":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},"request":{"type":"object","properties":{"maxOutputTokens":{"type":"number","minimum":0},"temperature":{"type":"number"},"topP":{"type":"number"},"topK":{"type":"number"},"stopSequences":{"type":"array","items":{"type":"string"}},"seed":{"type":"number"},"presencePenalty":{"type":"number"},"frequencyPenalty":{"type":"number"},"parallelToolCalls":{"type":"boolean"},"responseFormat":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"name":{"type":"string"},"schema":{},"description":{"type":"string"},"strict":{"type":"boolean"}},"required":["type","name","schema"],"additionalProperties":false}]},"reasoning":{"type":"object","properties":{"enabled":{"type":"boolean"},"effort":{"type":"string","enum":["low","medium","high","max"]},"budgetTokens":{"type":"integer","minimum":0}},"additionalProperties":false}},"additionalProperties":false},"messages":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["system"]},"content":{"type":"string"},"providerOptions":{"type":"object","additionalProperties":{"type":"object","properties":{"cacheControl":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false}},"required":["cacheControl"],"additionalProperties":false}}},"required":["role","content"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["user"]},"content":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["image","file"]},"mediaType":{"type":"string"},"url":{"type":"string"},"filename":{"type":"string"}},"required":["type","mediaType","url"],"additionalProperties":false}]}}},"required":["role","content"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"providerMetadata":{"type":"object","description":"Provider-generated assistant controls preserved as finite, acyclic JSON data for faithful replay.","additionalProperties":{}},"content":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool-call"]},"toolCallId":{"type":"string"},"toolName":{"type":"string"},"input":{},"providerExecuted":{"type":"boolean"}},"required":["type","toolCallId","toolName","input"],"additionalProperties":false}]}}},"required":["role","content"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["tool"]},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["tool-result"]},"toolCallId":{"type":"string"},"toolName":{"type":"string"},"output":{"type":"object","properties":{"type":{"type":"string","enum":["json"]},"value":{}},"required":["type","value"],"additionalProperties":false}},"required":["type","toolCallId","toolName","output"],"additionalProperties":false}}},"required":["role","content"],"additionalProperties":false}]}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string"},"description":{"type":"string"},"inputSchema":{}},"required":["type","name","inputSchema"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["provider"]},"name":{"type":"string"},"id":{"type":"string"},"args":{"type":"object","additionalProperties":{}}},"required":["type","name","id","args"],"additionalProperties":false}]}},"elapsedMs":{"type":"number","minimum":0},"emittedAt":{"type":"integer","minimum":0}},"required":["type","modelCallId","messages"],"additionalProperties":false}]},"AgentRunControlPlaneDispatchAcceptedPayloadRead":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_CONTROL_PLANE_DISPATCH_ACCEPTED"]},"requestHash":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},"required":["type","requestHash"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_CONTROL_PLANE_DISPATCH_ACCEPTED"]},"version":{"type":"number","enum":[2]},"state":{"type":"string","enum":["intent_recorded"]},"runId":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-zA-Z0-9_-]+$"},"projectId":{"type":"string","format":"uuid"},"leaseOwner":{"type":"string","pattern":"^agent-run-detached:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"dispatchAttemptId":{"type":"string","format":"uuid"},"transportRecoveryAttempt":{"type":"integer","minimum":0},"resumesDispatchAttemptId":{"type":"string","format":"uuid"},"requestHash":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"leaseExpiresAt":{"type":"string","format":"date-time"}},"required":["type","version","state","runId","projectId","leaseOwner","dispatchAttemptId","transportRecoveryAttempt","requestHash","leaseExpiresAt"],"additionalProperties":false}]},"AgentRunProviderReplayCheckpointPayloadRead":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_PROVIDER_REPLAY_CHECKPOINT"]},"version":{"type":"number","enum":[1]},"messageId":{"type":"string","minLength":1,"maxLength":256},"provider":{"type":"string","enum":["anthropic","openai-responses"]},"providerMessageBlockCounts":{"type":"array","items":{"type":"integer","minimum":1,"maximum":100},"minItems":1,"maxItems":100},"totalPartCount":{"type":"integer","minimum":1,"maximum":10000},"elapsedMs":{"type":"number","minimum":0},"emittedAt":{"type":"integer","minimum":0},"providerBlockCount":{"type":"integer","minimum":1,"maximum":100}},"required":["type","version","messageId","provider","totalPartCount","providerBlockCount"],"additionalProperties":false},"AgentRunTaskInputAcceptedPayloadRedacted":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_TASK_INPUT_ACCEPTED"]}},"required":["type"],"additionalProperties":false},"AgentRunTaskInputAdmittedPayloadRedacted":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_TASK_INPUT_ADMITTED"]}},"required":["type"],"additionalProperties":false},"AgentRunAuthorizationSealedPayloadRedacted":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_AUTHORIZATION_SEALED"]}},"required":["type"],"additionalProperties":false},"AgentRunWorkerExecutionAcceptedPayloadRedacted":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_WORKER_EXECUTION_ACCEPTED"]}},"required":["type"],"additionalProperties":false},"AgentRunContextCompactedPayloadRedacted":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_CONTEXT_COMPACTED"]}},"required":["type"],"additionalProperties":false},"AgentRunToolExposureCheckpointedPayloadRedacted":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_TOOL_EXPOSURE_CHECKPOINTED"]}},"required":["type"],"additionalProperties":false},"AgentRunProviderReplayCheckpointedPayloadRedacted":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_PROVIDER_REPLAY_CHECKPOINTED"]}},"required":["type"],"additionalProperties":false},"AgentRunProviderReplayTurnStartedPayloadRedacted":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_PROVIDER_REPLAY_TURN_STARTED"]}},"required":["type"],"additionalProperties":false},"AgentRunProviderReplayTurnFinishedPayloadRedacted":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_PROVIDER_REPLAY_TURN_FINISHED"]}},"required":["type"],"additionalProperties":false},"AgentRunModelCallContextRecordedPayloadRedacted":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_MODEL_CALL_CONTEXT_RECORDED"]}},"required":["type"],"additionalProperties":false},"AgentRunModelCallProviderAttemptRecordedPayloadRedacted":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_MODEL_CALL_PROVIDER_ATTEMPT_RECORDED"]}},"required":["type"],"additionalProperties":false},"AgentRunControlPlaneDispatchAcceptedPayloadRedacted":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_CONTROL_PLANE_DISPATCH_ACCEPTED"]}},"required":["type"],"additionalProperties":false},"AgentRunDetachedAcceptedPayloadRedacted":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_DETACHED_ACCEPTED"]}},"required":["type"],"additionalProperties":false},"AgentRunInvokeAgentBillingModeRetainedPayloadRedacted":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_INVOKE_AGENT_BILLING_MODE_RETAINED"]}},"required":["type"],"additionalProperties":false},"AgentRunBillingUsageRetainedPayloadRedacted":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_BILLING_USAGE_RETAINED"]}},"required":["type"],"additionalProperties":false},"AgentRunReplayedUploadsSealedPayloadRedacted":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_REPLAYED_UPLOADS_SEALED"]}},"required":["type"],"additionalProperties":false},"AgentRunRequestProvenanceRecordedPayloadRedacted":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_REQUEST_PROVENANCE_RECORDED"]}},"required":["type"],"additionalProperties":false},"AgentRunControlPlaneDispatchReceiptPayloadRedacted":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_CONTROL_PLANE_DISPATCH_RECEIPT"]}},"required":["type"],"additionalProperties":false},"AgentRunToolExposureCheckpointPayloadRedacted":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_TOOL_EXPOSURE_CHECKPOINT"]}},"required":["type"],"additionalProperties":false},"AgentRunProviderReplayCheckpointPayloadRedacted":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_PROVIDER_REPLAY_CHECKPOINT"]}},"required":["type"],"additionalProperties":false},"AgentRunModelCallContextPayloadRedacted":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_MODEL_CALL_CONTEXT"]}},"required":["type"],"additionalProperties":false},"RunStartedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["RUN_STARTED"]},"runId":{"type":"string","minLength":1}},"required":["type"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["RUN_STARTED"]}},"required":["type"]}]},"RunFinishedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["RUN_FINISHED"]},"runId":{"type":"string","minLength":1},"metadata":{"type":"object","additionalProperties":{}}},"required":["type"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["RUN_FINISHED"]}},"required":["type"]}]},"RunErrorPayload":{"type":"object","properties":{"type":{"type":"string","enum":["RUN_ERROR"]},"runId":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"message":{"type":"string"},"metadata":{"type":"object","additionalProperties":{}}},"required":["type"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["RUN_ERROR"]}},"required":["type"]}]},"TextMessageStartPayload":{"type":"object","properties":{"type":{"type":"string","enum":["TEXT_MESSAGE_START"]},"messageId":{"type":"string","minLength":1},"contentId":{"type":"string","minLength":1},"role":{"type":"string"}},"required":["type","messageId","contentId"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["TEXT_MESSAGE_START"]},"messageId":{"type":"string","minLength":1},"contentId":{"type":"string","minLength":1},"role":{"type":"string"}},"required":["type","messageId","contentId"]}]},"TextMessageContentPayload":{"type":"object","properties":{"type":{"type":"string","enum":["TEXT_MESSAGE_CONTENT"]},"messageId":{"type":"string","minLength":1},"contentId":{"type":"string","minLength":1},"delta":{"type":"string"}},"required":["type","messageId","delta"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["TEXT_MESSAGE_CONTENT"]},"messageId":{"type":"string","minLength":1},"contentId":{"type":"string","minLength":1},"delta":{"type":"string"}},"required":["type","messageId","contentId","delta"]}]},"TextMessageEndPayload":{"type":"object","properties":{"type":{"type":"string","enum":["TEXT_MESSAGE_END"]},"messageId":{"type":"string","minLength":1},"contentId":{"type":"string","minLength":1}},"required":["type","messageId"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["TEXT_MESSAGE_END"]},"messageId":{"type":"string","minLength":1},"contentId":{"type":"string","minLength":1}},"required":["type","messageId","contentId"]}]},"ToolCallStartPayload":{"type":"object","properties":{"type":{"type":"string","enum":["TOOL_CALL_START"]},"toolCallId":{"type":"string","minLength":1},"toolCallName":{"type":"string","minLength":1},"startObservedFromResult":{"type":"boolean","enum":[true]},"parentMessageId":{"type":"string","minLength":1}},"required":["type","toolCallId","toolCallName"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["TOOL_CALL_START"]},"toolCallId":{"type":"string","minLength":1},"toolCallName":{"type":"string","minLength":1},"startObservedFromResult":{"type":"boolean","enum":[true]}},"required":["type","toolCallId","toolCallName"]}]},"ToolCallArgsPayload":{"type":"object","properties":{"type":{"type":"string","enum":["TOOL_CALL_ARGS"]},"toolCallId":{"type":"string","minLength":1},"delta":{"type":"string"}},"required":["type","toolCallId","delta"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["TOOL_CALL_ARGS"]},"toolCallId":{"type":"string","minLength":1},"delta":{"type":"string"}},"required":["type","toolCallId","delta"]}]},"ToolCallChunkPayload":{"type":"object","properties":{"type":{"type":"string","enum":["TOOL_CALL_CHUNK"]},"toolCallId":{"type":"string","minLength":1},"delta":{"type":"string"}},"required":["type","toolCallId","delta"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["TOOL_CALL_CHUNK"]},"toolCallId":{"type":"string","minLength":1},"delta":{"type":"string"}},"required":["type","toolCallId","delta"]}]},"ToolCallEndPayload":{"type":"object","properties":{"type":{"type":"string","enum":["TOOL_CALL_END"]},"toolCallId":{"type":"string","minLength":1}},"required":["type","toolCallId"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["TOOL_CALL_END"]},"toolCallId":{"type":"string","minLength":1}},"required":["type","toolCallId"]}]},"ToolCallResultPayload":{"type":"object","properties":{"type":{"type":"string","enum":["TOOL_CALL_RESULT"]},"toolCallId":{"type":"string","minLength":1},"messageId":{"type":"string","minLength":1},"parentMessageId":{"type":"string","minLength":1},"content":{},"isError":{"type":["boolean","null"]},"role":{"type":"string","enum":["tool"]}},"required":["type","toolCallId","isError"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["TOOL_CALL_RESULT"]},"messageId":{"type":"string","minLength":1},"parentMessageId":{"type":"string","minLength":1},"toolCallId":{"type":"string","minLength":1},"input":{},"content":{},"result":{},"role":{"type":"string","enum":["tool"]},"isError":{"type":["boolean","null"]}},"required":["type","toolCallId"]}]},"StateSnapshotPayload":{"type":"object","properties":{"type":{"type":"string","enum":["STATE_SNAPSHOT"]},"snapshot":{"type":"object","additionalProperties":{}}},"required":["type","snapshot"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["STATE_SNAPSHOT"]},"snapshot":{"type":"object","additionalProperties":{}}},"required":["type","snapshot"]}]},"StateDeltaPayload":{"type":"object","properties":{"type":{"type":"string","enum":["STATE_DELTA"]},"delta":{}},"required":["type"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["STATE_DELTA"]},"delta":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"array","items":{"type":"object","properties":{"op":{"type":"string","enum":["add","remove","replace","move","copy","test"]},"path":{"type":"string","minLength":1},"from":{"type":"string","minLength":1},"value":{}},"required":["op","path"]}}]}},"required":["type","delta"]}]},"MessagesSnapshotPayload":{"type":"object","properties":{"type":{"type":"string","enum":["MESSAGES_SNAPSHOT"]},"messages":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["type","messages"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["MESSAGES_SNAPSHOT"]},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"role":{"type":"string","minLength":1},"parts":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1}},"required":["type"]}},"content":{}}}}},"required":["type","messages"]}]},"StepStartedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["STEP_STARTED"]},"stepId":{"type":"string","minLength":1},"stepName":{"type":"string","minLength":1},"runtime":{"type":"string","minLength":1}},"required":["type"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["STEP_STARTED"]}},"required":["type"]}]},"StepFinishedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["STEP_FINISHED"]},"stepId":{"type":"string","minLength":1},"stepName":{"type":"string","minLength":1},"runtime":{"type":"string","minLength":1},"status":{"type":"string","minLength":1}},"required":["type"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["STEP_FINISHED"]}},"required":["type"]}]},"ReasoningStartPayload":{"type":"object","properties":{"type":{"type":"string","enum":["REASONING_START"]},"messageId":{"type":"string","minLength":1}},"required":["type"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["REASONING_START"]}},"required":["type"]}]},"ReasoningMessageStartPayload":{"type":"object","properties":{"type":{"type":"string","enum":["REASONING_MESSAGE_START"]},"messageId":{"type":"string","minLength":1}},"required":["type","messageId"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["REASONING_MESSAGE_START"]}},"required":["type"]}]},"ReasoningMessageContentPayload":{"type":"object","properties":{"type":{"type":"string","enum":["REASONING_MESSAGE_CONTENT"]},"messageId":{"type":"string","minLength":1},"delta":{"type":"string"}},"required":["type","messageId","delta"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["REASONING_MESSAGE_CONTENT"]}},"required":["type"]}]},"ReasoningMessageEndPayload":{"type":"object","properties":{"type":{"type":"string","enum":["REASONING_MESSAGE_END"]},"messageId":{"type":"string","minLength":1}},"required":["type","messageId"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["REASONING_MESSAGE_END"]}},"required":["type"]}]},"ReasoningContentPayload":{"type":"object","properties":{"type":{"type":"string","enum":["REASONING_CONTENT"]},"messageId":{"type":"string","minLength":1},"delta":{"type":"string"}},"required":["type","delta"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["REASONING_CONTENT"]}},"required":["type"]}]},"ReasoningEndPayload":{"type":"object","properties":{"type":{"type":"string","enum":["REASONING_END"]},"messageId":{"type":"string","minLength":1}},"required":["type"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["REASONING_END"]}},"required":["type"]}]},"ActivitySnapshotPayload":{"type":"object","properties":{"type":{"type":"string","enum":["ACTIVITY_SNAPSHOT"]}},"required":["type"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["ACTIVITY_SNAPSHOT"]}},"required":["type"]}]},"ActivityDeltaPayload":{"type":"object","properties":{"type":{"type":"string","enum":["ACTIVITY_DELTA"]}},"required":["type"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["ACTIVITY_DELTA"]}},"required":["type"]}]},"AgentRunTaskInputAcceptedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_TASK_INPUT_ACCEPTED"]}},"required":["type"]},"AgentRunTaskInputAdmittedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_TASK_INPUT_ADMITTED"]}},"required":["type"]},"AgentRunAuthorizationSealedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_AUTHORIZATION_SEALED"]}},"required":["type"]},"AgentRunRequestEnqueuedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_REQUEST_ENQUEUED"]}},"required":["type"]},"AgentRunDefaultChatStartEnqueuedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_DEFAULT_CHAT_START_ENQUEUED"]}},"required":["type"]},"AgentRunToolResultSubmittedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_TOOL_RESULT_SUBMITTED"]}},"required":["type"]},"AgentRunToolResultDeliveryFailedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_TOOL_RESULT_DELIVERY_FAILED"]}},"required":["type"]},"AgentRunIntegrationConnectionRefusedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_INTEGRATION_CONNECTION_REFUSED"]},"integration":{"type":"string","minLength":1},"toolName":{"type":"string","minLength":1},"message":{"type":"string","minLength":1}},"required":["type","integration","toolName","message"]},"AgentRunRuntimeOwnerBoundPayload":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_RUNTIME_OWNER_BOUND"]}},"required":["type"]},"AgentRunWorkerExecutionAcceptedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_WORKER_EXECUTION_ACCEPTED"]},"executionId":{"type":"string","format":"uuid"},"runtimeInstance":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1},"mode":{"type":"string","enum":["worker"]}},"required":["id","mode"]},"acceptedAt":{"type":"string","format":"date-time"}},"required":["type","executionId","runtimeInstance","acceptedAt"]},"AgentRunRuntimeInvokeRetriedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_RUNTIME_INVOKE_RETRIED"]}},"required":["type"]},"AgentRunContextCompactedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_CONTEXT_COMPACTED"]}},"required":["type"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_CONTEXT_COMPACTED"]},"summary":{"type":"object","properties":{"text":{"type":"string","minLength":1}},"required":["text"]},"firstKeptEntryId":{"type":"string","minLength":1},"preservedMessageIds":{"type":"array","items":{"type":"string","minLength":1},"maxItems":1,"description":"The source run’s exact active user input ID, or an empty array. Replay validates the source run binding.","uniqueItems":true},"tokensBefore":{"type":"integer","minimum":0},"tokensAfter":{"type":"integer","minimum":0},"tokenBudget":{"type":"integer","exclusiveMinimum":0},"reserveTokens":{"type":"integer","minimum":0},"reason":{"type":"string","enum":["context_window","transport_body"]},"elapsedMs":{"type":"number","minimum":0},"emittedAt":{"type":"integer","minimum":0}},"required":["type","summary","firstKeptEntryId","tokensBefore","tokensAfter","tokenBudget","reserveTokens","reason"],"additionalProperties":false}]},"AgentRunToolExposureCheckpointedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_TOOL_EXPOSURE_CHECKPOINTED"]}},"required":["type"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_TOOL_EXPOSURE_CHECKPOINTED"]},"version":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[2]}]},"authorizedCatalogFingerprint":{"type":"string","minLength":1,"maxLength":256},"loadedToolNames":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-zA-Z][a-zA-Z0-9._:-]*$"}},"elapsedMs":{"type":"number","minimum":0},"emittedAt":{"type":"integer","minimum":0}},"required":["type","version","loadedToolNames"],"additionalProperties":false}]},"AgentRunProviderReplayCheckpointedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_PROVIDER_REPLAY_CHECKPOINTED"]}},"required":["type"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_PROVIDER_REPLAY_CHECKPOINTED"]},"version":{"type":"number","enum":[1]},"messageId":{"type":"string","minLength":1,"maxLength":256},"provider":{"type":"string","enum":["anthropic","openai-responses"]},"providerBlocks":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["provider-block"]},"provider":{"type":"string","enum":["anthropic","openai-responses"]},"block":{"type":"object","additionalProperties":{}}},"required":["type","provider","block"],"additionalProperties":false},"minItems":1,"maxItems":100},"providerBlockPositions":{"type":"array","items":{"type":"integer","minimum":0,"maximum":10000},"minItems":1,"maxItems":100},"providerMessageBlockCounts":{"type":"array","items":{"type":"integer","minimum":1,"maximum":100},"minItems":1,"maxItems":100},"totalPartCount":{"type":"integer","minimum":1,"maximum":10000},"elapsedMs":{"type":"number","minimum":0},"emittedAt":{"type":"integer","minimum":0}},"required":["type","version","messageId","provider","providerBlocks","providerBlockPositions","totalPartCount"],"additionalProperties":false}]},"AgentRunProviderReplayTurnStartedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_PROVIDER_REPLAY_TURN_STARTED"]}},"required":["type"]},"AgentRunProviderReplayTurnFinishedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_PROVIDER_REPLAY_TURN_FINISHED"]}},"required":["type"]},"AgentRunModelCallContextRecordedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_MODEL_CALL_CONTEXT_RECORDED"]}},"required":["type"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_MODEL_CALL_CONTEXT_RECORDED"]},"modelCallId":{"type":"string","format":"uuid"},"model":{"type":"object","properties":{"id":{"type":"string","minLength":1},"modelProvider":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},"request":{"type":"object","properties":{"maxOutputTokens":{"type":"number","minimum":0},"temperature":{"type":"number"},"topP":{"type":"number"},"topK":{"type":"number"},"stopSequences":{"type":"array","items":{"type":"string"}},"seed":{"type":"number"},"presencePenalty":{"type":"number"},"frequencyPenalty":{"type":"number"},"parallelToolCalls":{"type":"boolean"},"responseFormat":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"name":{"type":"string"},"schema":{},"description":{"type":"string"},"strict":{"type":"boolean"}},"required":["type","name","schema"],"additionalProperties":false}]},"reasoning":{"type":"object","properties":{"enabled":{"type":"boolean"},"effort":{"type":"string","enum":["low","medium","high","max"]},"budgetTokens":{"type":"integer","minimum":0}},"additionalProperties":false}},"additionalProperties":false},"messages":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["system"]},"content":{"type":"string"},"providerOptions":{"type":"object","additionalProperties":{"type":"object","properties":{"cacheControl":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false}},"required":["cacheControl"],"additionalProperties":false}}},"required":["role","content"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["user"]},"content":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["image","file"]},"mediaType":{"type":"string"},"url":{"type":"string"},"filename":{"type":"string"}},"required":["type","mediaType","url"],"additionalProperties":false}]}}},"required":["role","content"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"providerMetadata":{"type":"object","description":"Provider-generated assistant controls preserved as finite, acyclic JSON data for faithful replay.","additionalProperties":{}},"content":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool-call"]},"toolCallId":{"type":"string"},"toolName":{"type":"string"},"input":{},"providerExecuted":{"type":"boolean"}},"required":["type","toolCallId","toolName","input"],"additionalProperties":false}]}}},"required":["role","content"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["tool"]},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["tool-result"]},"toolCallId":{"type":"string"},"toolName":{"type":"string"},"output":{"type":"object","properties":{"type":{"type":"string","enum":["json"]},"value":{}},"required":["type","value"],"additionalProperties":false}},"required":["type","toolCallId","toolName","output"],"additionalProperties":false}}},"required":["role","content"],"additionalProperties":false}]}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string"},"description":{"type":"string"},"inputSchema":{}},"required":["type","name","inputSchema"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["provider"]},"name":{"type":"string"},"id":{"type":"string"},"args":{"type":"object","additionalProperties":{}}},"required":["type","name","id","args"],"additionalProperties":false}]}},"elapsedMs":{"type":"number","minimum":0},"emittedAt":{"type":"integer","minimum":0}},"required":["type","messages"],"additionalProperties":false}]},"AgentRunModelCallProviderAttemptRecordedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_MODEL_CALL_PROVIDER_ATTEMPT_RECORDED"]}},"required":["type"]},"AgentRunControlPlaneDispatchAcceptedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_CONTROL_PLANE_DISPATCH_ACCEPTED"]}},"required":["type"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_CONTROL_PLANE_DISPATCH_ACCEPTED"]},"requestHash":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},"required":["type","requestHash"],"additionalProperties":false}]},"AgentRunDetachedAcceptedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_DETACHED_ACCEPTED"]},"leaseOwner":{"type":"string","minLength":1},"dispatchAttemptId":{"type":"string","format":"uuid"}},"required":["type","leaseOwner","dispatchAttemptId"]},"AgentRunInvokeAgentBillingModeRetainedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_INVOKE_AGENT_BILLING_MODE_RETAINED"]}},"required":["type"]},"AgentRunBillingUsageRetainedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_BILLING_USAGE_RETAINED"]}},"required":["type"]},"AgentRunReplayedUploadsSealedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_REPLAYED_UPLOADS_SEALED"]}},"required":["type"]},"AgentRunToolCallAdmittedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_TOOL_CALL_ADMITTED"]}},"required":["type"]},"AgentRunRequestProvenanceRecordedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_REQUEST_PROVENANCE_RECORDED"]}},"required":["type"]},"AgentRunExecutionStartObservedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_EXECUTION_START_OBSERVED"]}},"required":["type"]},"ToolCallStatusChangedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["TOOL_CALL_STATUS_CHANGED"]},"toolCallId":{"type":"string","minLength":1},"status":{"type":"string","minLength":1},"toolCallName":{"type":["string","null"],"minLength":1}},"required":["type","toolCallId","status","toolCallName"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["TOOL_CALL_STATUS_CHANGED"]},"toolCallId":{"type":"string","minLength":1},"status":{"type":"string","minLength":1},"toolCallName":{"type":["string","null"],"minLength":1}},"required":["type","toolCallId","status","toolCallName"]}]},"InputRequestCreatedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["INPUT_REQUEST_CREATED"]},"inputRequest":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"]}},"required":["type","inputRequest"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["INPUT_REQUEST_CREATED"]},"inputRequest":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"]}},"required":["type","inputRequest"]}]},"InputRequestUpdatedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["INPUT_REQUEST_UPDATED"]},"inputRequest":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"]}},"required":["type","inputRequest"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["INPUT_REQUEST_UPDATED"]},"inputRequest":{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"]}},"required":["type","inputRequest"]}]},"ChildRunStatusChangedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["CHILD_RUN_STATUS_CHANGED"]},"toolCallId":{"type":"string","minLength":1},"childRunId":{"type":"string","minLength":1},"status":{"type":"string","minLength":1},"childConversationId":{"type":["string","null"],"minLength":1},"childMessageId":{"type":["string","null"],"minLength":1},"childAgentId":{"type":["string","null"],"minLength":1},"description":{"type":"string","minLength":1}},"required":["type","toolCallId","childRunId","status"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["CHILD_RUN_STATUS_CHANGED"]},"toolCallId":{"type":"string","minLength":1},"childRunId":{"type":"string","minLength":1},"status":{"type":"string","minLength":1},"childConversationId":{"type":["string","null"],"minLength":1},"childMessageId":{"type":["string","null"],"minLength":1},"childAgentId":{"type":["string","null"],"minLength":1},"description":{"type":"string","minLength":1}},"required":["type","toolCallId","childRunId","status"]}]},"ModelCallCompletedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["MODEL_CALL_COMPLETED"]},"provider":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"inputTokens":{"type":"integer","minimum":0},"outputTokens":{"type":"integer","minimum":0},"cacheCreationTokens":{"type":"integer","minimum":0},"cacheReadTokens":{"type":"integer","minimum":0},"totalTokens":{"type":"integer","minimum":0},"costCredits":{"type":"string","minLength":1},"latencyMs":{"type":["integer","null"],"minimum":0},"usageCaptureStatus":{"type":"string","enum":["complete","partial","missing"]},"providerRequestId":{"type":["string","null"],"minLength":1},"modelCallContextEventId":{"type":["integer","null"],"exclusiveMinimum":0}},"required":["type","provider","model","inputTokens","outputTokens","cacheCreationTokens","cacheReadTokens","totalTokens","costCredits","latencyMs","usageCaptureStatus","providerRequestId","modelCallContextEventId"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["MODEL_CALL_COMPLETED"]},"provider":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"inputTokens":{"type":"integer","minimum":0},"outputTokens":{"type":"integer","minimum":0},"cacheCreationTokens":{"type":"integer","minimum":0},"cacheReadTokens":{"type":"integer","minimum":0},"totalTokens":{"type":"integer","minimum":0},"costCredits":{"type":"string","minLength":1},"latencyMs":{"type":["integer","null"],"minimum":0},"usageCaptureStatus":{"type":"string","enum":["complete","partial","missing"]},"providerRequestId":{"type":["string","null"],"minLength":1},"modelCallContextEventId":{"type":["integer","null"],"exclusiveMinimum":0}},"required":["type","provider","model","inputTokens","outputTokens","cacheCreationTokens","cacheReadTokens","totalTokens","costCredits","latencyMs","usageCaptureStatus","providerRequestId","modelCallContextEventId"]}]},"RunParkedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["RUN_PARKED"]},"runId":{"type":"string","minLength":1},"reason":{"type":"string","minLength":1},"lastEventId":{"type":"integer","minimum":0}},"required":["type","runId","reason","lastEventId"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["RUN_PARKED"]},"runId":{"type":"string","minLength":1},"reason":{"type":"string","minLength":1},"lastEventId":{"type":"integer","minimum":0}},"required":["type","runId","reason","lastEventId"]}]},"RunLogCapturedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["RUN_LOG_CAPTURED"]},"logs":{"type":"string"}},"required":["type","logs"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["RUN_LOG_CAPTURED"]},"logs":{"type":"string"}},"required":["type","logs"]}]},"StreamHeartbeatEmittedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["STREAM_HEARTBEAT_EMITTED"]},"runId":{"type":"string","minLength":1},"lastEventId":{"type":"integer","minimum":0}},"required":["type","runId","lastEventId"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["STREAM_HEARTBEAT_EMITTED"]},"runId":{"type":"string","minLength":1},"lastEventId":{"type":"integer","minimum":0}},"required":["type","runId","lastEventId"]}]},"UrlCitedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["URL_CITED"]},"url":{"type":"string","minLength":1},"sourceId":{"type":"string","minLength":1},"title":{"type":"string","minLength":1}},"required":["type","url","sourceId"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["URL_CITED"]},"url":{"type":"string","minLength":1},"sourceId":{"type":"string","minLength":1},"title":{"type":"string","minLength":1}},"required":["type","url","sourceId"]}]},"DocumentCitedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["DOCUMENT_CITED"]},"mediaType":{"type":"string","minLength":1},"sourceId":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"filename":{"type":"string","minLength":1}},"required":["type","mediaType","sourceId"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["DOCUMENT_CITED"]},"mediaType":{"type":"string","minLength":1},"sourceId":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"filename":{"type":"string","minLength":1}},"required":["type","mediaType","sourceId"]}]},"FileAttachedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["FILE_ATTACHED"]},"mediaType":{"type":"string","minLength":1},"url":{"type":"string","minLength":1},"filename":{"type":"string","minLength":1}},"required":["type","mediaType"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["FILE_ATTACHED"]},"mediaType":{"type":"string","minLength":1},"url":{"type":"string","minLength":1},"filename":{"type":"string","minLength":1}},"required":["type","mediaType"]}]},"FilesChangedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["FILES_CHANGED"]},"id":{"type":["string","null"],"minLength":1},"status":{"type":["string","null"],"minLength":1},"changes":{}},"required":["type","id","status","changes"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["FILES_CHANGED"]},"id":{"type":["string","null"],"minLength":1},"status":{"type":["string","null"],"minLength":1},"changes":{}},"required":["type","id","status","changes"]}]},"RuntimeEventRecordedPayload":{"type":"object","properties":{"type":{"type":"string","enum":["RUNTIME_EVENT_RECORDED"]},"runtime":{"type":"string","minLength":1},"kind":{"type":"string","minLength":1},"value":{}},"required":["type","runtime","kind","value"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["RUNTIME_EVENT_RECORDED"]},"runtime":{"type":"string","minLength":1},"kind":{"type":"string","minLength":1},"value":{}},"required":["type","runtime","kind","value"]}]},"AgentRunControlPlaneDispatchReceiptPayload":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_CONTROL_PLANE_DISPATCH_RECEIPT"]}},"required":["type"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_CONTROL_PLANE_DISPATCH_RECEIPT"]},"requestHash":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},"required":["type","requestHash"],"additionalProperties":false}]},"AgentRunToolExposureCheckpointPayload":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_TOOL_EXPOSURE_CHECKPOINT"]}},"required":["type"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_TOOL_EXPOSURE_CHECKPOINT"]},"version":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[2]}]},"authorizedCatalogFingerprint":{"type":"string","minLength":1,"maxLength":256},"loadedToolNames":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-zA-Z][a-zA-Z0-9._:-]*$"}},"elapsedMs":{"type":"number","minimum":0},"emittedAt":{"type":"integer","minimum":0}},"required":["type","version","loadedToolNames"],"additionalProperties":false}]},"AgentRunProviderReplayCheckpointPayload":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_PROVIDER_REPLAY_CHECKPOINT"]}},"required":["type"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_PROVIDER_REPLAY_CHECKPOINT"]},"version":{"type":"number","enum":[1]},"messageId":{"type":"string","minLength":1,"maxLength":256},"provider":{"type":"string","enum":["anthropic","openai-responses"]},"providerBlocks":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["provider-block"]},"provider":{"type":"string","enum":["anthropic","openai-responses"]},"block":{"type":"object","additionalProperties":{}}},"required":["type","provider","block"],"additionalProperties":false},"minItems":1,"maxItems":100},"providerBlockPositions":{"type":"array","items":{"type":"integer","minimum":0,"maximum":10000},"minItems":1,"maxItems":100},"providerMessageBlockCounts":{"type":"array","items":{"type":"integer","minimum":1,"maximum":100},"minItems":1,"maxItems":100},"totalPartCount":{"type":"integer","minimum":1,"maximum":10000},"elapsedMs":{"type":"number","minimum":0},"emittedAt":{"type":"integer","minimum":0}},"required":["type","version","messageId","provider","providerBlocks","providerBlockPositions","totalPartCount"],"additionalProperties":false}]},"AgentRunModelCallContextPayload":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_MODEL_CALL_CONTEXT"]}},"required":["type"],"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_MODEL_CALL_CONTEXT"]},"modelCallId":{"type":"string","format":"uuid"},"model":{"type":"object","properties":{"id":{"type":"string","minLength":1},"modelProvider":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false},"request":{"type":"object","properties":{"maxOutputTokens":{"type":"number","minimum":0},"temperature":{"type":"number"},"topP":{"type":"number"},"topK":{"type":"number"},"stopSequences":{"type":"array","items":{"type":"string"}},"seed":{"type":"number"},"presencePenalty":{"type":"number"},"frequencyPenalty":{"type":"number"},"parallelToolCalls":{"type":"boolean"},"responseFormat":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"name":{"type":"string"},"schema":{},"description":{"type":"string"},"strict":{"type":"boolean"}},"required":["type","name","schema"],"additionalProperties":false}]},"reasoning":{"type":"object","properties":{"enabled":{"type":"boolean"},"effort":{"type":"string","enum":["low","medium","high","max"]},"budgetTokens":{"type":"integer","minimum":0}},"additionalProperties":false}},"additionalProperties":false},"messages":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["system"]},"content":{"type":"string"},"providerOptions":{"type":"object","additionalProperties":{"type":"object","properties":{"cacheControl":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false}},"required":["cacheControl"],"additionalProperties":false}}},"required":["role","content"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["user"]},"content":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["image","file"]},"mediaType":{"type":"string"},"url":{"type":"string"},"filename":{"type":"string"}},"required":["type","mediaType","url"],"additionalProperties":false}]}}},"required":["role","content"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"providerMetadata":{"type":"object","description":"Provider-generated assistant controls preserved as finite, acyclic JSON data for faithful replay.","additionalProperties":{}},"content":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool-call"]},"toolCallId":{"type":"string"},"toolName":{"type":"string"},"input":{},"providerExecuted":{"type":"boolean"}},"required":["type","toolCallId","toolName","input"],"additionalProperties":false}]}}},"required":["role","content"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","enum":["tool"]},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["tool-result"]},"toolCallId":{"type":"string"},"toolName":{"type":"string"},"output":{"type":"object","properties":{"type":{"type":"string","enum":["json"]},"value":{}},"required":["type","value"],"additionalProperties":false}},"required":["type","toolCallId","toolName","output"],"additionalProperties":false}}},"required":["role","content"],"additionalProperties":false}]}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string"},"description":{"type":"string"},"inputSchema":{}},"required":["type","name","inputSchema"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["provider"]},"name":{"type":"string"},"id":{"type":"string"},"args":{"type":"object","additionalProperties":{}}},"required":["type","name","id","args"],"additionalProperties":false}]}},"elapsedMs":{"type":"number","minimum":0},"emittedAt":{"type":"integer","minimum":0}},"required":["type","messages"],"additionalProperties":false}]}},"parameters":{"ProjectReference":{"schema":{"$ref":"#/components/schemas/ProjectReference"},"required":true,"description":"Project slug, UUID, or domain that identifies the project.","name":"project_reference","in":"path"},"PaginationCursor":{"schema":{"$ref":"#/components/schemas/PaginationCursor"},"required":false,"description":"Opaque cursor pointing at the next page. Omit it to read the first page.","name":"cursor","in":"query"},"PaginationLimit":{"schema":{"$ref":"#/components/schemas/PaginationLimit"},"required":false,"description":"Maximum number of entries to return. Defaults to 20 and is capped at 100.","name":"limit","in":"query"},"UsageQueryPreset":{"schema":{"$ref":"#/components/schemas/UsageQueryPreset"},"required":false,"description":"Whole local days, defaulting to 30d. Explicit from/to bounds take precedence over preset, including SDK-supplied defaults.","name":"preset","in":"query"},"UsageQueryFrom":{"schema":{"$ref":"#/components/schemas/UsageQueryFrom"},"required":false,"description":"Inclusive start. Supply both from and to; these bounds take precedence over preset.","name":"from","in":"query"},"UsageQueryTo":{"schema":{"$ref":"#/components/schemas/UsageQueryTo"},"required":false,"description":"Exclusive end, no later than the end of today in timezone.","name":"to","in":"query"},"UsageQueryTimezone":{"schema":{"$ref":"#/components/schemas/UsageQueryTimezone"},"required":false,"name":"timezone","in":"query"},"UsageQueryGranularity":{"schema":{"$ref":"#/components/schemas/UsageQueryGranularity"},"required":false,"description":"UTC hours, or local calendar days, Monday-based weeks and months.","name":"granularity","in":"query"},"UsageQueryGroupBy":{"schema":{"$ref":"#/components/schemas/UsageQueryGroupBy"},"required":false,"description":"Grouping dimensions supported by this operation. Repeat the parameter or use a comma-separated list.","name":"group_by","in":"query","style":"form","explode":true},"UsageQueryCompare":{"schema":{"$ref":"#/components/schemas/UsageQueryCompare"},"required":false,"description":"Compare preceding calendar months for whole-month custom ranges, local days for whole-day ranges and presets, or equal elapsed duration otherwise.","name":"compare","in":"query"}},"securitySchemes":{"hostBasicAuth":{"type":"http","scheme":"basic","description":"Internal host credentials; public user and API-key credentials are insufficient."},"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT or API Key","description":"Use a JWT bearer token or a Veryfront API key in the `Authorization` header."},"apiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Alternative API key header for `vf_<prefix>_<secret>` tokens."},"agentWorkerAuth":{"type":"http","scheme":"bearer","bearerFormat":"Agent worker token (vfaw_)","description":"The `token` returned by createAgentWorker, sent as `Authorization: Bearer vfaw_...` (or `X-API-Key`). It is bound to one worker and only accepted on that worker's heartbeat, claim, lease renewal and session operations."},"runEventWriterAuth":{"type":"http","scheme":"bearer","bearerFormat":"Run Event Writer JWT","description":"A run-bound Veryfront runtime event-writer token in the `Authorization` header."},"runExecutionAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Server-issued credential bound to project, run, registered runtime, execution generation, audience, expiry, and explicitly allowed operations; user/API-key editor access is insufficient."},"projectRunStopAuth":{"type":"http","scheme":"bearer","bearerFormat":"Project Run Stop JWT","description":"A project-run stop capability bound to one run, project, and executor attempt."}}},"paths":{"/project-favorites":{"get":{"operationId":"listProjectFavorites","tags":["projects/Projects/Favorites"],"summary":"List project favorites","description":"Lists the caller's favorite records, newest first, each with the project it points to or null when the caller can no longer read it.","responses":{"200":{"description":"The caller’s favorite records; unreadable projects keep their record with project null.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Identifier of the favorite record, not the project."},"user_id":{"type":"string","format":"uuid","description":"User who owns the favorite record."},"project_id":{"type":"string","format":"uuid","description":"Identifier of the favorited project."},"created_at":{"type":"string","description":"Timestamp when the favorite record was created."},"project":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","description":"Identifier of the favorited project."},"name":{"type":"string","description":"Current project display name."},"slug":{"type":"string","description":"Current project slug."},"created_at":{"type":"string","description":"Timestamp when the project was created."},"updated_at":{"type":"string","description":"Timestamp when the project was last updated."}},"required":["id","name","slug","created_at","updated_at"],"description":"The favorited project; null when the caller can no longer read it."}},"required":["id","user_id","project_id","created_at","project"]},"description":"Favorite records ordered by favorite creation descending, ID tie-breaker."}},"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Favorites","x-canonical-documentation":{"domain":"projects","resource":"Projects","subgroup":"Favorites","name":"List project favorites","description":"Lists the caller's favorite records, newest first, each with the project it points to or null when the caller can no longer read it.","operationId":"listProjectFavorites"}}},"/project-favorites/{project_reference}":{"get":{"operationId":"checkProjectFavorite","tags":["projects/Projects/Favorites"],"summary":"Check project favorite status","description":"Returns whether the caller has favorited the project, as is_favorite. Requires project.read.","parameters":[{"schema":{"type":"string","description":"Project UUID, slug, or domain","example":"my-project"},"required":true,"name":"project_reference","in":"path"}],"responses":{"200":{"description":"Whether the caller has favorited the project.","content":{"application/json":{"schema":{"type":"object","properties":{"is_favorite":{"type":"boolean","description":"Whether the current user has a favorite association for this project."},"project_id":{"type":"string","format":"uuid","description":"Identifier of the project whose favorite status was checked."}},"required":["is_favorite","project_id"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Favorites","x-canonical-documentation":{"domain":"projects","resource":"Projects","subgroup":"Favorites","name":"Check project favorite status","description":"Returns whether the caller has favorited the project, as is_favorite. Requires project.read.","operationId":"checkProjectFavorite"}},"post":{"operationId":"createProjectFavorite","tags":["projects/Projects/Favorites"],"summary":"Create project favorite","description":"Adds the project to the caller's favorites and returns the favorite record; a repeat call returns the existing record. Requires project.read.","parameters":[{"schema":{"type":"string","description":"Project UUID, slug, or domain","example":"my-project"},"required":true,"name":"project_reference","in":"path"}],"responses":{"201":{"description":"The favorite record; a repeat request returns the existing record.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Identifier of the favorite record, not the project."},"user_id":{"type":"string","format":"uuid","description":"User who owns the favorite record."},"project_id":{"type":"string","format":"uuid","description":"Identifier of the favorited project."},"created_at":{"type":"string","description":"Timestamp when the favorite record was created."},"project":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid","description":"Identifier of the favorited project."},"name":{"type":"string","description":"Current project display name."},"slug":{"type":"string","description":"Current project slug."},"created_at":{"type":"string","description":"Timestamp when the project was created."},"updated_at":{"type":"string","description":"Timestamp when the project was last updated."}},"required":["id","name","slug","created_at","updated_at"],"description":"The favorited project; null when the caller can no longer read it."}},"required":["id","user_id","project_id","created_at","project"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Favorites","x-canonical-documentation":{"domain":"projects","resource":"Projects","subgroup":"Favorites","name":"Create project favorite","description":"Adds the project to the caller's favorites and returns the favorite record; a repeat call returns the existing record. Requires project.read.","operationId":"createProjectFavorite"}},"delete":{"operationId":"deleteProjectFavorite","tags":["projects/Projects/Favorites"],"summary":"Delete project favorite","description":"Removes the project from the caller's favorites; an absent favorite answers not_found. Requires project.read; API keys also need delete scope.","parameters":[{"schema":{"type":"string","description":"Project UUID, slug, or domain","example":"my-project"},"required":true,"name":"project_reference","in":"path"}],"responses":{"200":{"description":"The favorite was removed; the project is unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project or favorite not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Favorites","x-canonical-documentation":{"domain":"projects","resource":"Projects","subgroup":"Favorites","name":"Delete project favorite","description":"Removes the project from the caller's favorites; an absent favorite answers not_found. Requires project.read; API keys also need delete scope.","operationId":"deleteProjectFavorite"}}},"/accounts/{account_id}/projects":{"get":{"operationId":"listAccountProjects","tags":["projects/Projects/Account Projects"],"summary":"List account projects","description":"List account projects. Requires account.projects.read.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"},{"$ref":"#/components/parameters/PaginationCursor"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"description":"Integer page size from 1 to 100. Defaults to 20.","name":"limit","in":"query"}],"responses":{"200":{"description":"Projects of the account","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AccountProject"},"description":"Projects assigned to the account, newest creation timestamp first, then UUID descending."},"page_info":{"allOf":[{"$ref":"#/components/schemas/PageInfo"},{"type":"object","properties":{"next":{"type":["string","null"],"description":"Copy page_info.next unchanged to continue. Null means there are no more pages."}}}]}},"required":["data","page_info"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account Projects","x-canonical-documentation":{"domain":"projects","resource":"Projects","subgroup":"Account Projects","name":"List account projects","description":"List account projects. Requires account.projects.read.","operationId":"listAccountProjects"}},"post":{"operationId":"createAccountProject","tags":["projects/Projects/Account Projects"],"summary":"Create account project","description":"Create account project. Requires account.projects.create.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Account to receive the new project. Project creation and account assignment are atomic. Requires account.projects.create. The caller remains the billing and seat owner. The caller project limit returns 402 when exhausted."},"required":true,"description":"Account to receive the new project. Project creation and account assignment are atomic. Requires account.projects.create. The caller remains the billing and seat owner. The caller project limit returns 402 when exhausted.","name":"account_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Project display name."},"slug":{"type":"string","minLength":1,"pattern":"^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$","description":"Unique project slug. Omit to generate a slug with a random suffix. An explicit duplicate slug returns 409; creation does not replay an existing project."},"template_slug":{"type":"string","description":"Optional template slug. A template project UUID takes precedence."},"template_project_id":{"type":"string","format":"uuid","description":"Optional template project UUID. Overrides template_slug."}},"required":["name"]}}}},"responses":{"201":{"description":"Project created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountProject"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"The caller has reached the project limit.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The explicit slug is already in use; creation does not replay existing projects.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account Projects","x-canonical-documentation":{"domain":"projects","resource":"Projects","subgroup":"Account Projects","name":"Create account project","description":"Create account project. Requires account.projects.create.","operationId":"createAccountProject"}}},"/projects":{"get":{"operationId":"listProjects","tags":["projects/Projects/Projects"],"summary":"List projects","description":"List the projects.","parameters":[{"schema":{"type":"string","description":"Use page_info.next from the previous response. A null next cursor means the final page.","example":"eyJpZCI6IjEyMyJ9"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Integer page size from 1 to 100. Defaults to 20.","example":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Sort by updated_at, created_at, name, or slug. Defaults to updated_at; unknown fields also use updated_at.","example":"created_at"},"required":false,"name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"description":"Ascending or descending order. Defaults to desc.","example":"desc"},"required":false,"name":"sort_order","in":"query"},{"schema":{"type":"string","description":"Search term to filter projects by name or slug","example":"my-project"},"required":false,"name":"search","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"Filter by template status (true = only templates, false = exclude templates)","example":"false"},"required":false,"name":"is_template","in":"query"},{"schema":{"type":"string","enum":["regular","default","template"],"description":"Filter by project type","example":"default"},"required":false,"name":"type","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"Filter by system managed status","example":"true"},"required":false,"name":"system_managed","in":"query"},{"schema":{"type":"string","enum":["all","owned","invited","shared"],"default":"all","description":"Filter by relationship to the authenticated user: all accessible projects, owned projects, or invited projects","example":"owned"},"required":false,"name":"access","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Only accessible projects in this account."},"required":false,"name":"account_id","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Filter projects by a user ID that has access to them. Non-admin user tokens may only use their own user ID.","example":"660e8400-e29b-41d4-a716-446655440001"},"required":false,"name":"user_id","in":"query"},{"schema":{"type":["array","null"],"items":{"type":"string"},"description":"Label filters as key or key=value, repeated or comma-separated. All filters must match. Example: ?label=team=platform&label=criticality=high"},"required":false,"name":"label","in":"query"}],"responses":{"200":{"description":"Paginated list of projects","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Project"}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"Invalid query or label filter","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Access denied to the requested project scope or user filter","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Projects","x-canonical-documentation":{"domain":"projects","resource":"Projects","subgroup":"Projects","name":"List projects","description":"List the projects.","operationId":"listProjects"}},"post":{"operationId":"createProject","tags":["projects/Projects/Projects"],"summary":"Create project","description":"Create a project.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"description":"Required project name. Creates an owned project. A project-scoped API key cannot create projects; use a user session or account-wide API key."},"slug":{"type":"string","minLength":1,"pattern":"^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$","description":"Project slug; generated when omitted."},"description":{"type":"string","description":"Project description."},"templateSlug":{"type":"string","description":"Starter slug or accessible template project slug. Omit or use blank for an empty project."},"templateProjectId":{"type":"string","format":"uuid","description":"Template project UUID. Without a template, the project starts with no source files."},"account_id":{"type":"string","format":"uuid","description":"Destination account UUID. Defaults to the signed-in user’s default account."}},"required":["name"],"additionalProperties":false},"example":{"name":"My Project","description":"A sample project description","templateSlug":"minimal"}}}},"responses":{"201":{"description":"Project created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Project-scoped tokens cannot create projects","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Template project not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Project slug already exists","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Projects","x-canonical-documentation":{"domain":"projects","resource":"Projects","subgroup":"Projects","name":"Create project","description":"Create a project.","operationId":"createProject"}}},"/projects/{project_reference}":{"get":{"operationId":"getProject","tags":["projects/Projects/Projects"],"summary":"Get project","description":"Return a project. Requires project.read.","parameters":[{"schema":{"type":"string","description":"Project UUID or slug.","example":"my-project"},"required":true,"name":"project_reference","in":"path"}],"responses":{"200":{"description":"Project found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectDetail"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Requires project.read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Projects","x-canonical-documentation":{"domain":"projects","resource":"Projects","subgroup":"Projects","name":"Get project","description":"Return a project. Requires project.read.","operationId":"getProject"}},"patch":{"operationId":"updateProject","tags":["projects/Projects/Projects"],"summary":"Update project","description":"Update a project. Requires project.settings.manage.","parameters":[{"schema":{"type":"string","description":"Project UUID or slug.","example":"my-project"},"required":true,"name":"project_reference","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string","minLength":1,"pattern":"^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$","description":"Lowercase identifier starting with a letter; words may be separated by single hyphens. Omit to keep the current slug."},"name":{"type":"string","minLength":1,"description":"Project name. Omit to keep the current name."},"description":{"type":"string","description":"Project description. An empty string clears it. Omit to keep the current description."},"config":{"$ref":"#/components/schemas/ProjectConfigInput"}},"additionalProperties":false},"example":{"name":"Updated Project Name","description":"Updated description","config":{"is_template":true,"coming_soon":false,"category":"saas"}}}}},"responses":{"200":{"description":"Project updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Requires project.settings.manage","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Project slug already exists","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Projects","x-canonical-documentation":{"domain":"projects","resource":"Projects","subgroup":"Projects","name":"Update project","description":"Update a project. Requires project.settings.manage.","operationId":"updateProject"}},"delete":{"operationId":"deleteProject","tags":["projects/Projects/Projects"],"summary":"Delete project","description":"Delete a project. Requires project.delete; API keys also need delete scope.","parameters":[{"schema":{"type":"string","description":"Project UUID or slug.","example":"my-project"},"required":true,"name":"project_reference","in":"path"}],"responses":{"200":{"description":"Project deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"401":{"description":"Authentication required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Requires project.delete. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Projects","x-canonical-documentation":{"domain":"projects","resource":"Projects","subgroup":"Projects","name":"Delete project","description":"Delete a project. Requires project.delete; API keys also need delete scope.","operationId":"deleteProject"}}},"/projects/lookup-names":{"post":{"operationId":"listProjectNames","tags":["projects/Projects/Projects"],"summary":"List project names","description":"Returns the name and slug for up to 100 project IDs the caller can read, omitting the others.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":100,"description":"Requested project UUIDs, up to 100. Duplicate IDs return one entry. Results are limited to the caller’s existing project access.","example":["123e4567-e89b-42d3-a456-426614174000"]}},"required":["ids"],"additionalProperties":false}}}},"responses":{"200":{"description":"Accessible requested project names","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"]},"maxItems":100,"description":"Accessible requested project summaries containing only id, name and slug; not paginated. Missing or inaccessible projects are omitted without distinguishing the cause."}},"required":["data"]}}}},"400":{"description":"Invalid project ID batch","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Project read permission required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Projects","x-canonical-documentation":{"domain":"projects","resource":"Projects","subgroup":"Projects","name":"List project names","description":"Returns the name and slug for up to 100 project IDs the caller can read, omitting the others.","operationId":"listProjectNames"}}},"/projects/{project_reference}/labels":{"get":{"operationId":"listProjectLabels","tags":["projects/Projects/Project Labels"],"summary":"List project labels","description":"List project labels. Requires project.read.","parameters":[{"schema":{"type":"string","description":"Project UUID or slug.","example":"my-project"},"required":true,"description":"Project UUID or slug.","name":"project_reference","in":"path"}],"responses":{"200":{"description":"Project labels.","content":{"application/json":{"schema":{"type":"object","properties":{"labels":{"type":"array","items":{"$ref":"#/components/schemas/Label"},"description":"All active project labels ordered by namespace, key, and value. This list is not paginated."}},"required":["labels"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Labels","x-canonical-documentation":{"domain":"projects","resource":"Projects","subgroup":"Project Labels","name":"List project labels","description":"List project labels. Requires project.read.","operationId":"listProjectLabels"}},"post":{"operationId":"createProjectLabel","tags":["projects/Projects/Project Labels"],"summary":"Create project label","description":"Create project label. Requires project.settings.manage.","parameters":[{"schema":{"type":"string","description":"Project UUID or slug.","example":"my-project"},"required":true,"description":"Project UUID or slug.","name":"project_reference","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"description":"Required key, trimmed and lowercased. Maximum 64 characters. Normalized duplicate labels are rejected."},"value":{"type":["string","null"],"maxLength":128,"description":"Label value. Trimmed; a supplied blank value is invalid. Omit or use null for a key-only label, including on replacement."},"color":{"type":["string","null"],"maxLength":32,"description":"Display color. Omit, use null or supply a blank string to clear it, including on replacement."}},"required":["key"]}}}},"responses":{"200":{"description":"Created label.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Label"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Labels","x-canonical-documentation":{"domain":"projects","resource":"Projects","subgroup":"Project Labels","name":"Create project label","description":"Create project label. Requires project.settings.manage.","operationId":"createProjectLabel"}}},"/projects/{project_reference}/labels/{label_id}":{"put":{"operationId":"updateProjectLabel","tags":["projects/Projects/Project Labels"],"summary":"Update project label","description":"Update project label. Requires project.settings.manage.","parameters":[{"schema":{"type":"string","description":"Project UUID or slug.","example":"my-project"},"required":true,"description":"Project UUID or slug.","name":"project_reference","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Label UUID within the selected resource."},"required":true,"description":"Label UUID within the selected resource.","name":"label_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"description":"Required key, trimmed and lowercased. Maximum 64 characters. Normalized duplicate labels are rejected."},"value":{"type":["string","null"],"maxLength":128,"description":"Label value. Trimmed; a supplied blank value is invalid. Omit or use null for a key-only label, including on replacement."},"color":{"type":["string","null"],"maxLength":32,"description":"Display color. Omit, use null or supply a blank string to clear it, including on replacement."}},"required":["key"]}}}},"responses":{"200":{"description":"Updated label.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Label"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Labels","x-canonical-documentation":{"domain":"projects","resource":"Projects","subgroup":"Project Labels","name":"Update project label","description":"Update project label. Requires project.settings.manage.","operationId":"updateProjectLabel"}},"delete":{"operationId":"deleteProjectLabel","tags":["projects/Projects/Project Labels"],"summary":"Delete project label","description":"Delete project label. Requires project.settings.manage; API keys also need delete scope.","parameters":[{"schema":{"type":"string","description":"Project UUID or slug.","example":"my-project"},"required":true,"description":"Project UUID or slug.","name":"project_reference","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Active label to soft-delete in the selected project. A missing or already deleted label returns not found."},"required":true,"description":"Active label to soft-delete in the selected project. A missing or already deleted label returns not found.","name":"label_id","in":"path"}],"responses":{"200":{"description":"Label removed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Labels","x-canonical-documentation":{"domain":"projects","resource":"Projects","subgroup":"Project Labels","name":"Delete project label","description":"Delete project label. Requires project.settings.manage; API keys also need delete scope.","operationId":"deleteProjectLabel"}}},"/project-templates":{"get":{"operationId":"listProjectTemplates","tags":["projects/Projects/Project templates"],"security":[],"summary":"List project templates","description":"List the curated project templates, the starter projects a new project is created from, to offer a choice; returns one page of project templates, where REST needs no credentials and returns every curated template and GraphQL requires a signed-in user and returns the public templates and the templates the user is a member of.","parameters":[{"schema":{"type":"string","description":"Search template names or slugs."},"required":false,"description":"Search template names or slugs.","name":"search","in":"query"},{"schema":{"type":"string","description":"Filter by category, for example Store or Landing."},"required":false,"description":"Filter by category, for example Store or Landing.","name":"use_case","in":"query"},{"schema":{"type":"string","enum":["name","slug","created_at","updated_at"],"description":"Optional sort field. Omit sorting to retain curated order."},"required":false,"description":"Optional sort field. Omit sorting to retain curated order.","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"description":"Defaults to asc when sorting. On its own sorts by name."},"required":false,"description":"Defaults to asc when sorting. On its own sorts by name.","name":"sort_order","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"Exclude the blank template before pagination."},"required":false,"description":"Exclude the blank template before pagination.","name":"exclude_blank","in":"query"},{"schema":{"type":"string","description":"Template slug from this filtered list; unknown cursors are rejected."},"required":false,"description":"Template slug from this filtered list; unknown cursors are rejected.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Integer page size from 1 to 100; defaults to 20."},"required":false,"description":"Integer page size from 1 to 100; defaults to 20.","name":"limit","in":"query"}],"responses":{"200":{"description":"A page of curated project templates.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"ID of the template project."},"slug":{"type":"string","description":"Template slug; pass it to create a project from the template."},"name":{"type":"string","description":"Display name."},"description":{"type":"string","description":"Description from the template project configuration, or an empty string."},"category":{"type":"string","description":"Template category, or an empty string when unset."},"preview_url":{"type":["string","null"],"description":"HTTPS preview URL of the template project."},"coming_soon":{"type":"boolean","description":"Whether the template is announced but not yet usable; a search never recommends such a template."},"created_at":{"type":"string","description":"Creation time of the template project as an RFC 3339 UTC timestamp."},"updated_at":{"type":"string","description":"Last update time of the template project as an RFC 3339 UTC timestamp."}},"required":["id","slug","name","description","category","preview_url","coming_soon","created_at","updated_at"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"Invalid query parameters, including an unknown or out-of-filter cursor","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"The credential sent with the request is invalid or expired","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Templates","x-canonical-documentation":{"domain":"projects","resource":"Projects","subgroup":"Project templates","name":"List project templates","description":"List the curated project templates, the starter projects a new project is created from, to offer a choice; returns one page of project templates, where REST needs no credentials and returns every curated template and GraphQL requires a signed-in user and returns the public templates and the templates the user is a member of.","operationId":"listProjectTemplates"}}},"/project-templates/search":{"post":{"operationId":"searchProjectTemplates","tags":["projects/Projects/Project templates"],"security":[{"bearerAuth":[]}],"summary":"Search project templates","description":"Find the project template that best fits a description of what the user wants to build, ranked by a model; requires a signed-in user on every surface and returns the match with its confidence and reasoning.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"user_intent":{"type":"string","minLength":1,"maxLength":500,"description":"Description of what the user wants to build (1 to 500 characters). AI uses this intent to select the best template."}},"required":["user_intent"]},"example":{"user_intent":"A landing page for my SaaS startup with pricing and features sections"}}}},"responses":{"200":{"description":"Best matching project template with confidence score.","content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string","description":"Template slug."},"name":{"type":"string","description":"Template name."},"description":{"type":"string","description":"Template description."},"confidence":{"type":"number","minimum":0,"maximum":1,"description":"Confidence score (0-1)."},"reasoning":{"type":"string","description":"Explanation for why this template was selected."}},"required":["slug","name","description","confidence","reasoning"]}}}},"400":{"description":"Invalid input - user_intent too long or missing","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden - insufficient permissions","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"The model is overloaded (code limit_exceeded); retry after retry_after_seconds, also sent as Retry-After","headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer","format":"int32","minimum":1,"maximum":300}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error - AI processing failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Templates","x-canonical-documentation":{"domain":"projects","resource":"Projects","subgroup":"Project templates","name":"Search project templates","description":"Find the project template that best fits a description of what the user wants to build, ranked by a model; requires a signed-in user on every surface and returns the match with its confidence and reasoning.","operationId":"searchProjectTemplates"}}},"/projects/{project_reference}/files/{file_path}":{"get":{"operationId":"getFile","tags":["projects/Files/Files"],"summary":"Get file","description":"Return a file. Requires project.read.","parameters":[{"schema":{"type":"string","description":"Project slug, UUID, or domain"},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","description":"File path or UUID (URL-encoded, for example, pages%2Findex.mdx)."},"required":true,"name":"file_path","in":"path"},{"schema":{"type":"string","description":"Content to address: `main`, `branch:<name-or-id>`, `release:<version>` or `env:<name>`. Canonical replacement for `branch` and `branch_id`.","example":"branch:feature-x"},"required":false,"name":"ref","in":"query"},{"schema":{"type":"string","description":"Branch name or ID. Legacy alias for `ref=branch:<value>`.","example":"feature-x"},"required":false,"name":"branch","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Branch ID. Legacy alias for `ref=branch:<uuid>`."},"required":false,"name":"branch_id","in":"query"},{"schema":{"type":"string","pattern":"^!?\\([^)]*\\)$","description":"Response fields to include or exclude. Examples: `(id,name)`, `(id,files(path))`, and `!(content)`.","example":"(id,path,type,size)"},"required":false,"name":"fields","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"Treat the identifier as an exact path, without file-ID or extension fallback. Defaults to false."},"required":false,"description":"Treat the identifier as an exact path, without file-ID or extension fallback. Defaults to false.","name":"exact_path","in":"query"}],"responses":{"200":{"description":"File content with metadata with selectable response fields.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"version_id":{"type":"string"},"path":{"type":"string"},"content":{"type":"string"},"size":{"type":"number","description":"Size of the file content encoded as UTF-8, in bytes."},"type":{"type":"string","enum":["page","function","component","file"]},"updated_at":{"type":"string"},"binary":{"type":"object","properties":{"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"byte_size":{"type":"integer","minimum":0,"maximum":8388608},"content_type":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[\\x20-\\x7e]+$"}},"required":["content_hash","byte_size","content_type"],"additionalProperties":false},"checksum":{"type":["string","null"]},"size_bytes":{"type":"number","description":"Size of the file content encoded as UTF-8, in bytes."},"_links":{"type":"object","additionalProperties":{"type":"object","properties":{"href":{"type":"string","description":"URL of the linked resource"},"method":{"type":"string","description":"HTTP method for this link (default: GET)"},"title":{"type":"string","description":"Human-readable description of the link"}},"required":["href"]},"description":"Hypermedia links for resource navigation"}},"required":["path","content","size","type","updated_at","size_bytes"]}}}},"400":{"description":"Missing file path or ID","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden - insufficient permissions","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"File not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Files","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"Files","name":"Get file","description":"Return a file. Requires project.read.","operationId":"getFile"}},"put":{"operationId":"writeFile","tags":["projects/Files/Files"],"summary":"Write file","description":"Create a file or replace its content. Requires project.files.write.","parameters":[{"schema":{"type":"string","description":"Project slug, UUID, or domain"},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","description":"File path (URL-encoded, for example, pages%2Findex.mdx)."},"required":true,"name":"file_path","in":"path"},{"schema":{"type":"string","description":"Mutable content to address: main or branch:<name-or-id>. Omit for main. Release and environment selectors return 400. Supplied aliases must name the same content.","example":"branch:feature-x"},"required":false,"name":"ref","in":"query"},{"schema":{"type":"string","description":"Branch name or ID; legacy alias for ref=branch:<value>. Supplied aliases must agree."},"required":false,"name":"branch","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Branch UUID; legacy alias for ref=branch:<uuid>. Supplied aliases must agree."},"required":false,"name":"branch_id","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","description":"Replacement textual content in main or the selected branch, stored as a new immutable version. Source-file MIME type is not writable."},"expected_checksum":{"type":"string","description":"Expected current checksum when updating an existing file; ignored on creation. Omission disables this guard."},"expected_version_id":{"type":"string","description":"Expected current version ID when updating an existing file; ignored on creation. Omission disables this guard."},"metadata":{"type":"object","additionalProperties":{},"description":"Optional durable file-version metadata for source provenance; service-owned visibility keys are rejected."},"expected_absent":{"type":"boolean","description":"True requires absence atomically when creating; an existing file returns 409. False or omission retains upsert behavior."}},"required":["content"],"additionalProperties":false}}}},"responses":{"200":{"description":"File updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Path-derived file identifier."},"file_id":{"type":"string","description":"Alias for id; canonical file identifier committed by this write."},"path":{"type":"string","description":"Normalized stored file path."},"content":{"type":"string","description":"Text supplied by this write request."},"size":{"type":"number","description":"Size of the file content encoded as UTF-8, in bytes."},"updated_at":{"type":"string","description":"Response timestamp for the successful update."},"version_id":{"type":"string","description":"Version ID the write produced."},"type":{"type":"string","enum":["page","function","component","file"],"description":"File kind: page, function, component or file."},"size_bytes":{"type":"number","description":"Size of the content encoded as UTF-8, in bytes."},"checksum":{"type":["string","null"],"description":"SHA-256 content hash, or null when unavailable."}},"required":["id","file_id","path","content","size","updated_at"]}}}},"201":{"description":"File created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Path-derived file identifier."},"file_id":{"type":"string","description":"Alias for id; canonical file identifier committed by this write."},"path":{"type":"string","description":"Normalized stored file path."},"content":{"type":"string","description":"Text supplied by this write request."},"size":{"type":"number","description":"Size of the file content encoded as UTF-8, in bytes."},"created_at":{"type":"string","description":"Response timestamp for successful creation."},"updated_at":{"type":"string","description":"Same instant as created_at."},"version_id":{"type":"string","description":"Version ID the write produced."},"type":{"type":"string","enum":["page","function","component","file"],"description":"File kind: page, function, component or file."},"size_bytes":{"type":"number","description":"Size of the content encoded as UTF-8, in bytes."},"checksum":{"type":["string","null"],"description":"SHA-256 content hash, or null when unavailable."}},"required":["id","file_id","path","content","size","created_at"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Files","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"Files","name":"Write file","description":"Create a file or replace its content. Requires project.files.write.","operationId":"writeFile"}},"delete":{"operationId":"deleteFile","tags":["projects/Files/Files"],"summary":"Delete file","description":"Delete a file. Requires project.files.write; API keys also need delete scope.","parameters":[{"schema":{"type":"string","description":"Project slug, UUID, or domain"},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","description":"File path whose deletion appends a deletion version in main or the selected branch; immutable history remains. URL-encode this path when supplied in a REST URL."},"required":true,"description":"File path whose deletion appends a deletion version in main or the selected branch; immutable history remains. URL-encode this path when supplied in a REST URL.","name":"file_path","in":"path"},{"schema":{"type":"string","description":"Mutable content to address: main or branch:<name-or-id>. Omit for main. Release and environment selectors return 400. Supplied aliases must name the same content.","example":"branch:feature-x"},"required":false,"name":"ref","in":"query"},{"schema":{"type":"string","description":"Branch name or ID; legacy alias for ref=branch:<value>. Supplied aliases must agree."},"required":false,"name":"branch","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Branch UUID; legacy alias for ref=branch:<uuid>. Supplied aliases must agree."},"required":false,"name":"branch_id","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Expected current version ID. Omit for an unguarded deletion; a stale version returns 409."},"required":false,"name":"expected_version_id","in":"query"}],"responses":{"200":{"description":"File deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Files","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"Files","name":"Delete file","description":"Delete a file. Requires project.files.write; API keys also need delete scope.","operationId":"deleteFile"}}},"/projects/{project_reference}/files":{"get":{"operationId":"listFiles","tags":["projects/Files/Files"],"summary":"List files","description":"List the files. Requires project.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Content to address: `main`, `branch:<name-or-id>`, `release:<version>` or `env:<name>`. Canonical replacement for `branch` and `branch_id`.","example":"branch:feature-x"},"required":false,"name":"ref","in":"query"},{"schema":{"type":"string","description":"Branch name or ID. Legacy alias for `ref=branch:<value>`.","example":"feature-x"},"required":false,"name":"branch","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Branch ID. Legacy alias for `ref=branch:<uuid>`."},"required":false,"name":"branch_id","in":"query"},{"schema":{"type":"string","maxLength":1024,"description":"File pattern filter (for example, *.tsx)."},"required":false,"description":"File pattern filter (for example, *.tsx).","name":"pattern","in":"query"},{"$ref":"#/components/parameters/PaginationCursor"},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":20,"description":"Files per page. At most 100 when the listing includes content, and at most 1000 when `fields` excludes content.","example":20},"required":false,"description":"Files per page. At most 100 when the listing includes content, and at most 1000 when `fields` excludes content.","name":"limit","in":"query"},{"schema":{"type":"string","enum":["path","updated_at"],"default":"updated_at","description":"Sort by path or last update time (default updated_at)."},"required":false,"name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort order."},"required":false,"name":"sort_order","in":"query"},{"schema":{"type":"string","pattern":"^!?\\([^)]*\\)$","description":"Response fields to include or exclude. Examples: `(id,name)`, `(id,files(path))`, and `!(content)`.","example":"(id,path,type,size)"},"required":false,"name":"fields","in":"query"}],"responses":{"200":{"description":"Paginated list of files with selectable response fields.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"version_id":{"type":"string"},"path":{"type":"string"},"content":{"type":"string"},"size":{"type":"number","description":"Size of the file content encoded as UTF-8, in bytes."},"type":{"type":"string","enum":["page","function","component","file"]},"updated_at":{"type":"string"},"binary":{"type":"object","properties":{"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"byte_size":{"type":"integer","minimum":0,"maximum":8388608},"content_type":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[\\x20-\\x7e]+$"}},"required":["content_hash","byte_size","content_type"],"additionalProperties":false},"checksum":{"type":["string","null"]},"size_bytes":{"type":"number","description":"Size of the file content encoded as UTF-8, in bytes."},"_links":{"type":"object","properties":{"self":{"type":"object","properties":{"href":{"type":"string"}},"required":["href"]}},"required":["self"]}},"required":["path","content","size","type","updated_at","size_bytes"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"},"_links":{"type":"object","additionalProperties":{"type":"object","properties":{"href":{"type":"string","description":"URL of the linked resource"},"method":{"type":"string","description":"HTTP method for this link (default: GET)"},"title":{"type":"string","description":"Human-readable description of the link"}},"required":["href"]},"description":"Hypermedia links for resource navigation"}},"required":["data","page_info","_links"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden - insufficient permissions","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Files","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"Files","name":"List files","description":"List the files. Requires project.read.","operationId":"listFiles"}}},"/projects/{project_reference}/files/batch":{"post":{"operationId":"getFiles","tags":["projects/Files/Files"],"summary":"Get files","description":"Return the files at the given paths. Requires project.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Content to address: `main`, `branch:<name-or-id>`, `release:<version>` or `env:<name>`. Canonical replacement for `branch` and `branch_id`.","example":"branch:feature-x"},"required":false,"name":"ref","in":"query"},{"schema":{"type":"string","description":"Branch name or ID. Legacy alias for `ref=branch:<value>`.","example":"feature-x"},"required":false,"name":"branch","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Branch ID. Legacy alias for `ref=branch:<uuid>`."},"required":false,"name":"branch_id","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"paths":{"type":"array","items":{"type":"string"},"description":"Array of file paths to fetch"}},"required":["paths"]}}}},"responses":{"200":{"description":"Files with content.","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The requested path, or the stored path of the file it resolved to."},"type":{"type":"string","description":"File type. A server function the caller may not read is reported as `function`."},"content":{"type":"string","description":"File content. Empty when the file is not found or not readable."},"size":{"type":"number","description":"Size of the file content encoded as UTF-8, in bytes."},"found":{"type":"boolean","description":"Whether the file was found and is readable by the caller."},"binary":{"type":"object","properties":{"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"byte_size":{"type":"integer","minimum":0,"maximum":8388608},"content_type":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[\\x20-\\x7e]+$"}},"required":["content_hash","byte_size","content_type"],"additionalProperties":false},"checksum":{"type":["string","null"]},"error":{"type":"string","description":"Why the read of this path failed, when it failed."}},"required":["path","type","content","size","found"]}},"data":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The requested path, or the stored path of the file it resolved to."},"found":{"type":"boolean","description":"False for a path that names no file or a file the caller may not read."},"file":{"type":["object","null"],"properties":{"id":{"type":["string","null"],"description":"File ID, or null when the content source supplies none."},"version_id":{"type":["string","null"],"description":"Current version ID, or null when the content source supplies none."},"path":{"type":"string","description":"Project-relative source path."},"type":{"type":"string","enum":["page","function","component","file"],"description":"File kind: page, function, component or file."},"content":{"type":"string","description":"Full text content."},"size_bytes":{"type":"number","description":"Size of the content encoded as UTF-8, in bytes."},"binary":{"type":"object","properties":{"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"byte_size":{"type":"integer","minimum":0,"maximum":8388608},"content_type":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[\\x20-\\x7e]+$"}},"required":["content_hash","byte_size","content_type"],"additionalProperties":false},"checksum":{"type":["string","null"],"description":"SHA-256 content hash, or null when unavailable."},"updated_at":{"type":"string","description":"Last content update time, RFC 3339."}},"required":["id","version_id","path","type","content","size_bytes","checksum","updated_at"],"description":"The file, or null when found is false."},"error":{"type":["object","null"],"properties":{"code":{"type":"string","enum":["internal"],"description":"Always internal: the read of this path failed."},"message":{"type":"string","description":"Why the read of this path failed."}},"required":["code","message"],"description":"Set only when the read of this path failed; null for a missing or restricted path."}},"required":["path","found","file","error"]},"description":"The same entries in the canonical shape: the file, or found false, with error set only for a failed read."}},"required":["files","data"]}}}},"400":{"description":"Invalid input, or an invalid or conflicting content selector","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden - insufficient permissions","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Files","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"Files","name":"Get files","description":"Return the files at the given paths. Requires project.read.","operationId":"getFiles"}}},"/projects/{project_reference}/files/{file_path}/diff":{"get":{"operationId":"getFileDiff","tags":["projects/Files/Files"],"summary":"Get file diff","description":"Return file diff. Requires project.read.","parameters":[{"schema":{"type":"string","description":"Project slug, UUID, or domain"},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","description":"File path (URL-encoded, for example, pages%2Findex.mdx)."},"required":true,"name":"file_path","in":"path"},{"schema":{"type":"string","description":"Content to address: `main`, `branch:<name-or-id>`, `release:<version>` or `env:<name>`. Canonical replacement for `branch` and `branch_id`.","example":"branch:feature-x"},"required":false,"name":"ref","in":"query"},{"schema":{"type":"string","description":"Branch name or ID. Legacy alias for `ref=branch:<value>`.","example":"feature-x"},"required":false,"name":"branch","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Branch ID. Legacy alias for `ref=branch:<uuid>`."},"required":false,"name":"branch_id","in":"query"},{"schema":{"type":"string","description":"Source version ID to compare from. Required for main, release and environment selectors; a branch selector defaults to a diff against main."},"required":false,"description":"Source version ID to compare from. Required for main, release and environment selectors; a branch selector defaults to a diff against main.","name":"source_ref","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":10,"default":3,"description":"Number of context lines around changes (default: 3)"},"required":false,"description":"Number of context lines around changes (default: 3)","name":"context_lines","in":"query"}],"responses":{"200":{"description":"Unified diff in git-compatible format.","content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string"},"diff":{"type":"string"},"additions":{"type":"number"},"deletions":{"type":"number"}},"required":["path","diff","additions","deletions"]}}}},"400":{"description":"Missing file path or source_ref, or an invalid or conflicting content selector","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden - insufficient permissions","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"File or version not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Files","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"Files","name":"Get file diff","description":"Return file diff. Requires project.read.","operationId":"getFileDiff"}}},"/projects/{project_reference}/files/{file_path}/move":{"post":{"operationId":"moveFile","tags":["projects/Files/Files"],"summary":"Move file","description":"Move a file. Requires project.files.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Current file path (URL-encoded, for example, pages%2Findex.mdx)."},"required":true,"name":"file_path","in":"path"},{"schema":{"type":"string","description":"Mutable content to address: main or branch:<name-or-id>. Omit for main. Release and environment selectors return 400. Supplied aliases must name the same content.","example":"branch:feature-x"},"required":false,"name":"ref","in":"query"},{"schema":{"type":"string","description":"Branch name or ID; legacy alias for ref=branch:<value>. Supplied aliases must agree."},"required":false,"name":"branch","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Branch UUID; legacy alias for ref=branch:<uuid>. Supplied aliases must agree."},"required":false,"name":"branch_id","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"destination_path":{"type":"string","minLength":1,"description":"Destination file path. The source receives a deletion version and the destination receives a new file ID derived from its path; immutable history remains."},"expected_version_id":{"type":"string","description":"Expected source version observed by the caller; a stale version returns 409. The move also fences its captured source version and requires an absent destination."}},"required":["destination_path"],"additionalProperties":false}}}},"responses":{"200":{"description":"The file at its new path.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":["string","null"],"description":"File ID, or null when the content source supplies none."},"version_id":{"type":["string","null"],"description":"Current version ID, or null when the content source supplies none."},"path":{"type":"string","description":"Project-relative source path."},"type":{"type":"string","enum":["page","function","component","file"],"description":"File kind: page, function, component or file."},"content":{"type":"string","description":"Full text content."},"size_bytes":{"type":"number","description":"Size of the content encoded as UTF-8, in bytes."},"binary":{"type":"object","properties":{"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"byte_size":{"type":"integer","minimum":0,"maximum":8388608},"content_type":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[\\x20-\\x7e]+$"}},"required":["content_hash","byte_size","content_type"],"additionalProperties":false},"checksum":{"type":["string","null"],"description":"SHA-256 content hash, or null when unavailable."},"updated_at":{"type":"string","description":"Last content update time, RFC 3339."}},"required":["id","path"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Files","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"Files","name":"Move file","description":"Move a file. Requires project.files.write.","operationId":"moveFile"}}},"/projects/{project_reference}/branches/{branchName}/files/{filePath}/index":{"post":{"operationId":"commitCanonicalFileIndex","tags":["projects/Files/File Chunks"],"summary":"Commit complete canonical file index","description":"Atomically replace the complete chunk and embedding set for the expected current canonical knowledge version. Requires project.files.write.","parameters":[{"schema":{"type":"string","description":"Project ID, slug, or domain from the authenticated context."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","description":"Branch name or ID from the route."},"required":true,"name":"branchName","in":"path"},{"schema":{"type":"string","description":"URL-encoded file path for the chunked file."},"required":true,"name":"filePath","in":"path"}],"requestBody":{"description":"Supply 0–500 contiguous chunks with real aligned vectors from the canonical embedding model; an empty set is accepted only when the version body has no indexable content (empty, whitespace-only or frontmatter-only). The complete request is limited to 32 MiB. Larger sets fail without truncation. Indexes are replaced only for the selected writable branch; release indexes are immutable. Identical durable replay retains chunk IDs. The example indexes an empty document; replace its sample version ID.","content":{"application/json":{"schema":{"type":"object","properties":{"expected_version_id":{"type":"string","format":"uuid"},"chunks":{"type":"array","items":{"type":"object","properties":{"chunk_index":{"type":"integer","minimum":0},"content":{"type":"string","minLength":1},"start_offset":{"type":"integer","minimum":0},"end_offset":{"type":"integer","minimum":0},"token_count":{"type":"integer","exclusiveMinimum":0,"maximum":32767},"metadata":{"type":"object","additionalProperties":{}},"vector":{"type":"array","items":{"type":"number"},"maxItems":4096}},"required":["chunk_index","content","start_offset","end_offset","token_count","vector"],"additionalProperties":false},"maxItems":500},"model":{"type":"object","properties":{"name":{"type":"string","minLength":1},"provider":{"type":"string","minLength":1},"dimension":{"anyOf":[{"type":"number","enum":[768]},{"type":"number","enum":[1024]},{"type":"number","enum":[1536]},{"type":"number","enum":[3072]},{"type":"number","enum":[4096]}]}},"required":["name","provider","dimension"],"additionalProperties":false}},"required":["expected_version_id","chunks","model"],"additionalProperties":false},"example":{"expected_version_id":"11111111-1111-4111-8111-111111111111","chunks":[],"model":{"name":"google/gemini-embedding-001","provider":"google","dimension":3072}}}}},"responses":{"200":{"description":"Durable complete index","content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","format":"uuid"},"version_id":{"type":"string","format":"uuid"},"path":{"type":"string"},"checksum":{"type":["string","null"]},"indexed_chunk_count":{"type":"integer","minimum":0},"model":{"type":"object","properties":{"name":{"type":"string","minLength":1},"provider":{"type":"string","minLength":1},"dimension":{"anyOf":[{"type":"number","enum":[768]},{"type":"number","enum":[1024]},{"type":"number","enum":[1536]},{"type":"number","enum":[3072]},{"type":"number","enum":[4096]}]}},"required":["name","provider","dimension"]}},"required":["file_id","version_id","path","checksum","indexed_chunk_count","model"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"File Chunks","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"File Chunks","name":"Commit complete canonical file index","description":"Atomically replace the complete chunk and embedding set for the expected current canonical knowledge version. Requires project.files.write.","operationId":"commitCanonicalFileIndex"}}},"/projects/{project_reference}/branches/{branchName}/files/{filePath}/chunks":{"get":{"operationId":"listBranchFileChunks","tags":["projects/Files/File Chunks"],"summary":"List branch file chunks","description":"List branch file chunks. Requires project.knowledge.read.","parameters":[{"schema":{"type":"string","description":"Project ID, slug, or domain from the authenticated context."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","description":"Branch name or ID from the route."},"required":true,"name":"branchName","in":"path"},{"schema":{"type":"string","description":"URL-encoded file path for the chunked file."},"required":true,"name":"filePath","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":100,"description":"Maximum chunks to return, from 1 to 100."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Opaque cursor from `page_info.next`."},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"boolean","default":false,"description":"Whether to include embedding metadata when available."},"required":false,"name":"include_embeddings","in":"query"},{"schema":{"type":"number","description":"Embedding vector dimension; required when embedding metadata is requested.","example":1536},"required":false,"name":"embedding_dimension","in":"query"},{"schema":{"type":"boolean","description":"Include the stored vector with requested embedding metadata. Use with the embedding inclusion flag.","example":false},"required":false,"name":"include_vector","in":"query"}],"responses":{"200":{"description":"File chunks.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileChunkList"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"File Chunks","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"File Chunks","name":"List branch file chunks","description":"List branch file chunks. Requires project.knowledge.read.","operationId":"listBranchFileChunks"}},"post":{"operationId":"upsertBranchFileChunks","tags":["projects/Files/File Chunks"],"summary":"Upsert branch file chunks","description":"Upsert branch file chunks. Requires project.knowledge.write.","parameters":[{"schema":{"type":"string","description":"Project ID, slug, or domain from the authenticated context."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","description":"Branch name or ID from the route."},"required":true,"name":"branchName","in":"path"},{"schema":{"type":"string","description":"URL-encoded file path for the chunked file."},"required":true,"name":"filePath","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"chunks":{"type":"array","items":{"type":"object","properties":{"chunk_index":{"type":"number","minimum":0,"description":"Zero-based chunk position within the file."},"content":{"type":"string","minLength":1,"description":"Text content for this chunk."},"start_offset":{"type":"number","minimum":0,"description":"Start character offset in the source file."},"end_offset":{"type":"number","minimum":0,"description":"End character offset in the source file."},"token_count":{"type":"number","minimum":1,"maximum":32767,"description":"Estimated token count for the chunk content."},"metadata":{"type":"object","additionalProperties":{},"description":"Optional client metadata stored with the chunk."}},"required":["chunk_index","content","start_offset","end_offset","token_count"]},"minItems":1,"maxItems":500,"description":"Chunks to replace the current indexed chunks for the file."}},"required":["chunks"]}}}},"responses":{"200":{"description":"Result.","content":{"application/json":{"schema":{"type":"object","properties":{"chunks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"index":{"type":"number"}},"required":["id","index"]},"description":"Stored chunk identifiers and their indexes."},"created":{"type":"number","description":"Number of chunks created by the upsert operation."},"updated":{"type":"number","description":"Number of chunks updated by the upsert operation."}},"required":["chunks","created","updated"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"File Chunks","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"File Chunks","name":"Upsert branch file chunks","description":"Upsert branch file chunks. Requires project.knowledge.write.","operationId":"upsertBranchFileChunks"}},"delete":{"operationId":"deleteBranchFileChunks","tags":["projects/Files/File Chunks"],"summary":"Delete branch file chunks","description":"Delete branch file chunks. Requires project.knowledge.write; API keys also need delete scope.","parameters":[{"schema":{"type":"string","description":"Project ID, slug, or domain from the authenticated context."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","description":"Branch name or ID from the route."},"required":true,"name":"branchName","in":"path"},{"schema":{"type":"string","description":"URL-encoded file path for the chunked file."},"required":true,"name":"filePath","in":"path"}],"responses":{"200":{"description":"Result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"File Chunks","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"File Chunks","name":"Delete branch file chunks","description":"Delete branch file chunks. Requires project.knowledge.write; API keys also need delete scope.","operationId":"deleteBranchFileChunks"}}},"/projects/{project_reference}/chunks":{"get":{"operationId":"listProjectChunks","tags":["projects/Files/File Chunks"],"summary":"List chunks","description":"List the chunks. Requires project.knowledge.read.","parameters":[{"schema":{"type":"string","description":"Project ID or slug."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","description":"Offset cursor returned from `page_info.next` or `page_info.prev`."},"required":false,"description":"Offset cursor returned from `page_info.next` or `page_info.prev`.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":100,"description":"Maximum number of chunks to return, from 1 to 100."},"required":false,"description":"Maximum number of chunks to return, from 1 to 100.","name":"limit","in":"query"}],"responses":{"200":{"description":"List of project chunks.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Chunk ID."},"file_path":{"type":"string","description":"Source file path for this chunk."},"file_id":{"type":"string","format":"uuid","description":"Optional source file ID."},"file_version_id":{"type":"string","format":"uuid","description":"File version ID containing this chunk."},"index":{"type":"number","description":"Chunk index within the source file version."},"content":{"type":"string","description":"Indexed chunk text content."},"start_offset":{"type":"number","description":"Start character offset in the source file."},"end_offset":{"type":"number","description":"End character offset in the source file."},"token_count":{"type":"number","description":"Estimated token count for this chunk."}},"required":["id","file_path","file_version_id","index","content","start_offset","end_offset","token_count"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"File Chunks","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"File Chunks","name":"List chunks","description":"List the chunks. Requires project.knowledge.read.","operationId":"listProjectChunks"}}},"/projects/{project_reference}/environments/{environmentName}/files/{filePath}/chunks":{"get":{"operationId":"listEnvironmentFileChunks","tags":["projects/Files/File Chunks"],"summary":"List environment file chunks","description":"List environment file chunks. Requires project.knowledge.read.","parameters":[{"schema":{"type":"string","description":"Project ID, slug, or domain from the authenticated context."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","description":"Environment name from the route."},"required":true,"name":"environmentName","in":"path"},{"schema":{"type":"string","description":"URL-encoded file path for the chunked file."},"required":true,"name":"filePath","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":100,"description":"Maximum chunks to return, from 1 to 100."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Opaque cursor from `page_info.next`."},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"boolean","default":false,"description":"Whether to include embedding metadata when available."},"required":false,"name":"include_embeddings","in":"query"},{"schema":{"type":"number","description":"Embedding vector dimension; required when embedding metadata is requested.","example":1536},"required":false,"name":"embedding_dimension","in":"query"},{"schema":{"type":"boolean","description":"Include the stored vector with requested embedding metadata. Use with the embedding inclusion flag.","example":false},"required":false,"name":"include_vector","in":"query"}],"responses":{"200":{"description":"File chunks.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileChunkList"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"File Chunks","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"File Chunks","name":"List environment file chunks","description":"List environment file chunks. Requires project.knowledge.read.","operationId":"listEnvironmentFileChunks"}}},"/projects/{project_reference}/releases/{version}/files/{filePath}/chunks":{"get":{"operationId":"listReleaseFileChunks","tags":["projects/Files/File Chunks"],"summary":"List release file chunks","description":"List release file chunks. Requires project.knowledge.read.","parameters":[{"schema":{"type":"string","description":"Project ID, slug, or domain from the authenticated context."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","description":"Release version from the route."},"required":true,"name":"version","in":"path"},{"schema":{"type":"string","description":"URL-encoded file path for the chunked file."},"required":true,"name":"filePath","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":100,"description":"Maximum chunks to return, from 1 to 100."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Opaque cursor from `page_info.next`."},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"boolean","default":false,"description":"Whether to include embedding metadata when available."},"required":false,"name":"include_embeddings","in":"query"},{"schema":{"type":"number","description":"Embedding vector dimension; required when embedding metadata is requested.","example":1536},"required":false,"name":"embedding_dimension","in":"query"},{"schema":{"type":"boolean","description":"Include the stored vector with requested embedding metadata. Use with the embedding inclusion flag.","example":false},"required":false,"name":"include_vector","in":"query"}],"responses":{"200":{"description":"File chunks.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileChunkList"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"File Chunks","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"File Chunks","name":"List release file chunks","description":"List release file chunks. Requires project.knowledge.read.","operationId":"listReleaseFileChunks"}}},"/projects/{project_reference}/branches/{branchName}/files/{filePath}/chunks/{chunkId}":{"get":{"operationId":"getBranchFileChunk","tags":["projects/Files/File Chunks"],"summary":"Get branch file chunk","description":"Return branch file chunk. Requires project.knowledge.read.","parameters":[{"schema":{"type":"string","description":"Project ID, slug, or domain from the authenticated context."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","description":"Branch name or ID from the route."},"required":true,"name":"branchName","in":"path"},{"schema":{"type":"string","description":"URL-encoded file path for the chunked file."},"required":true,"name":"filePath","in":"path"},{"schema":{"type":"string","format":"uuid","description":"File chunk UUID."},"required":true,"name":"chunkId","in":"path"},{"schema":{"type":"boolean","default":false,"description":"Whether to include embedding metadata when available."},"required":false,"name":"include_embedding","in":"query"},{"schema":{"type":"number","description":"Embedding vector dimension; required when embedding metadata is requested.","example":1536},"required":false,"name":"embedding_dimension","in":"query"},{"schema":{"type":"boolean","description":"Include the stored vector with requested embedding metadata. Use with the embedding inclusion flag.","example":false},"required":false,"name":"include_vector","in":"query"}],"responses":{"200":{"description":"Chunk.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileChunk"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"File Chunks","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"File Chunks","name":"Get branch file chunk","description":"Return branch file chunk. Requires project.knowledge.read.","operationId":"getBranchFileChunk"}}},"/projects/{project_reference}/environments/{environmentName}/files/{filePath}/chunks/{chunkId}":{"get":{"operationId":"getEnvironmentFileChunk","tags":["projects/Files/File Chunks"],"summary":"Get environment file chunk","description":"Return environment file chunk. Requires project.knowledge.read.","parameters":[{"schema":{"type":"string","description":"Project ID, slug, or domain from the authenticated context."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","description":"Environment name from the route."},"required":true,"name":"environmentName","in":"path"},{"schema":{"type":"string","description":"URL-encoded file path for the chunked file."},"required":true,"name":"filePath","in":"path"},{"schema":{"type":"string","format":"uuid","description":"File chunk UUID."},"required":true,"name":"chunkId","in":"path"},{"schema":{"type":"boolean","default":false,"description":"Whether to include embedding metadata when available."},"required":false,"name":"include_embedding","in":"query"},{"schema":{"type":"number","description":"Embedding vector dimension; required when embedding metadata is requested.","example":1536},"required":false,"name":"embedding_dimension","in":"query"},{"schema":{"type":"boolean","description":"Include the stored vector with requested embedding metadata. Use with the embedding inclusion flag.","example":false},"required":false,"name":"include_vector","in":"query"}],"responses":{"200":{"description":"Chunk.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileChunk"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"File Chunks","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"File Chunks","name":"Get environment file chunk","description":"Return environment file chunk. Requires project.knowledge.read.","operationId":"getEnvironmentFileChunk"}}},"/projects/{project_reference}/releases/{version}/files/{filePath}/chunks/{chunkId}":{"get":{"operationId":"getReleaseFileChunk","tags":["projects/Files/File Chunks"],"summary":"Get release file chunk","description":"Return release file chunk. Requires project.knowledge.read.","parameters":[{"schema":{"type":"string","description":"Project ID, slug, or domain from the authenticated context."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","description":"Release version from the route."},"required":true,"name":"version","in":"path"},{"schema":{"type":"string","description":"URL-encoded file path for the chunked file."},"required":true,"name":"filePath","in":"path"},{"schema":{"type":"string","format":"uuid","description":"File chunk UUID."},"required":true,"name":"chunkId","in":"path"},{"schema":{"type":"boolean","default":false,"description":"Whether to include embedding metadata when available."},"required":false,"name":"include_embedding","in":"query"},{"schema":{"type":"number","description":"Embedding vector dimension; required when embedding metadata is requested.","example":1536},"required":false,"name":"embedding_dimension","in":"query"},{"schema":{"type":"boolean","description":"Include the stored vector with requested embedding metadata. Use with the embedding inclusion flag.","example":false},"required":false,"name":"include_vector","in":"query"}],"responses":{"200":{"description":"Chunk.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileChunk"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"File Chunks","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"File Chunks","name":"Get release file chunk","description":"Return release file chunk. Requires project.knowledge.read.","operationId":"getReleaseFileChunk"}}},"/projects/{project_reference}/branches/{branchName}/files/{filePath}/versions":{"get":{"operationId":"listBranchFileVersions","tags":["projects/Files/Branch File Versions"],"summary":"List branch file versions","description":"List branch file versions. Requires project.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Branch name"},"required":true,"name":"branchName","in":"path"},{"schema":{"type":"string","description":"File path (URL-encoded, for example, pages%2Findex.mdx)."},"required":true,"name":"filePath","in":"path"},{"schema":{"type":"string","description":"Forward-only cursor through branch-aware committed history bounded by the branch snapshot. page_info.prev is always null."},"required":false,"name":"cursor","in":"query"},{"$ref":"#/components/parameters/PaginationLimit"}],"responses":{"200":{"description":"Paginated list of branch file versions.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"binary":{"type":"object","properties":{"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"byte_size":{"type":"integer","minimum":0,"maximum":8388608},"content_type":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[\\x20-\\x7e]+$"}},"required":["content_hash","byte_size","content_type"],"additionalProperties":false},"id":{"type":"string"},"file_id":{"type":"string"},"path":{"type":"string"},"type":{"type":"string","enum":["page","function","component","file"]},"created_at":{"type":"string"},"created_by":{"type":["string","null"]}},"required":["id","path","type","created_at","created_by"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"Invalid branch file history cursor or page size.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Branch File Versions","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"Branch File Versions","name":"List branch file versions","description":"List branch file versions. Requires project.read.","operationId":"listBranchFileVersions"}}},"/projects/{project_reference}/branches/{branchName}/files/{filePath}/versions/{version_id}":{"get":{"operationId":"getBranchFileVersion","tags":["projects/Files/Branch File Versions"],"summary":"Get branch file version","description":"Return branch file version. Requires project.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Branch name"},"required":true,"name":"branchName","in":"path"},{"schema":{"type":"string","description":"File path (URL-encoded, for example, pages%2Findex.mdx)."},"required":true,"name":"filePath","in":"path"},{"schema":{"type":"string","description":"Committed version UUID or newest-first index 0–99; zero is the newest branch-aware version."},"required":true,"description":"Committed version UUID or newest-first index 0–99; zero is the newest branch-aware version.","name":"version_id","in":"path"}],"responses":{"200":{"description":"Branch file version content with metadata.","content":{"application/json":{"schema":{"type":"object","properties":{"binary":{"type":"object","properties":{"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"byte_size":{"type":"integer","minimum":0,"maximum":8388608},"content_type":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[\\x20-\\x7e]+$"}},"required":["content_hash","byte_size","content_type"],"additionalProperties":false},"id":{"type":"string","description":"Committed version identifier."},"path":{"type":"string","description":"Canonical path of the versioned file."},"content":{"type":"string","description":"Full content stored for this version."},"size":{"type":"number","description":"Size of the version content in UTF-8 bytes."},"type":{"type":"string","enum":["page","function","component","file"],"description":"File kind derived from its path: page, function, component, or file."},"updated_at":{"type":"string","description":"Persisted creation or selection timestamp for this version."}},"required":["id","path","content","size","type","updated_at"]}}}},"400":{"description":"Invalid version reference; provide a UUID or newest-first index 0–99.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Branch File Versions","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"Branch File Versions","name":"Get branch file version","description":"Return branch file version. Requires project.read.","operationId":"getBranchFileVersion"}}},"/projects/{project_reference}/branches/{branchName}/files":{"get":{"operationId":"listBranchFiles","tags":["projects/Files/Branch Files"],"summary":"List branch files","description":"List branch files. Requires project.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Branch name"},"required":true,"name":"branchName","in":"path"},{"schema":{"type":"string","maxLength":1024},"required":false,"name":"pattern","in":"query"},{"$ref":"#/components/parameters/PaginationCursor"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["path","updated_at"],"default":"path","description":"Sort by path or last update time (default path)."},"required":false,"description":"Sort by path or last update time (default path).","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"required":false,"name":"sort_order","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"include_server_functions","in":"query"},{"schema":{"type":"string","pattern":"^!?\\([^)]*\\)$","description":"Response fields to include or exclude. Examples: `(id,name)`, `(id,files(path))`, and `!(content)`.","example":"(id,path,type,size)"},"required":false,"description":"Response projection, for example (id,path,size). Omit to return all file fields, including content.","name":"fields","in":"query"}],"responses":{"200":{"description":"Files from the branch with selectable response fields.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"version_id":{"type":"string"},"path":{"type":"string"},"content":{"type":"string"},"type":{"type":"string","enum":["page","function","component","file"]},"size":{"type":"number","description":"Size of the file content encoded as UTF-8, in bytes."},"updated_at":{"type":"string"},"binary":{"type":"object","properties":{"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"byte_size":{"type":"integer","minimum":0,"maximum":8388608},"content_type":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[\\x20-\\x7e]+$"}},"required":["content_hash","byte_size","content_type"],"additionalProperties":false},"_links":{"type":"object","additionalProperties":{}}},"required":["path","content","type","size","updated_at"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"},"_links":{"type":"object","additionalProperties":{}}},"required":["data","page_info"]}}}},"400":{"description":"Invalid file filter, fields, sort, cursor, or page size.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden - insufficient project permissions","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Branch Files","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"Branch Files","name":"List branch files","description":"List branch files. Requires project.read.","operationId":"listBranchFiles"}}},"/projects/{project_reference}/branches/{branchName}/files/{filePath}":{"get":{"operationId":"getBranchFile","tags":["projects/Files/Branch Files"],"summary":"Get branch file","description":"Return branch file. Requires project.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Branch name"},"required":true,"name":"branchName","in":"path"},{"schema":{"type":"string","description":"File path (URL-encoded, for example, pages%2Findex.mdx)."},"required":true,"name":"filePath","in":"path"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"include_server_functions","in":"query"},{"schema":{"type":"string","pattern":"^!?\\([^)]*\\)$","description":"Response fields to include or exclude. Examples: `(id,name)`, `(id,files(path))`, and `!(content)`.","example":"(id,path,type,size)"},"required":false,"description":"Response projection, for example (id,path,size). Omit to return all file fields, including content.","name":"fields","in":"query"}],"responses":{"200":{"description":"File from the branch with selectable response fields.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"version_id":{"type":"string"},"path":{"type":"string"},"content":{"type":"string"},"size":{"type":"number","description":"Size of the file content encoded as UTF-8, in bytes."},"type":{"type":"string","enum":["page","function","component","file"]},"updated_at":{"type":"string"},"binary":{"type":"object","properties":{"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"byte_size":{"type":"integer","minimum":0,"maximum":8388608},"content_type":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[\\x20-\\x7e]+$"}},"required":["content_hash","byte_size","content_type"],"additionalProperties":false},"_links":{"type":"object","additionalProperties":{}}},"required":["path","content","size","type","updated_at"]}}}},"400":{"description":"Missing file path","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Restricted server-function source or insufficient permissions","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Branch Files","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"Branch Files","name":"Get branch file","description":"Return branch file. Requires project.read.","operationId":"getBranchFile"}}},"/projects/{project_reference}/branches/{branchName}/files/{filePath}/diff":{"get":{"operationId":"getBranchFileDiff","tags":["projects/Files/Branch Files"],"summary":"Get branch file diff","description":"Return branch file diff. Requires project.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Branch name"},"required":true,"name":"branchName","in":"path"},{"schema":{"type":"string","description":"File path (URL-encoded, for example, pages%2Findex.mdx)."},"required":true,"name":"filePath","in":"path"},{"schema":{"type":"string","description":"Source version ID to compare from (default: main branch)"},"required":false,"description":"Source version ID to compare from (default: main branch)","name":"source_ref","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":10,"default":3,"description":"Context lines (default: 3)"},"required":false,"description":"Context lines (default: 3)","name":"context_lines","in":"query"}],"responses":{"200":{"description":"Unified diff in git-compatible format.","content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string"},"diff":{"type":"string","description":"Unified diff format string"},"additions":{"type":"number"},"deletions":{"type":"number"}},"required":["path","diff","additions","deletions"]}}}},"400":{"description":"Invalid request parameters; context_lines must be an integer from 0 to 10.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Restricted server-function source or insufficient permissions","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Branch Files","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"Branch Files","name":"Get branch file diff","description":"Return branch file diff. Requires project.read.","operationId":"getBranchFileDiff"}}},"/projects/{project_reference}/environments/{environment_name}/files":{"get":{"operationId":"listEnvironmentFiles","tags":["projects/Files/Environment Files"],"summary":"List environment files","description":"List environment files. Requires project.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Environment name (for example, production, preview)."},"required":true,"name":"environment_name","in":"path"},{"schema":{"type":"string","maxLength":1024},"required":false,"name":"pattern","in":"query"},{"$ref":"#/components/parameters/PaginationCursor"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["path","updated_at"],"default":"path","description":"Sort by path or last update time (default path)."},"required":false,"description":"Sort by path or last update time (default path).","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"required":false,"name":"sort_order","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"include_server_functions","in":"query"},{"schema":{"type":"string","pattern":"^!?\\([^)]*\\)$","description":"Response fields to include or exclude. Examples: `(id,name)`, `(id,files(path))`, and `!(content)`.","example":"(id,path,type,size)"},"required":false,"description":"Response projection, for example (id,path,size). Omit to return all file fields, including content.","name":"fields","in":"query"}],"responses":{"200":{"description":"Files from the environment with selectable response fields.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"version_id":{"type":"string"},"path":{"type":"string"},"content":{"type":"string"},"binary":{"type":"object","properties":{"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"byte_size":{"type":"integer","minimum":0,"maximum":8388608},"content_type":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[\\x20-\\x7e]+$"}},"required":["content_hash","byte_size","content_type"],"additionalProperties":false},"type":{"type":"string","enum":["page","function","component","file"]},"size":{"type":"number"},"updated_at":{"type":"string"},"_links":{"type":"object","additionalProperties":{}}},"required":["id","version_id","path","content","type","size","updated_at"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"},"environment_id":{"type":"string"},"environment_name":{"type":"string"},"release_id":{"type":"string"},"release_version":{"type":["string","null"]},"_links":{"type":"object","additionalProperties":{}}},"required":["data","page_info","environment_id","environment_name","release_id","release_version"]}}}},"400":{"description":"Invalid fields, filter, sort, cursor, or page size; limit must be an integer from 1 to 100.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden - insufficient project permissions","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Environment Files","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"Environment Files","name":"List environment files","description":"List environment files. Requires project.read.","operationId":"listEnvironmentFiles"}}},"/projects/{project_reference}/environments/{environment_name}/files/{file_path}":{"get":{"operationId":"getEnvironmentFile","tags":["projects/Files/Environment Files"],"summary":"Get environment file","description":"Return environment file. Requires project.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Environment name (for example, production, preview)."},"required":true,"name":"environment_name","in":"path"},{"schema":{"type":"string","description":"File path (URL-encoded, for example, pages%2Findex.mdx)."},"required":true,"name":"file_path","in":"path"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"include_server_functions","in":"query"},{"schema":{"type":"string","pattern":"^!?\\([^)]*\\)$","description":"Response fields to include or exclude. Examples: `(id,name)`, `(id,files(path))`, and `!(content)`.","example":"(id,path,type,size)"},"required":false,"description":"Response projection, for example (id,path,size). Omit to return all file fields, including content.","name":"fields","in":"query"}],"responses":{"200":{"description":"File from the environment with selectable response fields.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"version_id":{"type":"string"},"path":{"type":"string"},"content":{"type":"string"},"binary":{"type":"object","properties":{"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"byte_size":{"type":"integer","minimum":0,"maximum":8388608},"content_type":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[\\x20-\\x7e]+$"}},"required":["content_hash","byte_size","content_type"],"additionalProperties":false},"size":{"type":"number"},"type":{"type":"string","enum":["page","function","component","file"]},"updated_at":{"type":"string"},"environment_id":{"type":"string"},"environment_name":{"type":"string"},"release_id":{"type":"string"},"release_version":{"type":["string","null"]},"_links":{"type":"object","additionalProperties":{}}},"required":["id","version_id","path","content","size","type","updated_at","environment_id","environment_name","release_id","release_version"]}}}},"400":{"description":"Missing file path","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Restricted server-function source or insufficient permissions","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Environment Files","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"Environment Files","name":"Get environment file","description":"Return environment file. Requires project.read.","operationId":"getEnvironmentFile"}}},"/projects/{project_reference}/files/{file_path}/versions":{"get":{"operationId":"listFileVersions","tags":["projects/Files/File Versions"],"summary":"List file versions","description":"List file versions. Requires project.read.","parameters":[{"schema":{"type":"string","description":"Project slug, UUID, or domain"},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","description":"File path (URL-encoded, for example, pages%2Findex.mdx)."},"required":true,"name":"file_path","in":"path"},{"schema":{"type":"string","description":"Content to address: `main`, `branch:<name-or-id>`, `release:<version>` or `env:<name>`. Canonical replacement for `branch` and `branch_id`.","example":"branch:feature-x"},"required":false,"name":"ref","in":"query"},{"schema":{"type":"string","description":"Branch name or ID. Legacy alias for `ref=branch:<value>`.","example":"feature-x"},"required":false,"name":"branch","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Branch ID. Legacy alias for `ref=branch:<uuid>`."},"required":false,"name":"branch_id","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"Treat the identifier as an exact path, including UUID-shaped filenames. Defaults to false."},"required":false,"description":"Treat the identifier as an exact path, including UUID-shaped filenames. Defaults to false.","name":"exact_path","in":"query"},{"schema":{"type":"string","description":"Forward-only continuation through committed versions, newest first. Main history uses selection time; branch history uses commit sequence. Other sorting is unsupported; page_info.prev is always null."},"required":false,"description":"Forward-only continuation through committed versions, newest first. Main history uses selection time; branch history uses commit sequence. Other sorting is unsupported; page_info.prev is always null.","name":"cursor","in":"query"},{"$ref":"#/components/parameters/PaginationLimit"}],"responses":{"200":{"description":"Paginated list of file versions.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"binary":{"type":"object","properties":{"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"byte_size":{"type":"integer","minimum":0,"maximum":8388608},"content_type":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[\\x20-\\x7e]+$"}},"required":["content_hash","byte_size","content_type"],"additionalProperties":false},"id":{"type":"string","description":"Committed version identifier."},"file_id":{"type":"string","description":"Source file identifier when supplied by the content source."},"path":{"type":"string","description":"Canonical path of the versioned file."},"type":{"type":"string","description":"Generic file record kind; this history projection returns file."},"created_at":{"type":"string","description":"Persisted creation or selection timestamp for this version."},"created_by":{"type":["string","null"],"description":"User identifier recorded for the version; null when unavailable."},"size_bytes":{"type":"number","description":"Size of the version content in UTF-8 bytes."}},"required":["id","path","type","created_at","created_by"]},"description":"Committed file versions newest first: main uses selection time and branches use commit sequence."},"page_info":{"type":"object","properties":{"self":{"type":["string","null"],"description":"Cursor supplied for this page; null for the first page."},"first":{"type":"null","description":"Always null. Omit the cursor to request the first page."},"next":{"type":["string","null"],"description":"Opaque forward continuation cursor; null when exhausted."},"prev":{"type":"null","description":"Always null. Backward pagination is unsupported."}},"required":["self","first","next","prev"]}},"required":["data","page_info"]}}}},"400":{"description":"Missing file path, or an invalid, conflicting or snapshot content selector","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden - insufficient permissions","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"File not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project File Versions","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"File Versions","name":"List file versions","description":"List file versions. Requires project.read.","operationId":"listFileVersions"}}},"/projects/{project_reference}/files/{file_path}/versions/{version_id}":{"get":{"operationId":"getFileVersion","tags":["projects/Files/File Versions"],"summary":"Get file version","description":"Return file version. Requires project.read.","parameters":[{"schema":{"type":"string","description":"Project slug, UUID, or domain"},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","description":"File path (URL-encoded, for example, pages%2Findex.mdx)."},"required":true,"name":"file_path","in":"path"},{"schema":{"type":"string","description":"Version UUID or numeric index 0..99 (0 = newest committed version)"},"required":true,"description":"Version UUID or numeric index 0..99 (0 = newest committed version)","name":"version_id","in":"path"},{"schema":{"type":"string","description":"Content to address: `main`, `branch:<name-or-id>`, `release:<version>` or `env:<name>`. Canonical replacement for `branch` and `branch_id`.","example":"branch:feature-x"},"required":false,"name":"ref","in":"query"},{"schema":{"type":"string","description":"Branch name or ID. Legacy alias for `ref=branch:<value>`.","example":"feature-x"},"required":false,"name":"branch","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Branch ID. Legacy alias for `ref=branch:<uuid>`."},"required":false,"name":"branch_id","in":"query"}],"responses":{"200":{"description":"File version content with metadata.","content":{"application/json":{"schema":{"type":"object","properties":{"binary":{"type":"object","properties":{"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"byte_size":{"type":"integer","minimum":0,"maximum":8388608},"content_type":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[\\x20-\\x7e]+$"}},"required":["content_hash","byte_size","content_type"],"additionalProperties":false},"id":{"type":"string","description":"Committed version identifier."},"path":{"type":"string","description":"Canonical path of the versioned file."},"content":{"type":"string","description":"Full content stored for this version."},"size":{"type":"number","description":"Size of the version content in UTF-8 bytes."},"type":{"type":"string","enum":["page","function","component","file"],"description":"File kind derived from its path: page, function, component, or file."},"updated_at":{"type":"string","description":"Persisted creation or selection timestamp for this version."},"file_id":{"type":"string","description":"Source file identifier when supplied by the content source."},"size_bytes":{"type":"number","description":"Size of the version content in UTF-8 bytes."},"created_at":{"type":"string","description":"Time the version was created. Same instant as updated_at."},"created_by":{"type":["string","null"],"description":"User identifier recorded for the version; null when unavailable."}},"required":["id","path","content","size","type","updated_at","size_bytes","created_at","created_by"]}}}},"400":{"description":"Missing parameters, or an invalid, conflicting or snapshot content selector","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden - insufficient permissions","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Version not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project File Versions","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"File Versions","name":"Get file version","description":"Return file version. Requires project.read.","operationId":"getFileVersion"}}},"/projects/{project_reference}/drafts":{"get":{"operationId":"listProjectFileDrafts","tags":["projects/Files/Branch File Drafts"],"summary":"List pending file drafts","description":"List pending file drafts. Requires project.files.read.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project whose pending drafts are selected. Returns one latest update per canonically visible source file; restricted server-function drafts are omitted."},"required":true,"description":"Project whose pending drafts are selected. Returns one latest update per canonically visible source file; restricted server-function drafts are omitted.","name":"project_reference","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Branch name or UUID. Omit for main; a missing selection is an error."},"required":false,"description":"Branch name or UUID. Omit for main; a missing selection is an error.","name":"branch_reference","in":"query"},{"schema":{"type":"string","enum":["page","component","function","virtual_file"],"description":"Filter by the actual source-file type."},"required":false,"description":"Filter by the actual source-file type.","name":"entity_type","in":"query"}],"responses":{"200":{"description":"Latest pending updates","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"file_id":{"type":"string","format":"uuid","description":"Deterministic source-file identity within the project."},"entity_type":{"type":"string","enum":["page","component","function","virtual_file"],"description":"Canonical source-file type."},"body_snapshot":{"type":["string","null"],"description":"Latest full-body snapshot; null for pending updates without a full body, including deletions."},"version":{"type":"integer","minimum":1,"description":"Current pending draft sequence; commit/discard removes the pending sequence."},"updated_at":{"type":"string","description":"Timestamp of the latest pending update."}},"required":["file_id","entity_type","body_snapshot","version","updated_at"]},"description":"One latest update per canonically visible source file. Drafts for restricted server-function source are omitted."}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Branch File Drafts","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"Branch File Drafts","name":"List pending file drafts","description":"List pending file drafts. Requires project.files.read.","operationId":"listProjectFileDrafts"}}},"/projects/{project_reference}/branches/{branchName}/files/{filePath}/draft":{"get":{"operationId":"getBranchFileDraft","tags":["projects/Files/Branch File Drafts"],"summary":"Get branch file draft","description":"Return branch file draft. Requires project.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Branch name"},"required":true,"name":"branchName","in":"path"},{"schema":{"type":"string","description":"File path (URL-encoded, for example, pages%2Findex.mdx)."},"required":true,"name":"filePath","in":"path"}],"responses":{"200":{"description":"Draft content with navigation links","content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"Id of the source file the pending draft belongs to."},"path":{"type":"string","description":"Path of the source file."},"content":{"type":"string","description":"Full pending draft body, including empty bodies. A draft without a readable full snapshot is not found."},"updated_at":{"type":"string","description":"When the pending draft was last saved."},"version":{"type":"integer","minimum":1,"description":"Current pending draft sequence; resets after commit/discard. Use as expected_draft_version for a guarded draft write."},"entity_type":{"type":"string","enum":["page","component","function","virtual_file"],"description":"Canonical source-file type."},"_links":{"type":"object","additionalProperties":{},"description":"Hypermedia links to the draft and its file."}},"required":["path","content","updated_at"]}}}},"400":{"description":"Missing file path","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Restricted server-function source","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Branch File Drafts","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"Branch File Drafts","name":"Get branch file draft","description":"Return branch file draft. Requires project.read.","operationId":"getBranchFileDraft"}},"put":{"operationId":"updateBranchFileDraft","tags":["projects/Files/Branch File Drafts"],"summary":"Replace pending file draft","description":"Replace pending file draft. Requires project.files.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Branch name"},"required":true,"name":"branchName","in":"path"},{"schema":{"type":"string","description":"File path (URL-encoded, for example, pages%2Findex.mdx)."},"required":true,"name":"filePath","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","description":"Full pending source-file body; empty strings are valid. Saves durable Yjs repair without creating an immutable version. Identical bodies retain the pending draft sequence."},"expected_draft_version":{"type":["integer","null"],"minimum":0,"maximum":2147483647,"description":"Observed pending draft sequence; zero means no prior draft. Separate from commit expected-version IDs. Omit for unconditional replacement; a stale sequence returns 409."}},"required":["content"]}}}},"responses":{"200":{"description":"Persisted pending draft","content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"Id of the source file whose draft was replaced."},"path":{"type":"string","description":"Path of the source file."},"content":{"type":"string","description":"Full pending draft body, including empty bodies. A draft without a readable full snapshot is not found."},"updated_at":{"type":"string","description":"When the pending draft was last saved."},"version":{"type":"integer","minimum":1,"description":"Current pending draft sequence; resets after commit/discard. Use as expected_draft_version for a guarded draft write."},"entity_type":{"type":"string","enum":["page","component","function","virtual_file"],"description":"Canonical source-file type."},"_links":{"type":"object","additionalProperties":{},"description":"Hypermedia links to the draft and its file."}},"required":["path","content","updated_at"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Branch File Drafts","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"Branch File Drafts","name":"Replace pending file draft","description":"Replace pending file draft. Requires project.files.write.","operationId":"updateBranchFileDraft"}},"delete":{"operationId":"deleteBranchFileDraft","tags":["projects/Files/Branch File Drafts"],"summary":"Delete branch file draft","description":"Delete branch file draft. Requires project.files.write; API keys also need delete scope.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Branch name"},"required":true,"name":"branchName","in":"path"},{"schema":{"type":"string","description":"Existing source-file path whose pending updates are discarded and committed body durably restored. URL-encode this path."},"required":true,"name":"filePath","in":"path"}],"responses":{"200":{"description":"Draft discarded; already absent drafts also succeed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Missing file path","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Project files write capability required. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Source file or branch not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Branch File Drafts","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"Branch File Drafts","name":"Delete branch file draft","description":"Delete branch file draft. Requires project.files.write; API keys also need delete scope.","operationId":"deleteBranchFileDraft"}}},"/projects/{project_reference}/releases/{release_reference}/files":{"get":{"operationId":"listReleaseFiles","tags":["projects/Files/Release Files"],"summary":"List release files","description":"List release files. Requires project.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Release ID, version (for example, \"1.2.3\" or \"1.2\") or \"latest\"."},"required":true,"name":"release_reference","in":"path"},{"schema":{"type":"string","maxLength":1024},"required":false,"name":"pattern","in":"query"},{"$ref":"#/components/parameters/PaginationCursor"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["path","updated_at"],"default":"path","description":"Sort by path or last update time (default path)."},"required":false,"description":"Sort by path or last update time (default path).","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"required":false,"name":"sort_order","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"include_server_functions","in":"query"},{"schema":{"type":"string","pattern":"^!?\\([^)]*\\)$","description":"Response fields to include or exclude. Examples: `(id,name)`, `(id,files(path))`, and `!(content)`.","example":"(id,path,type,size)"},"required":false,"description":"Response projection, for example (id,path,size). Omit to return all file fields, including content.","name":"fields","in":"query"}],"responses":{"200":{"description":"Files from the release with selectable response fields.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"version_id":{"type":"string"},"path":{"type":"string"},"content":{"type":"string"},"binary":{"type":"object","properties":{"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"byte_size":{"type":"integer","minimum":0,"maximum":8388608},"content_type":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[\\x20-\\x7e]+$"}},"required":["content_hash","byte_size","content_type"],"additionalProperties":false},"type":{"type":"string","enum":["page","function","component","file"]},"size":{"type":"number"},"updated_at":{"type":"string"},"_links":{"type":"object","additionalProperties":{}}},"required":["id","version_id","path","content","type","size","updated_at"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"},"release_id":{"type":"string"},"release_version":{"type":["string","null"]},"_links":{"type":"object","additionalProperties":{}}},"required":["data","page_info","release_id","release_version"]}}}},"400":{"description":"Invalid fields, filter, sort, cursor, or page size; limit must be an integer from 1 to 100.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden - insufficient project permissions","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Release Files","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"Release Files","name":"List release files","description":"List release files. Requires project.read.","operationId":"listReleaseFiles"}}},"/projects/{project_reference}/releases/{release_reference}/files/{file_reference}":{"get":{"operationId":"getReleaseFile","tags":["projects/Files/Release Files"],"summary":"Get release file","description":"Return release file. Requires project.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Release ID, version (for example, \"1.2.3\" or \"1.2\") or \"latest\"."},"required":true,"name":"release_reference","in":"path"},{"schema":{"type":"string","description":"File path (URL-encoded, for example, pages%2Findex.mdx) or file ID."},"required":true,"name":"file_reference","in":"path"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"include_server_functions","in":"query"},{"schema":{"type":"string","pattern":"^!?\\([^)]*\\)$","description":"Response fields to include or exclude. Examples: `(id,name)`, `(id,files(path))`, and `!(content)`.","example":"(id,path,type,size)"},"required":false,"description":"Response projection, for example (id,path,size). Omit to return all file fields, including content.","name":"fields","in":"query"}],"responses":{"200":{"description":"File from the release with selectable response fields.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"version_id":{"type":"string"},"path":{"type":"string"},"content":{"type":"string"},"binary":{"type":"object","properties":{"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"byte_size":{"type":"integer","minimum":0,"maximum":8388608},"content_type":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[\\x20-\\x7e]+$"}},"required":["content_hash","byte_size","content_type"],"additionalProperties":false},"size":{"type":"number"},"type":{"type":"string","enum":["page","function","component","file"]},"updated_at":{"type":"string"},"release_id":{"type":"string"},"release_version":{"type":["string","null"]},"_links":{"type":"object","additionalProperties":{}}},"required":["id","version_id","path","content","size","type","updated_at","release_id","release_version"]}}}},"400":{"description":"Missing file path","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Restricted server-function source or insufficient permissions","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Release Files","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"Release Files","name":"Get release file","description":"Return release file. Requires project.read.","operationId":"getReleaseFile"}}},"/sandboxes/{sandbox_id}/files":{"get":{"operationId":"listSandboxFiles","tags":["projects/Files/Sandbox Files"],"summary":"List sandbox files","description":"List sandbox files. Requires project.sandboxes.manage.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Sandbox UUID, as returned by createSandbox."},"required":true,"description":"Sandbox UUID, as returned by createSandbox.","name":"sandbox_id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Directory path inside the sandbox."},"required":true,"description":"Directory path inside the sandbox.","name":"path","in":"query"},{"schema":{"type":"string","description":"Cursor from the previous page_info.next. Omit it to read the first page."},"required":false,"description":"Cursor from the previous page_info.next. Omit it to read the first page.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum entries to return. Defaults to 20 and is capped at 100."},"required":false,"description":"Maximum entries to return. Defaults to 20 and is capped at 100.","name":"limit","in":"query"}],"responses":{"200":{"description":"Paginated directory listing.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"type":{"type":"string","enum":["file","directory","symlink","other"]},"size_bytes":{"type":["integer","null"],"minimum":0}},"required":["path","type","size_bytes"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Sandbox Files","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"Sandbox Files","name":"List sandbox files","description":"List sandbox files. Requires project.sandboxes.manage.","operationId":"listSandboxFiles"}},"post":{"operationId":"writeSandboxFiles","tags":["projects/Files/Sandbox Files"],"summary":"Write sandbox files","description":"Write sandbox files. Requires project.sandboxes.manage.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Sandbox UUID, as returned by createSandbox."},"required":true,"description":"Sandbox UUID, as returned by createSandbox.","name":"sandbox_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1},"content":{"type":"string"}},"required":["path","content"],"additionalProperties":false},"minItems":1,"maxItems":100,"description":"Sandbox filesystem writes; project files and Yjs document state are unchanged."}},"required":["files"],"additionalProperties":false}}}},"responses":{"200":{"description":"Per-file write results.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"status":{"type":"string","enum":["written","failed"]},"error":{"type":["object","null"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["path","status","error"]}}},"required":["results"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Sandbox Files","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"Sandbox Files","name":"Write sandbox files","description":"Write sandbox files. Requires project.sandboxes.manage.","operationId":"writeSandboxFiles"}}},"/sandboxes/{sandbox_id}/file":{"get":{"operationId":"readSandboxFile","tags":["projects/Files/Sandbox Files"],"summary":"Read sandbox file","description":"Read sandbox file. Requires project.sandboxes.manage.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Sandbox UUID, as returned by createSandbox."},"required":true,"description":"Sandbox UUID, as returned by createSandbox.","name":"sandbox_id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Absolute path to the file inside the sandbox"},"required":true,"description":"Absolute path to the file inside the sandbox","name":"path","in":"query"}],"responses":{"200":{"description":"UTF-8 file content.","content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string"},"content":{"type":"string"},"encoding":{"type":"string","enum":["utf-8"]}},"required":["path","content","encoding"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Sandbox Files","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"Sandbox Files","name":"Read sandbox file","description":"Read sandbox file. Requires project.sandboxes.manage.","operationId":"readSandboxFile"}}},"/projects/{project_reference}/branches/{branchName}/files/search":{"post":{"operationId":"searchBranchFiles","tags":["projects/Files/File Search"],"summary":"Search branch files (text)","description":"Search branch files (text). Requires project.files.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Branch name"},"required":true,"name":"branchName","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","description":"Search query (text or regex pattern)"},"pattern":{"type":"string","description":"File path pattern filter (for example, *.tsx)."},"is_regex":{"type":"boolean","description":"Treat query as regex (default: false)"},"case_sensitive":{"type":"boolean","description":"Case sensitive search (default: false)"},"max_results":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum matching files, integer 1–100 (default: 50)."}},"required":["query"]}}}},"responses":{"200":{"description":"Search results.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"File id, when known."},"path":{"type":"string","description":"Path of the matching file."},"matches":{"type":"array","items":{"type":"object","properties":{"line":{"type":"number","description":"1-based line number of the match."},"content":{"type":"string","description":"Content of the matching line."}},"required":["line","content"]},"description":"Matching lines in the file."}},"required":["path","matches"]},"description":"Files with at least one match."},"total_files":{"type":"number","description":"Number of matching files returned."}},"required":["results","total_files"]}}}},"400":{"description":"Invalid search query, regex, or result limit. max_results must be an integer from 1 through 100.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden - insufficient project permissions","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"File search","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"File Search","name":"Search branch files (text)","description":"Search branch files (text). Requires project.files.read.","operationId":"searchBranchFiles"}}},"/projects/{project_reference}/files/search":{"post":{"operationId":"searchFileText","tags":["projects/Files/File Search"],"summary":"Search file text","description":"Search file text. Requires project.files.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","description":"Search query (text or regex pattern) across textual project files. Matches contain only the matching line; surrounding context is unsupported."},"pattern":{"type":"string","description":"File path pattern filter (for example, *.tsx)."},"is_regex":{"type":"boolean","description":"Treat query as regex (default: false)"},"case_sensitive":{"type":"boolean","description":"Case sensitive search (default: false)"},"limit":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum matching files, from 1 to 100 (default: 50). Limits files, not lines."},"max_results":{"type":"integer","minimum":1,"maximum":100,"description":"Earlier spelling of limit. Maximum matching files, from 1 to 100 (default: 50). Limits files, not lines."},"maxResults":{"type":"integer","minimum":1,"maximum":100,"description":"Compatibility alias for max_results. Maximum matching files, from 1 to 100 (default: 50). Limits files, not lines."}},"required":["query"],"additionalProperties":false}}}},"responses":{"200":{"description":"Search results.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"File ID when supplied by the content source."},"path":{"type":"string","description":"Path of the matching project source file."},"content":{"type":"string","description":"Full file content when available from the content source."},"matches":{"type":"array","items":{"type":"object","properties":{"line":{"type":"number","description":"1-based line number of the matching line."},"content":{"type":"string","description":"Matching line text, without surrounding lines."}},"required":["line","content"],"description":"One matching source line."},"description":"Matching lines within this file."}},"required":["path","matches"],"description":"One matching project source file."},"description":"Matching files visible to the caller."},"total_files":{"type":"number","description":"Number of matching files returned, after access filtering and the matching-file limit."},"data":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Path of the matching file."},"version_id":{"type":["string","null"],"description":"Current version ID, or null when the search does not supply one."},"matches":{"type":"array","items":{"type":"object","properties":{"line":{"type":"number","description":"1-based line number of the matching line."},"content":{"type":"string","description":"Text of the matching line, without surrounding lines."}},"required":["line","content"]},"description":"Matching lines in this file."}},"required":["path","version_id","matches"]},"description":"The matching files in the canonical shape. Same files as results."},"total_matches":{"type":"number","description":"Number of matching files returned."}},"required":["results","total_files","data","total_matches"]}}}},"400":{"description":"Invalid query, regex, or limit; unsupported input fields; or conflicting limit aliases.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden - insufficient permissions","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"File search","x-canonical-documentation":{"domain":"projects","resource":"Files","subgroup":"File Search","name":"Search file text","description":"Search file text. Requires project.files.read.","operationId":"searchFileText"}}},"/projects/{project_reference}/branches":{"get":{"operationId":"listBranches","tags":["projects/Branches/Branches"],"summary":"List branches","description":"List the branches of a project, including its root branch. Requires project.read.","parameters":[{"schema":{"type":"string","example":"my-project"},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size 1–100. Omit limit and cursor for the complete collection; cursor alone defaults to 20.","example":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":4096,"description":"Opaque continuation bound to collection, project, branch, principal, filters and page size. Paged records use ID ascending order."},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","description":"Search filter for branch name (case-insensitive partial match)","example":"feature"},"required":false,"name":"search","in":"query"},{"schema":{"type":"string","enum":["active","merged","closed","all"],"default":"all","description":"Filter by branch status","example":"active"},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"List of branches.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"project_id":{"type":"string","format":"uuid"},"base_branch_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":["string","null"],"description":"Persisted branch creation time.","example":"2026-09-14T10:00:00.000Z"},"created_by":{"type":["string","null"],"format":"uuid"},"merged_at":{"type":["string","null"],"description":"Persisted merge time; null before a merge."},"merged_by":{"type":["string","null"],"format":"uuid"},"status":{"type":"string","enum":["active","merged","closed"],"description":"Stored lifecycle state; closed is distinct from merged.","example":"active"},"updated_at":{"type":["string","null"]},"version":{"type":"integer","minimum":0,"description":"Persisted optimistic-concurrency version for expected_version on merge.","example":3},"description":{"type":["string","null"]},"auto_delete_on_merge":{"type":"boolean"}},"required":["id","name","project_id"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data"]},"example":{"data":[{"id":"0f6d3c1e-2a4b-4c8d-9e7f-1a2b3c4d5e6f","name":"feature-header","project_id":"3b9e2c7a-5d41-4f8e-9a6b-2c1d0e9f8a7b","base_branch_id":"7c1d2e3f-4a5b-4c6d-8e9f-0a1b2c3d4e5f","created_at":"2026-10-10T12:00:00.000Z","created_by":"9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d","merged_at":null,"merged_by":null,"status":"active","updated_at":"2026-10-10T12:00:00.000Z","version":4,"description":null,"auto_delete_on_merge":false}],"page_info":{"self":null,"first":null,"next":null,"prev":null}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Branches","x-canonical-documentation":{"domain":"projects","resource":"Branches","subgroup":"Branches","name":"List branches","description":"List the branches of a project, including its root branch. Requires project.read.","operationId":"listBranches"}},"post":{"operationId":"createBranch","tags":["projects/Branches/Branches"],"summary":"Create branch","description":"Create a branch from the project root or from another branch, snapshotting its files. Requires project.files.write.","parameters":[{"schema":{"type":"string","example":"my-project"},"required":true,"name":"project_reference","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[A-Za-z0-9._/][A-Za-z0-9._/-]*$","description":"Branch name. Branch name may only contain letters, numbers, \".\", \"_\", \"/\" and \"-\", and cannot start with \"-\".","example":"feature-new-header"},"base_branch_id":{"type":["string","null"],"format":"uuid","description":"Omit to branch from the project root (created automatically if missing). Use null to create a root branch; rejected if a root already exists. A UUID must identify a base branch in this project."},"description":{"type":"string","description":"Branch description."},"auto_delete_on_merge":{"type":"boolean","description":"Delete the branch after it merges. Defaults to false."}},"required":["name"]},"example":{"name":"feature-header","base_branch_id":"7c1d2e3f-4a5b-4c6d-8e9f-0a1b2c3d4e5f"}}}},"responses":{"201":{"description":"Branch created successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"project_id":{"type":"string","format":"uuid"},"base_branch_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":["string","null"],"description":"Persisted branch creation time.","example":"2026-09-14T10:00:00.000Z"},"created_by":{"type":["string","null"],"format":"uuid"},"merged_at":{"type":["string","null"],"description":"Persisted merge time; null before a merge."},"merged_by":{"type":["string","null"],"format":"uuid"},"status":{"type":"string","enum":["active","merged","closed"],"description":"Stored lifecycle state; closed is distinct from merged.","example":"active"},"updated_at":{"type":["string","null"]},"version":{"type":"integer","minimum":0,"description":"Persisted optimistic-concurrency version for expected_version on merge.","example":3},"description":{"type":["string","null"]},"auto_delete_on_merge":{"type":"boolean"}},"required":["id","name","project_id"]},"example":{"id":"0f6d3c1e-2a4b-4c8d-9e7f-1a2b3c4d5e6f","name":"feature-header","project_id":"3b9e2c7a-5d41-4f8e-9a6b-2c1d0e9f8a7b","base_branch_id":"7c1d2e3f-4a5b-4c6d-8e9f-0a1b2c3d4e5f","created_at":"2026-10-10T12:00:00.000Z","created_by":"9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d","merged_at":null,"merged_by":null,"status":"active","updated_at":"2026-10-10T12:00:00.000Z","version":4,"description":null,"auto_delete_on_merge":false}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Branches","x-canonical-documentation":{"domain":"projects","resource":"Branches","subgroup":"Branches","name":"Create branch","description":"Create a branch from the project root or from another branch, snapshotting its files. Requires project.files.write.","operationId":"createBranch"}}},"/projects/{project_reference}/branches/{branch_id}":{"get":{"operationId":"getBranch","tags":["projects/Branches/Branches"],"summary":"Get branch","description":"Read one branch by ID, with its status, version and base branch. Requires project.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"uuid","description":"Branch UUID belonging to the selected project. Missing or foreign branches return 404."},"required":true,"name":"branch_id","in":"path"}],"responses":{"200":{"description":"Branch details.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"project_id":{"type":"string","format":"uuid"},"base_branch_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":["string","null"],"description":"Persisted branch creation time.","example":"2026-09-14T10:00:00.000Z"},"created_by":{"type":["string","null"],"format":"uuid"},"merged_at":{"type":["string","null"],"description":"Persisted merge time; null before a merge."},"merged_by":{"type":["string","null"],"format":"uuid"},"status":{"type":"string","enum":["active","merged","closed"],"description":"Stored lifecycle state; closed is distinct from merged.","example":"active"},"updated_at":{"type":["string","null"]},"version":{"type":"integer","minimum":0,"description":"Persisted optimistic-concurrency version for expected_version on merge.","example":3},"description":{"type":["string","null"]},"auto_delete_on_merge":{"type":"boolean"}},"required":["id","name","project_id"]},"example":{"id":"0f6d3c1e-2a4b-4c8d-9e7f-1a2b3c4d5e6f","name":"feature-header","project_id":"3b9e2c7a-5d41-4f8e-9a6b-2c1d0e9f8a7b","base_branch_id":"7c1d2e3f-4a5b-4c6d-8e9f-0a1b2c3d4e5f","created_at":"2026-10-10T12:00:00.000Z","created_by":"9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d","merged_at":null,"merged_by":null,"status":"active","updated_at":"2026-10-10T12:00:00.000Z","version":4,"description":null,"auto_delete_on_merge":false}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Branches","x-canonical-documentation":{"domain":"projects","resource":"Branches","subgroup":"Branches","name":"Get branch","description":"Read one branch by ID, with its status, version and base branch. Requires project.read.","operationId":"getBranch"}},"delete":{"operationId":"deleteBranch","tags":["projects/Branches/Branches"],"summary":"Delete branch","description":"Delete a branch and its uncommitted changes. Requires project.files.write; API keys also need delete scope.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"uuid","description":"Branch to delete. Only a branch with a base branch can be deleted, excluding main. Its associated content is removed."},"required":true,"description":"Branch to delete. Only a branch with a base branch can be deleted, excluding main. Its associated content is removed.","name":"branch_id","in":"path"}],"responses":{"200":{"description":"Branch deleted successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"},"example":{"ok":true}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Branches","x-canonical-documentation":{"domain":"projects","resource":"Branches","subgroup":"Branches","name":"Delete branch","description":"Delete a branch and its uncommitted changes. Requires project.files.write; API keys also need delete scope.","operationId":"deleteBranch"}}},"/projects/{project_reference}/branches/{branch_id}/merge":{"post":{"operationId":"mergeBranch","tags":["projects/Branches/Branches"],"summary":"Merge branch","description":"Merge a branch into main or another branch, applying its file changes, deletions and the merge message to the target. Requires project.files.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"uuid","description":"Branch UUID belonging to the selected project. Missing or foreign branches return 404."},"required":true,"name":"branch_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expected_version":{"type":["integer","null"],"minimum":0,"description":"Optional optimistic-concurrency precondition against the persisted source branch version. A stale value returns 412 before merge writes.","example":3},"target_branch_id":{"type":["string","null"],"format":"uuid","description":"Target branch ID; omit for main. An unknown target returns not found. Merge eligibility and conflicts are checked again when the merge commits."},"merge_message":{"type":"string","description":"Message stored on the merge audit record.","example":"Ship header"}}},"example":{"expected_version":4,"merge_message":"Ship header"}}}},"responses":{"200":{"description":"Branch merged successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"branch":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"project_id":{"type":"string","format":"uuid"},"base_branch_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":["string","null"],"description":"Persisted branch creation time.","example":"2026-09-14T10:00:00.000Z"},"created_by":{"type":["string","null"],"format":"uuid"},"merged_at":{"type":["string","null"],"description":"Persisted merge time; null before a merge."},"merged_by":{"type":["string","null"],"format":"uuid"},"status":{"type":"string","enum":["active","merged","closed"],"description":"Stored lifecycle state; closed is distinct from merged.","example":"active"},"updated_at":{"type":["string","null"]},"version":{"type":"integer","minimum":0,"description":"Persisted optimistic-concurrency version for expected_version on merge.","example":3},"description":{"type":["string","null"]},"auto_delete_on_merge":{"type":"boolean"}},"required":["id","name","project_id"]},"merged_documents":{"type":"number"},"added_documents":{"type":"number"},"deleted_documents":{"type":"number"},"auto_merged_documents":{"type":"number"}},"required":["success","branch","merged_documents","added_documents","deleted_documents","auto_merged_documents"]},"example":{"success":true,"branch":{"id":"0f6d3c1e-2a4b-4c8d-9e7f-1a2b3c4d5e6f","name":"feature-header","project_id":"3b9e2c7a-5d41-4f8e-9a6b-2c1d0e9f8a7b","base_branch_id":"7c1d2e3f-4a5b-4c6d-8e9f-0a1b2c3d4e5f","created_at":"2026-10-10T12:00:00.000Z","created_by":"9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d","merged_at":"2026-10-10T12:00:00.000Z","merged_by":"9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d","status":"merged","updated_at":"2026-10-10T12:00:00.000Z","version":5,"description":null,"auto_delete_on_merge":false},"merged_documents":3,"added_documents":1,"deleted_documents":0,"auto_merged_documents":1}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"Precondition failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Branches","x-canonical-documentation":{"domain":"projects","resource":"Branches","subgroup":"Branches","name":"Merge branch","description":"Merge a branch into main or another branch, applying its file changes, deletions and the merge message to the target. Requires project.files.write.","operationId":"mergeBranch"}}},"/projects/{project_reference}/branch-policies":{"get":{"operationId":"listBranchPolicies","tags":["projects/Branches/Branch Policies"],"summary":"List branch policies","description":"List the merge policies of a project, which set the approvals and reviewers a branch needs. Requires project.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size 1–100. Omit limit and cursor for the complete collection; cursor alone defaults to 20.","example":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":4096,"description":"Opaque continuation bound to collection, project, branch, principal, filters and page size. Paged records use ID ascending order."},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"Return only enabled branch protection policies when true.","example":"true"},"required":false,"name":"enabled_only","in":"query"}],"responses":{"200":{"description":"List of branch policies.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"is_enabled":{"type":"boolean"},"target_branch_pattern":{"type":["string","null"]},"required_approvals":{"type":"number"},"allow_self_approval":{"type":"boolean"},"required_reviewer_ids":{"type":["array","null"],"items":{"type":"string"}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","project_id","name","is_enabled","target_branch_pattern","required_approvals","allow_self_approval","required_reviewer_ids","created_at","updated_at"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data"]},"example":{"data":[{"id":"1d2c3b4a-5e6f-4a7b-8c9d-0e1f2a3b4c5d","project_id":"3b9e2c7a-5d41-4f8e-9a6b-2c1d0e9f8a7b","name":"Review main","is_enabled":true,"target_branch_pattern":"main","required_approvals":1,"allow_self_approval":true,"required_reviewer_ids":null,"created_at":"2026-10-10T12:00:00.000Z","updated_at":"2026-10-10T12:00:00.000Z"}]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Branch Policies","x-canonical-documentation":{"domain":"projects","resource":"Branches","subgroup":"Branch Policies","name":"List branch policies","description":"List the merge policies of a project, which set the approvals and reviewers a branch needs. Requires project.read.","operationId":"listBranchPolicies"}},"post":{"operationId":"createBranchPolicy","tags":["projects/Branches/Branch Policies"],"summary":"Create branch policy","description":"Create a merge policy for branches matching a pattern. Requires project.settings.manage.","parameters":[{"$ref":"#/components/parameters/ProjectReference"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"is_enabled":{"type":"boolean"},"target_branch_pattern":{"type":["string","null"],"maxLength":255,"description":"Branch-name pattern the policy applies to. Omit or send null to apply it to every branch."},"required_approvals":{"type":"integer","minimum":0,"maximum":2147483647,"description":"Required approval count. Defaults to 0; MCP create_branch_policy defaults to 1."},"allow_self_approval":{"type":"boolean","description":"Allow the merger’s approval to count. Defaults to true; MCP create_branch_policy defaults to false."},"required_reviewer_ids":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["name"]},"example":{"name":"Review main","target_branch_pattern":"main","required_approvals":1}}}},"responses":{"201":{"description":"Policy created.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"is_enabled":{"type":"boolean"},"target_branch_pattern":{"type":["string","null"]},"required_approvals":{"type":"number"},"allow_self_approval":{"type":"boolean"},"required_reviewer_ids":{"type":["array","null"],"items":{"type":"string"}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","project_id","name","is_enabled","target_branch_pattern","required_approvals","allow_self_approval","required_reviewer_ids","created_at","updated_at"]},"example":{"id":"1d2c3b4a-5e6f-4a7b-8c9d-0e1f2a3b4c5d","project_id":"3b9e2c7a-5d41-4f8e-9a6b-2c1d0e9f8a7b","name":"Review main","is_enabled":true,"target_branch_pattern":"main","required_approvals":1,"allow_self_approval":true,"required_reviewer_ids":null,"created_at":"2026-10-10T12:00:00.000Z","updated_at":"2026-10-10T12:00:00.000Z"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Branch Policies","x-canonical-documentation":{"domain":"projects","resource":"Branches","subgroup":"Branch Policies","name":"Create branch policy","description":"Create a merge policy for branches matching a pattern. Requires project.settings.manage.","operationId":"createBranchPolicy"}}},"/projects/{project_reference}/branch-policies/{policy_id}":{"delete":{"operationId":"deleteBranchPolicy","tags":["projects/Branches/Branch Policies"],"summary":"Delete branch policy","description":"Delete a branch policy so it no longer blocks merges. Requires project.settings.manage; API keys also need delete scope.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"uuid","description":"Policy UUID belonging to the selected project. Missing or foreign policies return 404."},"required":true,"name":"policy_id","in":"path"}],"responses":{"200":{"description":"Policy deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"},"example":{"ok":true}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Branch Policies","x-canonical-documentation":{"domain":"projects","resource":"Branches","subgroup":"Branch Policies","name":"Delete branch policy","description":"Delete a branch policy so it no longer blocks merges. Requires project.settings.manage; API keys also need delete scope.","operationId":"deleteBranchPolicy"}}},"/projects/{project_reference}/branches/{branch_id}/approvals":{"get":{"operationId":"listBranchApprovals","tags":["projects/Branches/Branch Approvals"],"summary":"List branch approvals","description":"List a branch's approvals, including dismissed ones with their dismissal fields. Requires project.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"uuid","description":"Branch UUID belonging to the selected project. Missing or foreign branches return 404."},"required":true,"name":"branch_id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size 1–100. Omit limit and cursor for the complete collection; cursor alone defaults to 20.","example":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":4096,"description":"Opaque continuation bound to collection, project, branch, principal, filters and page size. Paged records use ID ascending order."},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"List of approvals.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"branch_id":{"type":"string","format":"uuid"},"approved_by":{"type":"string","format":"uuid"},"approved_at":{"type":"string","description":"Recorded approval time; retained after dismissal."},"comment":{"type":["string","null"]},"dismissed_at":{"type":["string","null"]},"dismissed_by":{"type":["string","null"],"format":"uuid","description":"User who dismissed the approval, or null while active."},"dismissed_reason":{"type":["string","null"]}},"required":["id","branch_id","approved_by","approved_at","comment","dismissed_at","dismissed_by","dismissed_reason"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data"]},"example":{"data":[{"id":"2e3d4c5b-6f7a-4b8c-9d0e-1f2a3b4c5d6e","branch_id":"0f6d3c1e-2a4b-4c8d-9e7f-1a2b3c4d5e6f","approved_by":"9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d","approved_at":"2026-10-10T12:00:00.000Z","comment":"LGTM","dismissed_at":null,"dismissed_by":null,"dismissed_reason":null}]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Branch Approvals","x-canonical-documentation":{"domain":"projects","resource":"Branches","subgroup":"Branch Approvals","name":"List branch approvals","description":"List a branch's approvals, including dismissed ones with their dismissal fields. Requires project.read.","operationId":"listBranchApprovals"}},"post":{"operationId":"createBranchApproval","tags":["projects/Branches/Branch Approvals"],"summary":"Create branch approval","description":"Approve a branch as the calling user, optionally with a comment. Requires project.files.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"uuid","description":"Branch UUID belonging to the selected project. Missing or foreign branches return 404."},"required":true,"name":"branch_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"comment":{"type":"string","description":"Approval comment."}}},"example":{"comment":"LGTM"}}}},"responses":{"201":{"description":"Approval created.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Approval ID."},"branch_id":{"type":"string","format":"uuid","description":"Approved branch."},"approved_by":{"type":"string","format":"uuid","description":"User who approved."},"approved_at":{"type":"string","description":"Approval time; kept after dismissal."},"comment":{"type":["string","null"],"description":"Approval comment, or null."},"dismissed_at":{"type":["string","null"],"description":"Dismissal time, or null while the approval counts."},"dismissed_by":{"type":["string","null"],"format":"uuid","description":"User who dismissed the approval, or null."},"dismissed_reason":{"type":["string","null"],"description":"Dismissal reason, or null."}},"required":["id","branch_id","approved_by","approved_at","comment","dismissed_at","dismissed_by","dismissed_reason"]},"example":{"id":"2e3d4c5b-6f7a-4b8c-9d0e-1f2a3b4c5d6e","branch_id":"0f6d3c1e-2a4b-4c8d-9e7f-1a2b3c4d5e6f","approved_by":"9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d","approved_at":"2026-10-10T12:00:00.000Z","comment":"LGTM","dismissed_at":null,"dismissed_by":null,"dismissed_reason":null}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Branch Approvals","x-canonical-documentation":{"domain":"projects","resource":"Branches","subgroup":"Branch Approvals","name":"Create branch approval","description":"Approve a branch as the calling user, optionally with a comment. Requires project.files.write.","operationId":"createBranchApproval"}}},"/projects/{project_reference}/branches/{branch_id}/approvals/{approval_id}/dismiss":{"post":{"operationId":"dismissBranchApproval","tags":["projects/Branches/Branch Approvals"],"summary":"Dismiss branch approval","description":"Dismiss an approval so it no longer counts, keeping its record with the reason. Requires project.files.write; API keys also need delete scope.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"uuid","description":"Branch UUID belonging to the selected project. Missing or foreign branches return 404."},"required":true,"name":"branch_id","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Approval ID to soft-dismiss. The audit row is retained; the approval no longer counts toward merge eligibility."},"required":true,"description":"Approval ID to soft-dismiss. The audit row is retained; the approval no longer counts toward merge eligibility.","name":"approval_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","description":"Reason for the dismissal."}}},"example":{"reason":"New commits"}}}},"responses":{"200":{"description":"Approval dismissed. Its record is kept with the dismissal fields.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Approval ID."},"branch_id":{"type":"string","format":"uuid","description":"Approved branch."},"approved_by":{"type":"string","format":"uuid","description":"User who approved."},"approved_at":{"type":"string","description":"Approval time; kept after dismissal."},"comment":{"type":["string","null"],"description":"Approval comment, or null."},"dismissed_at":{"type":["string","null"],"description":"Dismissal time, or null while the approval counts."},"dismissed_by":{"type":["string","null"],"format":"uuid","description":"User who dismissed the approval, or null."},"dismissed_reason":{"type":["string","null"],"description":"Dismissal reason, or null."}},"required":["id","branch_id","approved_by","approved_at","comment","dismissed_at","dismissed_by","dismissed_reason"]},"example":{"id":"2e3d4c5b-6f7a-4b8c-9d0e-1f2a3b4c5d6e","branch_id":"0f6d3c1e-2a4b-4c8d-9e7f-1a2b3c4d5e6f","approved_by":"9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d","approved_at":"2026-10-10T12:00:00.000Z","comment":"LGTM","dismissed_at":"2026-10-10T12:00:00.000Z","dismissed_by":"9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d","dismissed_reason":"New commits"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Branch Approvals","x-canonical-documentation":{"domain":"projects","resource":"Branches","subgroup":"Branch Approvals","name":"Dismiss branch approval","description":"Dismiss an approval so it no longer counts, keeping its record with the reason. Requires project.files.write; API keys also need delete scope.","operationId":"dismissBranchApproval"}}},"/projects/{project_reference}/branches/{branch_id}/status-checks":{"get":{"operationId":"listBranchStatusChecks","tags":["projects/Branches/Branch Status Checks"],"summary":"List branch status checks","description":"List the status checks reported for a branch. Requires project.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"uuid","description":"Branch UUID belonging to the selected project. Missing or foreign branches return 404."},"required":true,"name":"branch_id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size 1–100. Omit limit and cursor for the complete collection; cursor alone defaults to 20.","example":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":4096,"description":"Opaque continuation bound to collection, project, branch, principal, filters and page size. Paged records use ID ascending order."},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"List of status checks.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"branch_id":{"type":"string","format":"uuid"},"check_name":{"type":"string"},"status":{"type":"string","enum":["pending","success","failure"]},"description":{"type":["string","null"]},"external_url":{"type":["string","null"]},"started_at":{"type":["string","null"],"description":"Recorded check start time, or null when unavailable."},"completed_at":{"type":["string","null"],"description":"Recorded check completion time, or null while pending."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","branch_id","check_name","status","description","external_url","created_at","updated_at"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data"]},"example":{"data":[{"id":"6b7c8d9e-0f1a-4b2c-9d3e-4f5a6b7c8d9e","branch_id":"0f6d3c1e-2a4b-4c8d-9e7f-1a2b3c4d5e6f","check_name":"ci/build","status":"success","description":"Build passed","external_url":"https://ci.example.com/runs/42","started_at":"2026-10-10T12:00:00.000Z","completed_at":"2026-10-10T12:00:00.000Z","created_at":"2026-10-10T12:00:00.000Z","updated_at":"2026-10-10T12:00:00.000Z"}]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Branch Status Checks","x-canonical-documentation":{"domain":"projects","resource":"Branches","subgroup":"Branch Status Checks","name":"List branch status checks","description":"List the status checks reported for a branch. Requires project.read.","operationId":"listBranchStatusChecks"}}},"/projects/{project_reference}/branches/{branch_id}/status-checks/{check_name}":{"put":{"operationId":"updateBranchStatusCheck","tags":["projects/Branches/Branch Status Checks"],"summary":"Update branch status check","description":"Create or replace one named status check on a branch. Requires project.files.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"uuid","description":"Branch UUID belonging to the selected project. Missing or foreign branches return 404."},"required":true,"name":"branch_id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":100,"description":"Status check name, the key of the check on its branch, at most 100 characters. URL-encode it: names such as ci/build carry a slash.","example":"ci%2Fbuild"},"required":true,"name":"check_name","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["pending","success","failure"],"description":"State to report: pending, success or failure."},"description":{"type":"string","description":"Description of the result."},"external_url":{"type":"string","description":"Link to the external result."}},"required":["status"]},"example":{"status":"success","description":"Build passed","external_url":"https://ci.example.com/runs/42"}}}},"responses":{"200":{"description":"Status check created or replaced.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Status check ID."},"branch_id":{"type":"string","format":"uuid","description":"Branch the check reports on."},"check_name":{"type":"string","description":"Check name; the key of the check on its branch."},"status":{"type":"string","enum":["pending","success","failure"],"description":"Reported state."},"description":{"type":["string","null"],"description":"Result description, or null."},"external_url":{"type":["string","null"],"description":"Link to the external result, or null."},"started_at":{"type":["string","null"],"description":"Start time, or null when unavailable."},"completed_at":{"type":["string","null"],"description":"Completion time, or null while pending."},"created_at":{"type":"string","description":"Creation time."},"updated_at":{"type":"string","description":"Last update time."}},"required":["id","branch_id","check_name","status","description","external_url","started_at","completed_at","created_at","updated_at"]},"example":{"id":"6b7c8d9e-0f1a-4b2c-9d3e-4f5a6b7c8d9e","branch_id":"0f6d3c1e-2a4b-4c8d-9e7f-1a2b3c4d5e6f","check_name":"ci/build","status":"success","description":"Build passed","external_url":"https://ci.example.com/runs/42","started_at":"2026-10-10T12:00:00.000Z","completed_at":"2026-10-10T12:00:00.000Z","created_at":"2026-10-10T12:00:00.000Z","updated_at":"2026-10-10T12:00:00.000Z"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Branch Status Checks","x-canonical-documentation":{"domain":"projects","resource":"Branches","subgroup":"Branch Status Checks","name":"Update branch status check","description":"Create or replace one named status check on a branch. Requires project.files.write.","operationId":"updateBranchStatusCheck"}}},"/projects/{project_reference}/commit":{"post":{"operationId":"commit","tags":["projects/Branches/Project Commits"],"summary":"Commit files","description":"Commit the files. Requires project.files.write.","parameters":[{"schema":{"type":"string","example":"my-project"},"required":true,"name":"project_reference","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"file_ids":{"type":"array","items":{"type":"string"},"description":"Legacy alias of file_references. Conflicting alias values return 400."},"file_references":{"type":"array","items":{"type":"string"},"description":"Paths or legacy file UUIDs whose pending edits, deletions and renames are committed. Files commit independently: a conflict may leave other files committed."},"branch_reference":{"type":"string","description":"Branch whose pending changes are committed; defaults to main."},"expected_version_id":{"type":"string","format":"uuid","description":"Expected persisted version for a single file. A stale version returns 409; reread and retry only conflicted files."},"expected_versions":{"type":"object","description":"Expected persisted version per file. A stale version returns 409, with committed versions and conflicted files in the Problem response. Reread and retry only conflicted files.","additionalProperties":{"type":"string","format":"uuid"}}}}}}},"responses":{"200":{"description":"Committed file versions.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"versions":{"type":"array","items":{"type":"object","properties":{"file_id":{"type":"string","format":"uuid"},"version_id":{"type":"string","format":"uuid"},"path":{"type":"string"}},"required":["version_id","path"]}}},"required":["success","versions"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/CommitConflictProblem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Commits","x-canonical-documentation":{"domain":"projects","resource":"Branches","subgroup":"Project Commits","name":"Commit files","description":"Commit the files. Requires project.files.write.","operationId":"commit"}}},"/projects/{project_reference}/branches/{branch_id}/merge-preview":{"get":{"operationId":"getBranchMergePreview","tags":["projects/Branches/Branch Merges"],"summary":"Get branch merge preview","description":"Show the file-by-file changes a merge would apply, with conflict regions and contents. Requires project.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"uuid","description":"Branch UUID belonging to the selected project. Missing or foreign branches return 404."},"required":true,"name":"branch_id","in":"path"},{"schema":{"type":["string","null"],"format":"uuid","description":"Target branch ID; omit for main."},"required":false,"description":"Target branch ID; omit for main.","name":"target_branch_id","in":"query"}],"responses":{"200":{"description":"Merge preview.","content":{"application/json":{"schema":{"type":"object","properties":{"source_branch":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Branch ID."},"name":{"type":"string","description":"Branch name, unique in the project."},"project_id":{"type":"string","format":"uuid","description":"Project that owns the branch."},"base_branch_id":{"type":["string","null"],"format":"uuid","description":"Branch this branch was created from, or null for the root branch."},"status":{"type":"string","enum":["active","merged","closed"],"description":"Lifecycle state; closed is distinct from merged."},"description":{"type":["string","null"],"description":"Branch description, or null."},"auto_delete_on_merge":{"type":"boolean","description":"Whether the branch is deleted after it merges."},"version":{"type":"integer","minimum":0,"description":"Version to pass as expected_version when merging."},"created_at":{"type":"string","description":"Creation time."},"created_by":{"type":["string","null"],"format":"uuid","description":"User who created the branch, or null."},"updated_at":{"type":["string","null"],"description":"Last update time, or null."},"merged_at":{"type":["string","null"],"description":"Merge time, or null before a merge."},"merged_by":{"type":["string","null"],"format":"uuid","description":"User who merged the branch, or null."}},"required":["id","name","project_id","base_branch_id","status","description","auto_delete_on_merge","version","created_at","created_by","updated_at","merged_at","merged_by"],"description":"Branch to merge."},"target_branch_id":{"type":["string","null"],"format":"uuid","description":"Branch that receives the merge, or null for main."},"target_branch_name":{"type":"string","description":"Name of the branch that receives the merge."},"can_merge":{"type":"boolean","description":"True only when blocked_reason is null, merge policies pass and no file has conflicts. Advisory: the merge checks these conditions again."},"blocked_reason":{"type":["string","null"],"description":"Precondition that blocks the merge, such as a merged or closed branch, or a target that is the source branch or is closed; null when none does. A target that is missing or in another project is a not found error."},"has_conflicts":{"type":"boolean","description":"Whether at least one file has conflicts."},"diffs":{"type":"array","items":{"type":"object","properties":{"file_path":{"type":"string","description":"File path; the file ID when neither side has a path."},"file_type":{"type":"string","description":"File type."},"file_id":{"type":["string","null"],"description":"File ID, or null."},"has_conflicts":{"type":"boolean","description":"Whether the file has conflicts that block an automatic merge."},"conflict_count":{"type":"integer","minimum":0,"description":"Number of conflict regions."},"conflict_regions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Region ID, stable within one preview; conflict resolutions are keyed by it."},"type":{"type":"string","enum":["conflict"],"description":"Region kind."},"base_start":{"type":"integer","description":"First line in the common base."},"base_end":{"type":"integer","description":"Last line in the common base."},"target_start":{"type":"integer","description":"First line in the target branch."},"target_end":{"type":"integer","description":"Last line in the target branch."},"source_start":{"type":"integer","description":"First line in the source branch."},"source_end":{"type":"integer","description":"Last line in the source branch."},"base_lines":{"type":"string","description":"Conflicting text in the common base."},"target_lines":{"type":"string","description":"Conflicting text in the target branch."},"source_lines":{"type":"string","description":"Conflicting text in the source branch."}},"required":["id","type","base_start","base_end","target_start","target_end","source_start","source_end","base_lines","target_lines","source_lines"]},"description":"Conflicting line ranges."},"is_new":{"type":"boolean","description":"The merge adds the file to the target."},"is_deleted":{"type":"boolean","description":"The merge deletes the file from the target."},"is_modified":{"type":"boolean","description":"The merge changes the file in the target."},"base_changed":{"type":"boolean","description":"The target changed the file since the branch was created."},"branch_changed":{"type":"boolean","description":"The branch changed the file."},"base_content":{"type":["string","null"],"description":"Content at the common base, or null."},"target_content":{"type":["string","null"],"description":"Content in the target branch, or null."},"source_content":{"type":["string","null"],"description":"Content in the source branch, or null."}},"required":["file_path","file_type","file_id","has_conflicts","conflict_count","conflict_regions","is_new","is_deleted","is_modified","base_changed","branch_changed","base_content","target_content","source_content"]},"description":"File-by-file changes the merge applies."}},"required":["source_branch","target_branch_id","target_branch_name","can_merge","blocked_reason","has_conflicts","diffs"]},"example":{"source_branch":{"id":"0f6d3c1e-2a4b-4c8d-9e7f-1a2b3c4d5e6f","name":"feature-header","project_id":"3b9e2c7a-5d41-4f8e-9a6b-2c1d0e9f8a7b","base_branch_id":"7c1d2e3f-4a5b-4c6d-8e9f-0a1b2c3d4e5f","created_at":"2026-10-10T12:00:00.000Z","created_by":"9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d","merged_at":null,"merged_by":null,"status":"active","updated_at":"2026-10-10T12:00:00.000Z","version":4,"description":null,"auto_delete_on_merge":false},"target_branch_id":null,"target_branch_name":"main","can_merge":false,"blocked_reason":null,"has_conflicts":false,"diffs":[{"file_id":"4f5e6d7c-8b9a-4c0d-9e1f-2a3b4c5d6e7f","file_path":"pages/index.tsx","file_type":"page","has_conflicts":false,"conflict_count":0,"conflict_regions":[],"is_new":false,"is_deleted":false,"is_modified":true,"base_changed":false,"branch_changed":true,"base_content":"export default 1","target_content":"export default 1","source_content":"export default 2"}]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Branches","x-canonical-documentation":{"domain":"projects","resource":"Branches","subgroup":"Branch Merges","name":"Get branch merge preview","description":"Show the file-by-file changes a merge would apply, with conflict regions and contents. Requires project.read.","operationId":"getBranchMergePreview"}}},"/projects/{project_reference}/branches/{branch_id}/merge-eligibility":{"get":{"operationId":"checkBranchMergeEligibility","tags":["projects/Branches/Branch Merges"],"summary":"Check branch merge eligibility","description":"Check policies, approvals and status checks to say whether a branch can merge now. Requires project.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"uuid","description":"Branch UUID belonging to the selected project. Missing or foreign branches return 404."},"required":true,"name":"branch_id","in":"path"}],"responses":{"200":{"description":"Merge eligibility result. A branch that cannot merge is a result with blockers, not an error.","content":{"application/json":{"schema":{"type":"object","properties":{"can_merge":{"type":"boolean","description":"Whether policies, approvals and status checks allow the merge now."},"applicable_policies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Policy ID."},"project_id":{"type":"string","format":"uuid","description":"Project that owns the policy."},"name":{"type":"string","description":"Policy name."},"is_enabled":{"type":"boolean","description":"Whether the policy is evaluated on merge."},"target_branch_pattern":{"type":["string","null"],"description":"Branch-name pattern the policy applies to; null applies to every branch."},"required_approvals":{"type":"integer","minimum":0,"description":"Approvals a matching branch needs before it can merge."},"allow_self_approval":{"type":"boolean","description":"Whether the merging user's own approval counts."},"required_reviewer_ids":{"type":["array","null"],"items":{"type":"string"},"description":"Users who must approve; null when the policy was created without reviewers."},"created_at":{"type":"string","description":"Creation time."},"updated_at":{"type":"string","description":"Last update time."}},"required":["id","project_id","name","is_enabled","target_branch_pattern","required_approvals","allow_self_approval","required_reviewer_ids","created_at","updated_at"]},"description":"Enabled policies that match the branch."},"approvals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Approval ID."},"branch_id":{"type":"string","format":"uuid","description":"Approved branch."},"approved_by":{"type":"string","format":"uuid","description":"User who approved."},"approved_at":{"type":"string","description":"Approval time; kept after dismissal."},"comment":{"type":["string","null"],"description":"Approval comment, or null."},"dismissed_at":{"type":["string","null"],"description":"Dismissal time, or null while the approval counts."},"dismissed_by":{"type":["string","null"],"format":"uuid","description":"User who dismissed the approval, or null."},"dismissed_reason":{"type":["string","null"],"description":"Dismissal reason, or null."}},"required":["id","branch_id","approved_by","approved_at","comment","dismissed_at","dismissed_by","dismissed_reason"]},"description":"Approvals that still count."},"status_checks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Status check ID."},"branch_id":{"type":"string","format":"uuid","description":"Branch the check reports on."},"check_name":{"type":"string","description":"Check name; the key of the check on its branch."},"status":{"type":"string","enum":["pending","success","failure"],"description":"Reported state."},"description":{"type":["string","null"],"description":"Result description, or null."},"external_url":{"type":["string","null"],"description":"Link to the external result, or null."},"started_at":{"type":["string","null"],"description":"Start time, or null when unavailable."},"completed_at":{"type":["string","null"],"description":"Completion time, or null while pending."},"created_at":{"type":"string","description":"Creation time."},"updated_at":{"type":"string","description":"Last update time."}},"required":["id","branch_id","check_name","status","description","external_url","started_at","completed_at","created_at","updated_at"]},"description":"Status checks reported for the branch."},"blockers":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["approval_required","status_check_failed","status_check_pending","self_approval_not_allowed","required_reviewer_missing"],"description":"Kind of blocker."},"message":{"type":"string","description":"Reader-facing reason."},"details":{"type":["object","null"],"properties":{"policy_id":{"type":["string","null"],"format":"uuid","description":"Policy that blocks the merge, or null."},"required_approvals":{"type":["integer","null"],"description":"Approvals the policy requires, or null."},"approval_count":{"type":["integer","null"],"description":"Approvals that count toward the policy, or null."},"missing_reviewer_ids":{"type":["array","null"],"items":{"type":"string"},"description":"Required reviewers who have not approved, or null."},"failed_checks":{"type":["array","null"],"items":{"type":"object","properties":{"name":{"type":"string","description":"Check name."},"description":{"type":["string","null"],"description":"Result description, or null."}},"required":["name","description"]},"description":"Failed status checks, or null."},"pending_checks":{"type":["array","null"],"items":{"type":"object","properties":{"name":{"type":"string","description":"Check name."},"description":{"type":["string","null"],"description":"Result description, or null."}},"required":["name","description"]},"description":"Pending status checks, or null."}},"required":["policy_id","required_approvals","approval_count","missing_reviewer_ids","failed_checks","pending_checks"],"description":"Facts behind the blocker, or null."}},"required":["type","message","details"]},"description":"Reasons the branch cannot merge; empty when it can."}},"required":["can_merge","applicable_policies","approvals","status_checks","blockers"]},"example":{"can_merge":false,"applicable_policies":[{"id":"1d2c3b4a-5e6f-4a7b-8c9d-0e1f2a3b4c5d","project_id":"3b9e2c7a-5d41-4f8e-9a6b-2c1d0e9f8a7b","name":"Review main","is_enabled":true,"target_branch_pattern":"main","required_approvals":1,"allow_self_approval":true,"required_reviewer_ids":null,"created_at":"2026-10-10T12:00:00.000Z","updated_at":"2026-10-10T12:00:00.000Z"}],"approvals":[],"status_checks":[{"id":"6b7c8d9e-0f1a-4b2c-9d3e-4f5a6b7c8d9e","branch_id":"0f6d3c1e-2a4b-4c8d-9e7f-1a2b3c4d5e6f","check_name":"ci/build","status":"success","description":"Build passed","external_url":"https://ci.example.com/runs/42","started_at":"2026-10-10T12:00:00.000Z","completed_at":"2026-10-10T12:00:00.000Z","created_at":"2026-10-10T12:00:00.000Z","updated_at":"2026-10-10T12:00:00.000Z"}],"blockers":[{"type":"approval_required","message":"1 approval required, 0 received","details":{"policy_id":"1d2c3b4a-5e6f-4a7b-8c9d-0e1f2a3b4c5d","required_approvals":1,"approval_count":0,"missing_reviewer_ids":null,"failed_checks":null,"pending_checks":null}}]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Branches","x-canonical-documentation":{"domain":"projects","resource":"Branches","subgroup":"Branch Merges","name":"Check branch merge eligibility","description":"Check policies, approvals and status checks to say whether a branch can merge now. Requires project.read.","operationId":"checkBranchMergeEligibility"}}},"/projects/{project_reference}/uploads/folders":{"post":{"operationId":"createUploadFolder","tags":["projects/Uploads/Upload Folders"],"summary":"Create upload folder","description":"Create a folder in project uploads with a visibility. Requires project.uploads.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"folder_path":{"type":"string","description":"Folder path (for example, \"assets/images/\"). Trailing slash is added automatically."},"path":{"type":"string","description":"Another spelling of folder_path. Send one of the two."},"visibility":{"type":"string","enum":["project","public","private"],"default":"project","description":"Folder visibility; defaults to project. Changing inherited visibility requires path administration; public visibility follows the paid-project policy."}}}}}},"responses":{"201":{"description":"Folder created.","content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","description":"Project-relative storage path, without a leading slash."},"visibility":{"type":"string","enum":["project","public","private"],"description":"Effective access policy for the upload or folder."},"permission":{"type":["string","null"],"enum":["read","write","admin",null],"description":"The caller's access to the folder as the uploads list reports it: read, write or admin. Null when the list does not show the folder to the caller."},"created_at":{"type":"string","description":"Creation time of the folder. A folder that already existed keeps its time."}},"required":["path","visibility","permission","created_at"]}}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Public visibility is not available on the project plan","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project or upload path not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Upload Folders","x-canonical-documentation":{"domain":"projects","resource":"Uploads","subgroup":"Upload Folders","name":"Create upload folder","description":"Create a folder in project uploads with a visibility. Requires project.uploads.write.","operationId":"createUploadFolder"}}},"/projects/{project_reference}/uploads/folders/{folder_path}":{"delete":{"operationId":"deleteUploadFolder","tags":["projects/Uploads/Upload Folders"],"summary":"Delete upload folder","description":"Delete a folder's visibility settings and child folders and soft-delete every upload under its prefix. Requires project.uploads.write; API keys also need delete scope.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Folder path whose visibility and child visibility settings are removed, with all files under its prefix soft-deleted. URL-encoded folder path (for example, \"assets%2Fimages%2F\")."},"required":true,"name":"folder_path","in":"path"}],"responses":{"200":{"description":"Folder deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Invalid URL encoding in path","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Folder not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Upload Folders","x-canonical-documentation":{"domain":"projects","resource":"Uploads","subgroup":"Upload Folders","name":"Delete upload folder","description":"Delete a folder's visibility settings and child folders and soft-delete every upload under its prefix. Requires project.uploads.write; API keys also need delete scope.","operationId":"deleteUploadFolder"}}},"/projects/{project_reference}/uploads/folders/{folder_path}/move":{"post":{"operationId":"moveUploadFolder","tags":["projects/Uploads/Upload Folders"],"summary":"Move upload folder","description":"Move a folder, its child folder settings and its active uploads to a new unused path. Requires project.uploads.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","minLength":1,"description":"Folder to move with its subfolders, uploads and shares. URL-encoded source folder path (for example, \"assets%2Fimages%2F\")."},"required":true,"description":"Folder path; a trailing slash is appended when absent.","name":"folder_path","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"destination_path":{"type":"string","minLength":1,"description":"Unused destination folder path; a trailing slash is appended when absent."}},"required":["destination_path"]}}}},"responses":{"200":{"description":"Folder moved.","content":{"application/json":{"schema":{"type":"object","properties":{"source_path":{"type":"string","description":"Folder path before the move, with a trailing slash."},"destination_path":{"type":"string","description":"Folder path after the move, with a trailing slash."},"folders_moved":{"type":"integer","minimum":0,"description":"Folder records moved, including the source folder."},"uploads_moved":{"type":"integer","minimum":0,"description":"Active uploads moved."}},"required":["source_path","destination_path","folders_moved","uploads_moved"]}}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Source folder not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Destination folder already exists, or an upload in the folder has no stored content yet","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Upload Folders","x-canonical-documentation":{"domain":"projects","resource":"Uploads","subgroup":"Upload Folders","name":"Move upload folder","description":"Move a folder, its child folder settings and its active uploads to a new unused path. Requires project.uploads.write.","operationId":"moveUploadFolder"}}},"/projects/{project_reference}/uploads/grants/{upload_path}":{"get":{"operationId":"listUploadGrants","tags":["projects/Uploads/Upload Grants"],"summary":"List upload grants","description":"List every user grant on the upload or folder that governs a path, with the target that was resolved. Requires project.uploads.admin.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Path whose recipient grants are listed. Requires path administration. Upload UUID or double-URL-encoded project-relative file path or applicable folder prefix."},"required":true,"name":"upload_path","in":"path"}],"responses":{"200":{"description":"Grants list.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string","description":"UUID of the user receiving the grant."},"permission":{"type":"string","enum":["read","write","admin"],"description":"Access granted to this user: read, write, or admin."},"created_at":{"type":"string","description":"Creation timestamp in ISO 8601 format."}},"required":["user_id","permission","created_at"]}},"resolved_path":{"type":"string","description":"Path whose effective grants were resolved."},"resolved_type":{"type":"string","enum":["folder","upload"],"description":"Whether the resolved grant target is a folder or upload."},"resolved_id":{"type":"string","description":"UUID of the resolved grant target, when available."}},"required":["data","resolved_path"]}}}},"400":{"description":"Invalid URL encoding in path","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication is required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Admin access required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project or upload path not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Upload Grants","x-canonical-documentation":{"domain":"projects","resource":"Uploads","subgroup":"Upload Grants","name":"List upload grants","description":"List every user grant on the upload or folder that governs a path, with the target that was resolved. Requires project.uploads.admin.","operationId":"listUploadGrants"}},"put":{"operationId":"updateUploadGrants","tags":["projects/Uploads/Upload Grants"],"summary":"Update upload grants","description":"Replace the complete list of user grants on an upload or folder; an empty list revokes every grant. Requires project.uploads.admin.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Upload UUID or double-URL-encoded project-relative file path or applicable folder prefix whose entire recipient grant list is replaced. Requires path administration; an empty grants list revokes every grant."},"required":true,"name":"upload_path","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"grants":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string"},"permission":{"type":"string","enum":["read","write","admin"],"default":"read"}},"required":["user_id"]},"description":"Complete recipient grant list. Replaces all grants; an empty list revokes every grant."}},"required":["grants"]}}}},"responses":{"200":{"description":"Grants set.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string","description":"UUID of the user receiving the grant."},"permission":{"type":"string","enum":["read","write","admin"],"description":"Access granted to this user: read, write, or admin."},"created_at":{"type":"string","description":"Creation timestamp in ISO 8601 format."}},"required":["user_id","permission","created_at"]}},"resolved_path":{"type":"string","description":"Path whose effective grants were resolved."},"resolved_type":{"type":"string","enum":["folder","upload"],"description":"Whether the resolved grant target is a folder or upload."},"resolved_id":{"type":"string","description":"UUID of the resolved grant target, when available."}},"required":["data","resolved_path"]}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication is required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Admin access required to manage grants","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project or upload path not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Upload Grants","x-canonical-documentation":{"domain":"projects","resource":"Uploads","subgroup":"Upload Grants","name":"Update upload grants","description":"Replace the complete list of user grants on an upload or folder; an empty list revokes every grant. Requires project.uploads.admin.","operationId":"updateUploadGrants"}}},"/projects/{project_reference}/uploads/grants/{upload_path}/{user_id}":{"put":{"operationId":"updateUploadGrant","tags":["projects/Uploads/Upload Grants"],"summary":"Update upload grant","description":"Grant one user read, write or admin access to an upload or folder, or change that grant, and leave the other grants unchanged. Requires project.uploads.admin.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","minLength":1,"description":"Upload UUID or double-URL-encoded project-relative upload path or applicable folder prefix on which the grant is stored. Requires path administration."},"required":true,"description":"Upload UUID or double-URL-encoded project-relative upload path or applicable folder prefix on which the grant is stored. Requires path administration.","name":"upload_path","in":"path"},{"schema":{"type":"string","format":"uuid","description":"UUID of the user the grant is for."},"required":true,"description":"UUID of the user the grant is for.","name":"user_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"permission":{"type":"string","enum":["read","write","admin"],"default":"read","description":"Access to give: read (default), write or admin."}}}}}},"responses":{"200":{"description":"Grant stored.","content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"string","description":"UUID of the user the grant is for."},"permission":{"type":"string","enum":["read","write","admin"],"description":"Access the grant gives: read, write or admin."},"created_at":{"type":"string","description":"Creation time, RFC 3339."}},"required":["user_id","permission","created_at"]}}}},"400":{"description":"Invalid recipient UUID, a recipient that is not a user, an invalid permission or path encoding","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication is required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Admin access required to manage grants","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project not found, or no upload or folder setting governs the path","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Upload Grants","x-canonical-documentation":{"domain":"projects","resource":"Uploads","subgroup":"Upload Grants","name":"Update upload grant","description":"Grant one user read, write or admin access to an upload or folder, or change that grant, and leave the other grants unchanged. Requires project.uploads.admin.","operationId":"updateUploadGrant"}},"delete":{"operationId":"deleteUploadGrant","tags":["projects/Uploads/Upload Grants"],"summary":"Delete upload grant","description":"Revoke one user's grant on an upload or folder. Requires project.uploads.admin; API keys also need delete scope.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Private path from which the recipient grant is removed. Requires path administration. Upload UUID or double-URL-encoded project-relative file path or applicable folder prefix."},"required":true,"description":"Private path from which the recipient grant is removed. Requires path administration. Upload UUID or double-URL-encoded project-relative file path or applicable folder prefix.","name":"upload_path","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Recipient user UUID whose grant is revoked"},"required":true,"description":"Recipient user UUID whose grant is revoked","name":"user_id","in":"path"}],"responses":{"200":{"description":"Grant removed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Invalid recipient UUID or path encoding, or no applicable visibility target","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication is required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Admin access required. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project or grant not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Upload Grants","x-canonical-documentation":{"domain":"projects","resource":"Uploads","subgroup":"Upload Grants","name":"Delete upload grant","description":"Revoke one user's grant on an upload or folder. Requires project.uploads.admin; API keys also need delete scope.","operationId":"deleteUploadGrant"}}},"/projects/{project_reference}/uploads":{"get":{"operationId":"listUploads","tags":["projects/Uploads/Project Uploads"],"summary":"List uploads","description":"List the uploads the caller can see under an optional folder prefix, newest first by default, with the visible folders in a separate list. Requires project.uploads.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Project-relative path to select direct-child files (for example, \"assets/\"). Omit to list all project files."},"required":false,"name":"path","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":4096,"description":"Opaque continuation; copy unchanged with the same project/path/sort. A removed anchor requires restarting; live changes affect traversal. Legacy ISO timestamps retain the creation cutoff and cannot recover ties."},"required":false,"name":"cursor","in":"query"},{"$ref":"#/components/parameters/PaginationLimit"},{"schema":{"type":"string","enum":["created_at","name","size_bytes","size"],"default":"created_at","description":"Sort field. Defaults to \"created_at\". \"size\" is accepted as another spelling of \"size_bytes\"."},"required":false,"name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort order. Defaults to \"desc\"."},"required":false,"name":"sort_order","in":"query"},{"schema":{"type":"boolean","default":true,"description":"When true, returns all nested folders under the given path (or all folders if no path). Default: true."},"required":false,"name":"recursive","in":"query"}],"responses":{"200":{"description":"One page of uploads with the visible folders in `folders`. `data` also repeats the folders as `type: \"folder\"` items before the uploads (`type: \"file\"`).","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/UploadFolder"},{"$ref":"#/components/schemas/UploadFile"}],"discriminator":{"propertyName":"type","mapping":{"folder":"#/components/schemas/UploadFolder","file":"#/components/schemas/UploadFile"}},"description":"Upload item — either a folder (type: \"folder\") or a file (type: \"file\")"}},"folders":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Folder path with a trailing slash."},"visibility":{"type":"string","enum":["project","public","private"],"description":"Effective access policy for the upload or folder."},"permission":{"type":"string","enum":["read","write","admin"],"description":"The caller’s effective access to this item: read, write, or admin."},"created_at":{"type":"string","description":"Creation timestamp in ISO 8601 format."}},"required":["path","visibility","permission","created_at"]},"description":"Visible folders, separate from the upload cursor and page size. The `data` items with `type: \"folder\"` repeat them."},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","folders","page_info"]}}}},"400":{"description":"Invalid request parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden - insufficient permissions","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project or upload path not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Uploads","x-canonical-documentation":{"domain":"projects","resource":"Uploads","subgroup":"Project Uploads","name":"List uploads","description":"List the uploads the caller can see under an optional folder prefix, newest first by default, with the visible folders in a separate list. Requires project.uploads.read.","operationId":"listUploads"}},"post":{"operationId":"createUpload","tags":["projects/Uploads/Project Uploads"],"summary":"Create upload","description":"Create a pending upload at a project path and return the signed URL and headers for the PUT request that sends the bytes. Requires project.uploads.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","description":"Project-relative path where the upload is stored."},"file_path":{"type":"string","description":"Another spelling of path. Send one of the two."},"content_type":{"type":"string","description":"MIME type of the file"},"size_bytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"File size in bytes (required for quota tracking)."},"size":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Another spelling of size_bytes. Send one of the two."}}}}}},"responses":{"201":{"description":"Signed upload URL created.","content":{"application/json":{"schema":{"type":"object","properties":{"upload_url":{"type":"string","description":"Temporary cloud-storage URL for the upload PUT request."},"path":{"type":"string","description":"Project-relative path of the upload."},"status":{"type":"string","enum":["pending"],"description":"Always pending until the bytes are stored."},"file_upload_url":{"type":"string","description":"The same URL as upload_url."},"file_path":{"type":"string","description":"Storage path of the upload, with the project ID prefix."},"upload_id":{"type":"string","description":"UUID of the pending upload record."},"required_headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Headers that must be included in the PUT request to the upload URL","example":{"Content-Type":"image/png","x-goog-content-length-range":"0,1048576"}}},"required":["upload_url","path","status","file_upload_url","file_path","upload_id","required_headers"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/QuotaProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"An upload was created at the same path concurrently","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Uploads","x-canonical-documentation":{"domain":"projects","resource":"Uploads","subgroup":"Project Uploads","name":"Create upload","description":"Create a pending upload at a project path and return the signed URL and headers for the PUT request that sends the bytes. Requires project.uploads.write.","operationId":"createUpload"}}},"/projects/{project_reference}/uploads/{upload_reference}":{"get":{"operationId":"getUpload","tags":["projects/Uploads/Project Uploads"],"summary":"Get upload","description":"Return one upload's metadata by UUID or project-relative path.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Upload ID (UUID) or URL-encoded file path. Public uploads allow anonymous access; private uploads require authentication."},"required":true,"name":"upload_reference","in":"path"}],"responses":{"200":{"description":"With Accept: application/json, returns upload metadata; with Accept: application/octet-stream, streams file bytes.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Upload UUID."},"path":{"type":"string","description":"Project-relative storage path, without a leading slash."},"file_name":{"type":"string","description":"File name from the upload record."},"content_type":{"type":["string","null"],"description":"Stored MIME type, or null when unspecified."},"size_bytes":{"type":"number","description":"File size in bytes."},"size":{"type":"number","description":"File size in bytes; the same value as size_bytes."},"url":{"type":["string","null"],"description":"API URL for downloading the upload; access depends on its visibility."},"status":{"type":"string","enum":["pending","active","failed"],"description":"Upload lifecycle state: pending until finalized, active when available, or failed."},"visibility":{"type":"string","enum":["project","public","private"],"description":"Effective access policy for the upload or folder."},"created_at":{"type":"string","description":"Creation timestamp in ISO 8601 format."},"updated_at":{"type":"string","description":"Last update timestamp in ISO 8601 format."},"deleted_at":{"type":["string","null"],"description":"Soft deletion timestamp in ISO 8601 format, or null for an undeleted upload."}},"required":["id","path","file_name","content_type","size_bytes","size","url","status","visibility","created_at","updated_at","deleted_at"]}},"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"302":{"description":"Redirect to signed URL (default behavior for browsers/img tags)"},"400":{"description":"Invalid request parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The caller lacks access to the upload or path","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"File not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Uploads","x-canonical-documentation":{"domain":"projects","resource":"Uploads","subgroup":"Project Uploads","name":"Get upload","description":"Return one upload's metadata by UUID or project-relative path.","operationId":"getUpload"}},"delete":{"operationId":"deleteUpload","tags":["projects/Uploads/Project Uploads"],"summary":"Delete upload","description":"Soft-delete an upload so it no longer lists or downloads. Requires project.uploads.write; API keys also need delete scope.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Upload path to soft-delete. Requires upload write and path edit access; API keys also need delete scope. Restoration requires the deleted record to exist; no deletion-age cutoff is enforced."},"required":true,"description":"Upload path to soft-delete. Requires upload write and path edit access; API keys also need delete scope. Restoration requires the deleted record to exist; no deletion-age cutoff is enforced.","name":"upload_reference","in":"path"}],"responses":{"200":{"description":"File deleted successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Missing file path","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The caller lacks access to the upload or path. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"File not found, or not visible to the caller","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The upload changed concurrently","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Uploads","x-canonical-documentation":{"domain":"projects","resource":"Uploads","subgroup":"Project Uploads","name":"Delete upload","description":"Soft-delete an upload so it no longer lists or downloads. Requires project.uploads.write; API keys also need delete scope.","operationId":"deleteUpload"}}},"/projects/{project_reference}/uploads/{upload_reference}/url":{"get":{"operationId":"getUploadDownloadUrl","tags":["projects/Uploads/Project Uploads"],"summary":"Get upload download URL","description":"Return a temporary signed URL that downloads an upload's bytes, with its expiry time. Requires project.uploads.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Upload ID (UUID) or URL-encoded file path"},"required":true,"name":"upload_reference","in":"path"},{"schema":{"type":"number","minimum":60,"maximum":86400,"description":"Requested signed URL lifetime in seconds, from 60 to 86400. Private uploads are capped at 1800 seconds; public uploads at 86400 seconds."},"required":false,"name":"ttl_seconds","in":"query"},{"schema":{"type":"number","minimum":60,"maximum":86400,"description":"Another spelling of ttl_seconds. Send one of the two."},"required":false,"name":"ttl","in":"query"}],"responses":{"200":{"description":"Signed download URL.","content":{"application/json":{"schema":{"type":"object","properties":{"signed_url":{"type":"string","description":"Temporary cloud-storage download URL."},"expires_at":{"type":"string","description":"URL expiration timestamp. Private files expire after 30 minutes; public files after 24 hours."}},"required":["signed_url","expires_at"]}}}},"400":{"description":"Invalid request parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The caller lacks access to the upload or path","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"File not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Uploads","x-canonical-documentation":{"domain":"projects","resource":"Uploads","subgroup":"Project Uploads","name":"Get upload download URL","description":"Return a temporary signed URL that downloads an upload's bytes, with its expiry time. Requires project.uploads.read.","operationId":"getUploadDownloadUrl"}}},"/projects/{project_reference}/uploads/download-urls":{"post":{"operationId":"listUploadDownloadUrls","tags":["projects/Uploads/Project Uploads"],"summary":"List upload download URLs","description":"Sign download URLs for up to 20 uploads at once and report a status for each upload that is missing or denied. Requires project.uploads.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"upload_references":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"maxItems":20,"description":"Up to 20 upload UUIDs or project-relative file paths, signed in input order. Each upload retains its read-access check."},"ttl_seconds":{"type":"number","minimum":60,"maximum":86400,"description":"Requested lifetime in seconds. Private uploads are capped at 1800 seconds; public uploads at 86400 seconds."},"ttl":{"type":"number","minimum":60,"maximum":86400,"description":"Another spelling of ttl_seconds. Send one of the two."}},"required":["upload_references"]}}}},"responses":{"200":{"description":"Per-upload signing results.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"signed_url":{"type":"string","description":"Temporary cloud-storage download URL."},"expires_at":{"type":"string","description":"URL expiration timestamp. Private files expire after 30 minutes; public files after 24 hours."},"upload_reference":{"type":"string"},"status":{"type":"number","enum":[200],"description":"Signed successfully. Missing and denied uploads instead return individual 404 or 403 statuses."}},"required":["signed_url","expires_at","upload_reference","status"]},{"type":"object","properties":{"upload_reference":{"type":"string"},"status":{"type":"number","enum":[403]},"error":{"type":"string"}},"required":["upload_reference","status","error"]},{"type":"object","properties":{"upload_reference":{"type":"string"},"status":{"type":"number","enum":[404]},"error":{"type":"string"}},"required":["upload_reference","status","error"]}]}}},"required":["data"]}}}},"400":{"description":"Invalid batch","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Project read access denied","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Unexpected storage failure; the request fails","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Uploads","x-canonical-documentation":{"domain":"projects","resource":"Uploads","subgroup":"Project Uploads","name":"List upload download URLs","description":"Sign download URLs for up to 20 uploads at once and report a status for each upload that is missing or denied. Requires project.uploads.read.","operationId":"listUploadDownloadUrls"}}},"/projects/{project_reference}/uploads/{upload_reference}/move":{"post":{"operationId":"moveUpload","tags":["projects/Uploads/Project Uploads"],"summary":"Move upload","description":"Move an upload to another path in the same project, keeping its ID. Requires project.uploads.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Upload ID (UUID) or URL-encoded file path"},"required":true,"name":"upload_reference","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"destination_path":{"type":"string","description":"Project-relative destination path."},"new_path":{"type":"string","description":"Another spelling of destination_path. Send one of the two."}}}}}},"responses":{"200":{"description":"File moved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Upload UUID."},"path":{"type":"string","description":"Project-relative storage path, without a leading slash."},"file_name":{"type":"string","description":"File name from the upload record."},"content_type":{"type":["string","null"],"description":"Stored MIME type, or null when unspecified."},"size_bytes":{"type":"number","description":"File size in bytes."},"url":{"type":["string","null"],"description":"API URL for downloading the upload; access depends on its visibility."},"status":{"type":"string","enum":["pending","active","failed"],"description":"Upload lifecycle state: pending until finalized, active when available, or failed."},"visibility":{"type":"string","enum":["project","public","private"],"description":"Effective access policy for the upload or folder."},"created_at":{"type":"string","description":"Creation timestamp in ISO 8601 format."},"updated_at":{"type":"string","description":"Last update timestamp in ISO 8601 format."},"deleted_at":{"type":["string","null"],"description":"Soft deletion timestamp in ISO 8601 format, or null for an undeleted upload."},"success":{"type":"boolean","description":"Always true; a failed move is a Problem response."},"error":{"type":"string","description":"Move failure details, when supplied."},"file":{"type":"object","properties":{"id":{"type":"string","description":"Upload UUID."},"path":{"type":"string","description":"Project-relative storage path, without a leading slash."},"file_name":{"type":"string","description":"File name from the upload record."},"content_type":{"type":["string","null"],"description":"Stored MIME type, or null when unspecified."},"size_bytes":{"type":"number","description":"File size in bytes."},"size":{"type":"number","description":"File size in bytes; the same value as size_bytes."},"url":{"type":["string","null"],"description":"API URL for downloading the upload; access depends on its visibility."},"status":{"type":"string","enum":["pending","active","failed"],"description":"Upload lifecycle state: pending until finalized, active when available, or failed."},"visibility":{"type":"string","enum":["project","public","private"],"description":"Effective access policy for the upload or folder."},"created_at":{"type":"string","description":"Creation timestamp in ISO 8601 format."},"updated_at":{"type":"string","description":"Last update timestamp in ISO 8601 format."},"deleted_at":{"type":["string","null"],"description":"Soft deletion timestamp in ISO 8601 format, or null for an undeleted upload."}},"required":["id","path","file_name","content_type","size_bytes","size","url","status","visibility","created_at","updated_at","deleted_at"],"description":"The moved upload again, as the route returned it before the top-level fields."}},"required":["id","path","file_name","content_type","size_bytes","url","status","visibility","created_at","updated_at","deleted_at","success"]}}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The caller lacks access to the upload or path","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Source file not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The upload changed concurrently, or its content was never sent to its upload URL","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Uploads","x-canonical-documentation":{"domain":"projects","resource":"Uploads","subgroup":"Project Uploads","name":"Move upload","description":"Move an upload to another path in the same project, keeping its ID. Requires project.uploads.write.","operationId":"moveUpload"}}},"/projects/{project_reference}/uploads/{upload_reference}/restore":{"post":{"operationId":"restoreUpload","tags":["projects/Uploads/Project Uploads"],"summary":"Restore upload","description":"Restore a soft-deleted upload. Requires project.uploads.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Upload UUID selects that exact row; raw project-relative path selects an active row first, otherwise latest deletion then descending UUID. Active rows are rejected. No deletion-age cutoff is enforced; stored content availability is not checked. Requires upload write and path edit access."},"required":true,"description":"Upload UUID selects that exact row; raw project-relative path selects an active row first, otherwise latest deletion then descending UUID. Active rows are rejected. No deletion-age cutoff is enforced; stored content availability is not checked. Requires upload write and path edit access.","name":"upload_reference","in":"path"}],"responses":{"200":{"description":"File restored successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Upload UUID."},"path":{"type":"string","description":"Project-relative storage path, without a leading slash."},"file_name":{"type":"string","description":"File name from the upload record."},"content_type":{"type":["string","null"],"description":"Stored MIME type, or null when unspecified."},"size_bytes":{"type":"number","description":"File size in bytes."},"size":{"type":"number","description":"File size in bytes; the same value as size_bytes."},"url":{"type":["string","null"],"description":"API URL for downloading the upload; access depends on its visibility."},"status":{"type":"string","enum":["pending","active","failed"],"description":"Upload lifecycle state: pending until finalized, active when available, or failed."},"visibility":{"type":"string","enum":["project","public","private"],"description":"Effective access policy for the upload or folder."},"created_at":{"type":"string","description":"Creation timestamp in ISO 8601 format."},"updated_at":{"type":"string","description":"Last update timestamp in ISO 8601 format."},"deleted_at":{"type":["string","null"],"description":"Soft deletion timestamp in ISO 8601 format, or null for an undeleted upload."}},"required":["id","path","file_name","content_type","size_bytes","size","url","status","visibility","created_at","updated_at","deleted_at"]}}}},"400":{"description":"Invalid request, or the upload is not soft-deleted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The caller lacks access to the upload or path","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project or upload not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Upload is being collected, or its path is occupied by an active upload","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Uploads","x-canonical-documentation":{"domain":"projects","resource":"Uploads","subgroup":"Project Uploads","name":"Restore upload","description":"Restore a soft-deleted upload. Requires project.uploads.write.","operationId":"restoreUpload"}}},"/projects/{project_reference}/uploads/visibility/{upload_path}":{"put":{"operationId":"updateUploadVisibility","tags":["projects/Uploads/Upload Visibility"],"summary":"Update upload visibility","description":"Set an upload's or folder's visibility to project, public or private. Requires project.uploads.admin.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Upload or folder-prefix path whose visibility setting is created or updated. Requires path administration. Double-URL-encode the project-relative file path or folder prefix. Existing folders also accept omission of the trailing slash."},"required":true,"description":"Upload or folder-prefix path whose visibility setting is created or updated. Requires path administration.","name":"upload_path","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"visibility":{"type":"string","enum":["project","public","private"],"description":"Visibility setting to create or update. Requires path administration; public visibility follows the paid-project policy. project means project members; public means anyone; private means granted users only."}},"required":["visibility"]}}}},"responses":{"200":{"description":"Visibility set","content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","description":"Project-relative storage path, without a leading slash."},"visibility":{"type":"string","enum":["project","public","private"],"description":"Effective access policy for the upload or folder."}},"required":["path","visibility"]}}}},"400":{"description":"Invalid URL encoding in path","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication is required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Public visibility is not available on the project plan","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The caller lacks access to the upload or path","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project or upload path not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Upload Visibility","x-canonical-documentation":{"domain":"projects","resource":"Uploads","subgroup":"Upload Visibility","name":"Update upload visibility","description":"Set an upload's or folder's visibility to project, public or private. Requires project.uploads.admin.","operationId":"updateUploadVisibility"}},"delete":{"operationId":"deleteUploadVisibility","tags":["projects/Uploads/Upload Visibility"],"summary":"Delete upload visibility","description":"Remove the explicit visibility on an upload path or folder so it inherits from its parent folder or the project default again. Requires project.uploads.admin; API keys also need delete scope.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Upload or folder-prefix path whose visibility setting is removed. Requires path administration. Files fall back to the nearest parent visibility setting or default project visibility. Double-URL-encode the project-relative file path or folder prefix. Existing folders also accept omission of the trailing slash."},"required":true,"name":"upload_path","in":"path"}],"responses":{"200":{"description":"Visibility removed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Invalid URL encoding in path","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Authentication is required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The caller lacks access to the upload or path. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project or visibility setting not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Upload Visibility","x-canonical-documentation":{"domain":"projects","resource":"Uploads","subgroup":"Upload Visibility","name":"Delete upload visibility","description":"Remove the explicit visibility on an upload path or folder so it inherits from its parent folder or the project default again. Requires project.uploads.admin; API keys also need delete scope.","operationId":"deleteUploadVisibility"}}},"/projects/{project_reference}/agents":{"get":{"operationId":"listAgents","tags":["agents/Agents/Agents"],"summary":"List agents","description":"List agents. Requires project.agents.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":["string","null"],"enum":["main_branch","environment","preview_branch",null]},"required":false,"name":"runtime_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_environment_id","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"},{"schema":{"type":"string","enum":["project","main_branch","environment","preview_branch"]},"required":false,"name":"source_target_kind","in":"query"}],"responses":{"200":{"description":"Discovered agents","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCardList"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project agents","x-canonical-documentation":{"domain":"agents","resource":"Agents","subgroup":"Agents","name":"List agents","description":"List agents. Requires project.agents.read.","operationId":"listAgents"}},"post":{"operationId":"createAgent","tags":["agents/Agents/Agents"],"summary":"Create agent","description":"Create agent. Requires project.agents.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string"},"required":false,"name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-zA-Z0-9_-]+$"},"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"model":{"type":["string","null"]},"system_prompt":{"type":"string","minLength":1},"thinking":{"type":"object","properties":{"enabled":{"type":"boolean"},"budget_tokens":{"type":"number","exclusiveMinimum":0}},"required":["enabled"],"additionalProperties":false},"temperature":{"type":["number","null"],"minimum":0,"maximum":2},"max_steps":{"type":["integer","null"],"exclusiveMinimum":0},"allowed_models":{"type":"array","items":{"type":"string","minLength":1}},"skill_ids":{"type":"array","items":{"type":"string","minLength":1}},"skill_selection":{"type":"object","properties":{"kind":{"type":"string","enum":["omitted","explicit"]},"skill_ids":{"type":"array","items":{"type":"string","minLength":1},"default":[]}},"required":["kind"]},"skills":{"anyOf":[{"type":"boolean"},{"type":"string","minLength":1,"maxLength":128},{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":500},{"type":"object","additionalProperties":{"type":"boolean"}}]},"all_tools_enabled":{"type":"boolean"},"tool_ids":{"type":"array","items":{"type":"string","minLength":1},"description":"Project tools, platform tools, and integration catalog tools returned by get_integration. Use exact names from the agent tool references search."},"tools":{"anyOf":[{"type":"boolean"},{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":500},{"type":"object","additionalProperties":{"type":"boolean"}}],"description":"Callable host-tool selector. Use false to disable all host tools, including skill and delegation tools. An empty array or map selects no project tools but preserves legacy runtime essentials. Provider-native tools use provider_tool_ids."},"tool_loading":{"type":"string","enum":["eager","deferred"]},"tool_result_context":{"anyOf":[{"type":"boolean"},{"type":"object","properties":{"max_inline_bytes":{"type":"integer","exclusiveMinimum":0,"maximum":1048576},"preview_bytes":{"type":"integer","exclusiveMinimum":0,"maximum":1048576},"max_section_bytes":{"type":"integer","minimum":4,"maximum":1048576},"max_stored_results":{"type":"integer","exclusiveMinimum":0,"maximum":1024}},"additionalProperties":false}]},"knowledge":{"anyOf":[{"type":"boolean"},{"type":"string","minLength":1,"maxLength":4096},{"type":"array","items":{"type":"string","minLength":1,"maxLength":4096},"maxItems":1024},{"type":"object","additionalProperties":{"type":"boolean"}}]},"provider_tool_ids":{"type":"array","items":{"type":"string","minLength":1},"description":"Provider-native model tools only. Never put tool references from tool_ids here."},"suggestions":{"type":["array","null"],"items":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"title":{"type":"string","minLength":1},"prompt":{"type":"string","minLength":1}},"required":["title","prompt"],"additionalProperties":false}]}},"avatar":{"type":["object","null"],"properties":{"seed":{"type":"string","minLength":1,"maxLength":128},"archetype":{"type":"string","enum":["upright","slumped","alert","profile","leaning","crouched","tall","spread","happy","sad","angry","surprised","sleepy","curious"]},"texture":{"type":"string","pattern":"^(?:[0-9]|none)$"},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"shape":{"type":"string","enum":["snircle","circle","square"]},"matrix":{"type":"string","pattern":"^[012]{16}$"}}},"avatar_url":{"type":["string","null"],"format":"uri"},"security_enabled":{"type":"boolean"}},"required":["id","name","system_prompt"]}}}},"responses":{"201":{"description":"Agent created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSource"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AgentProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AgentProblem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project agents","x-canonical-documentation":{"domain":"agents","resource":"Agents","subgroup":"Agents","name":"Create agent","description":"Create agent. Requires project.agents.write.","operationId":"createAgent"}}},"/projects/{project_reference}/agent-cards":{"get":{"operationId":"listAgentCards","tags":["agents/Agents/Agents"],"summary":"List agent cards","description":"List executable agent protocol cards. Requires project.agents.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":["string","null"],"enum":["main_branch","environment","preview_branch",null]},"required":false,"name":"runtime_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_environment_id","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"},{"schema":{"type":"string","enum":["project","main_branch","environment","preview_branch"]},"required":false,"name":"source_target_kind","in":"query"}],"responses":{"200":{"description":"Discovered agents","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCardList"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project agents","x-canonical-documentation":{"domain":"agents","resource":"Agents","subgroup":"Agents","name":"List agent cards","description":"List executable agent protocol cards. Requires project.agents.read.","operationId":"listAgentCards"}}},"/agents":{"get":{"operationId":"listAccessibleAgents","tags":["agents/Agents/Agents"],"summary":"List agents across projects","description":"List agents across projects.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":false,"name":"account_id","in":"query"},{"schema":{"type":"string","description":"Opaque cursor returned from `page_info.next` or `page_info.prev`."},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Maximum number of agents to return, from 1 to 100."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Case-insensitive search across agent names, agent IDs, and project names. Requires `sort_by=project_name` with `sort_order=asc` and `access=all`, with no `kind` or `runtime_status` filter. Any cursor must come from a page with compatible search options. Other combinations return `400`."},"required":false,"name":"search","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Optional project slug or ID to narrow the account-wide collection."},"required":false,"name":"project_reference","in":"query"},{"schema":{"type":"string","enum":["all","project","shared"],"default":"all","description":"Access source filter. `shared` is reserved for direct shared-agent grants and currently returns an empty set. Public templates are listed by the agent template catalog, not here."},"required":false,"name":"access","in":"query"},{"schema":{"type":"string","enum":["source_project_agent","installed_project_agent"],"description":"Filter by project-agent kind."},"required":false,"name":"kind","in":"query"},{"schema":{"type":"string","enum":["ready","offline","not_applicable","unknown"],"description":"Filter by runtime readiness status."},"required":false,"name":"runtime_status","in":"query"},{"schema":{"type":"string","enum":["name","project_name","updated_at"],"default":"project_name","description":"Field to sort by. Ties break by agent row ID ascending."},"required":false,"description":"Field to sort by. Ties break by agent row ID ascending.","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"asc","description":"Sort direction. Defaults to asc, the order the directory has always used."},"required":false,"description":"Sort direction. Defaults to asc, the order the directory has always used.","name":"sort_order","in":"query"}],"responses":{"200":{"description":"Paginated account-wide accessible agents","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque stable account-wide agent row ID."},"agent_id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"avatar_url":{"type":["string","null"]},"kind":{"type":"string","enum":["source_project_agent","installed_project_agent"]},"source_type":{"type":"string","enum":["project","catalog_install"]},"can_run":{"type":"boolean","description":"Whether a run can start on this agent. False when the project has no billing owner; starting a run there fails with 422 project-billing-owner-missing. True does not prove live runtime readiness, model availability, or execution authorization; these are checked when a run starts."},"provider":{"type":"object","properties":{"organization":{"type":"string"},"url":{"type":"string"}},"required":["organization","url"]},"version":{"type":"string"},"capabilities":{"type":"object","properties":{"streaming":{"type":"boolean"},"push_notifications":{"type":"boolean"},"extensions":{"type":"array","items":{"type":"string"}}},"required":["streaming","push_notifications","extensions"]},"default_input_modes":{"type":"array","items":{"type":"string"}},"default_output_modes":{"type":"array","items":{"type":"string"}},"tools":{"type":"array","items":{"type":"string"}},"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"examples":{"type":"array","items":{"type":"string"}}},"required":["id","name"]}},"suggestions":{"type":"array","items":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"title":{"type":"string","minLength":1},"prompt":{"type":"string","minLength":1}},"required":["title","prompt"],"additionalProperties":false}]}},"project":{"type":"object","properties":{"account_id":{"type":["string","null"],"format":"uuid"},"account_name":{"type":["string","null"]},"id":{"type":"string","format":"uuid"},"reference":{"type":"string"},"name":{"type":"string"}},"required":["id","reference","name"]},"access":{"type":"object","properties":{"type":{"type":"string","enum":["project","project_install","shared"]},"relation":{"type":"string","enum":["owner","admin","editor","viewer"]}},"required":["type","relation"]},"runtime_readiness":{"type":"object","properties":{"status":{"type":"string","enum":["ready","offline","not_applicable","unknown"]},"reason":{"type":["string","null"]},"runtime_target_kind":{"type":["string","null"],"enum":["registered_push_service","pull_worker",null]},"runtime_service_key":{"type":["string","null"]}},"required":["status","reason","runtime_target_kind","runtime_service_key"],"description":"Readiness of a registered push or pull runtime service, when one applies. For a source agent, not_applicable means this service check does not apply; it does not mean the agent cannot run. This field does not verify model availability or execution access."},"model":{"type":["string","null"],"description":"Model identifier exposed by the agent card. Null does not mean a model is required or identify the model a run will use. Model selection and availability are checked at run admission."},"url":{"type":"string"},"updated_at":{"type":["string","null"]}},"required":["id","agent_id","name","description","kind","source_type","can_run","provider","version","capabilities","default_input_modes","default_output_modes","tools","skills","project","access","runtime_readiness","model","url","updated_at"]}},"page_info":{"allOf":[{"$ref":"#/components/schemas/PageInfo"},{"type":"object","properties":{"next":{"type":["string","null"],"description":"Opaque cursor to continue matching rows or remaining scan work. Follow it even when this page has no agents; null means no continuation remains."}}}]}},"required":["data","page_info"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Accessible agents","x-canonical-documentation":{"domain":"agents","resource":"Agents","subgroup":"Agents","name":"List agents across projects","description":"List agents across projects.","operationId":"listAccessibleAgents"}}},"/projects/{project_reference}/agents/{agent_id}/card":{"get":{"operationId":"getAgent","tags":["agents/Agents/Agents"],"summary":"Get agent","description":"Get agent card. Requires project.agents.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Agent identifier"},"required":true,"description":"Agent identifier.","name":"agent_id","in":"path"},{"schema":{"type":["string","null"],"enum":["main_branch","environment","preview_branch",null]},"required":false,"name":"runtime_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_environment_id","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"},{"schema":{"type":"string","enum":["project","main_branch","environment","preview_branch"]},"required":false,"name":"source_target_kind","in":"query"}],"responses":{"200":{"description":"Agent card","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"],"description":"Public agent summary. Saved system instructions are in the agent source document (get_agent_source)."},"provider":{"type":"object","properties":{"organization":{"type":"string"},"url":{"type":"string"}},"required":["organization","url"]},"version":{"type":"string"},"capabilities":{"type":"object","properties":{"streaming":{"type":"boolean"},"push_notifications":{"type":"boolean"},"extensions":{"type":"array","items":{"type":"string"}}},"required":["streaming","push_notifications","extensions"]},"default_input_modes":{"type":"array","items":{"type":"string"}},"default_output_modes":{"type":"array","items":{"type":"string"}},"tools":{"type":"array","items":{"type":"string"},"description":"Source-selected tools summarized by the card as exact tool IDs. An empty array does not establish that tools are disabled. Read saved configuration from the agent source document and source-selected tools and integration readiness from agent capabilities; neither verifies execution grants."},"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"examples":{"type":"array","items":{"type":"string"}}},"required":["id","name"]}},"suggestions":{"type":"array","items":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"title":{"type":"string","minLength":1},"prompt":{"type":"string","minLength":1}},"required":["title","prompt"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["source_project_agent","installed_project_agent"]},"can_run":{"type":"boolean","description":"Whether the card supports invocation. When false, inspect runtime_readiness.status and runtime_readiness.reason before starting a run. True does not prove live runtime readiness, model availability, or execution authorization. These are checked when a run starts."},"source_type":{"type":"string","enum":["project","catalog_install"]},"installed_access":{"type":"object","properties":{"grant_id":{"type":"string","format":"uuid"},"relation":{"type":"string","enum":["owner","admin","editor","viewer"]},"service_account_id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"status":{"type":"string"}},"required":["grant_id","relation","service_account_id","project_id","status"]},"runtime_readiness":{"type":"object","properties":{"status":{"type":"string","enum":["ready","offline","not_applicable","unknown"]},"reason":{"type":["string","null"]},"runtime_target_kind":{"type":["string","null"],"enum":["registered_push_service","pull_worker",null]},"runtime_service_key":{"type":["string","null"]}},"required":["status","reason","runtime_target_kind","runtime_service_key"],"description":"Readiness of a registered push or pull runtime service, when one applies. For a source agent, not_applicable means this service check does not apply; it does not mean the agent cannot run. This field does not verify model availability or execution access."},"source_path":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]},"avatar_url":{"type":["string","null"],"description":"This agent's avatar: an http(s) URL, or a root-relative path served from the project. Null when no custom avatar has been set."},"model":{"type":["string","null"],"description":"Model identifier exposed by the agent card. Null does not mean a model is required or identify the model a run will use. Model selection and availability are checked at run admission."},"url":{"type":"string","description":"URL of the agent."}},"required":["id","name","description","provider","version","capabilities","default_input_modes","default_output_modes","tools","skills","kind","can_run","source_type","source_path","edit_mode","model","url"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project agents","x-canonical-documentation":{"domain":"agents","resource":"Agents","subgroup":"Agents","name":"Get agent","description":"Get agent card. Requires project.agents.read.","operationId":"getAgent"}}},"/projects/{project_reference}/agents/{agent_id}":{"get":{"operationId":"getAgentSource","tags":["agents/Agents/Agents"],"summary":"Get agent source","description":"Get agent source. Requires project.agents.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Agent identifier"},"required":true,"description":"Agent identifier.","name":"agent_id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"}],"responses":{"200":{"description":"Agent document","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSource"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AgentProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AgentProblem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project agents","x-canonical-documentation":{"domain":"agents","resource":"Agents","subgroup":"Agents","name":"Get agent source","description":"Get agent source. Requires project.agents.read.","operationId":"getAgentSource"}},"put":{"operationId":"updateAgent","tags":["agents/Agents/Agents"],"summary":"Update agent","description":"Update agent. Requires project.agents.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","minLength":1,"description":"Agent identifier"},"required":true,"description":"Agent identifier.","name":"agent_id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"model":{"type":["string","null"]},"system_prompt":{"type":"string","minLength":1},"thinking":{"type":"object","properties":{"enabled":{"type":"boolean"},"budget_tokens":{"type":"number","exclusiveMinimum":0}},"required":["enabled"],"additionalProperties":false},"temperature":{"type":["number","null"],"minimum":0,"maximum":2},"max_steps":{"type":["integer","null"],"exclusiveMinimum":0},"allowed_models":{"type":"array","items":{"type":"string","minLength":1}},"skill_ids":{"type":"array","items":{"type":"string","minLength":1}},"skill_selection":{"type":"object","properties":{"kind":{"type":"string","enum":["omitted","explicit"]},"skill_ids":{"type":"array","items":{"type":"string","minLength":1},"default":[]}},"required":["kind"]},"skills":{"anyOf":[{"type":"boolean"},{"type":"string","minLength":1,"maxLength":128},{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":500},{"type":"object","additionalProperties":{"type":"boolean"}}]},"all_tools_enabled":{"type":"boolean"},"tool_ids":{"type":"array","items":{"type":"string","minLength":1},"description":"Project tools, platform tools, and integration catalog tools returned by get_integration. Use exact names from the agent tool references search."},"tools":{"anyOf":[{"type":"boolean"},{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":500},{"type":"object","additionalProperties":{"type":"boolean"}}],"description":"Callable host-tool selector. Use false to disable all host tools, including skill and delegation tools. An empty array or map selects no project tools but preserves legacy runtime essentials. Provider-native tools use provider_tool_ids."},"tool_loading":{"type":"string","enum":["eager","deferred"]},"tool_result_context":{"anyOf":[{"type":"boolean"},{"type":"object","properties":{"max_inline_bytes":{"type":"integer","exclusiveMinimum":0,"maximum":1048576},"preview_bytes":{"type":"integer","exclusiveMinimum":0,"maximum":1048576},"max_section_bytes":{"type":"integer","minimum":4,"maximum":1048576},"max_stored_results":{"type":"integer","exclusiveMinimum":0,"maximum":1024}},"additionalProperties":false}]},"knowledge":{"anyOf":[{"type":"boolean"},{"type":"string","minLength":1,"maxLength":4096},{"type":"array","items":{"type":"string","minLength":1,"maxLength":4096},"maxItems":1024},{"type":"object","additionalProperties":{"type":"boolean"}},{"type":"null"}]},"provider_tool_ids":{"type":"array","items":{"type":"string","minLength":1},"description":"Provider-native model tools only. Never put tool references from tool_ids here."},"suggestions":{"type":["array","null"],"items":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"title":{"type":"string","minLength":1},"prompt":{"type":"string","minLength":1}},"required":["title","prompt"],"additionalProperties":false}]}},"avatar":{"type":["object","null"],"properties":{"seed":{"type":"string","minLength":1,"maxLength":128},"archetype":{"type":"string","enum":["upright","slumped","alert","profile","leaning","crouched","tall","spread","happy","sad","angry","surprised","sleepy","curious"]},"texture":{"type":"string","pattern":"^(?:[0-9]|none)$"},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"shape":{"type":"string","enum":["snircle","circle","square"]},"matrix":{"type":"string","pattern":"^[012]{16}$"}}},"avatar_url":{"type":["string","null"],"format":"uri"},"security_enabled":{"type":"boolean"},"id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-zA-Z0-9_-]+$"}}}}}},"responses":{"200":{"description":"Agent updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSource"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AgentProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AgentProblem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AgentProblem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project agents","x-canonical-documentation":{"domain":"agents","resource":"Agents","subgroup":"Agents","name":"Update agent","description":"Update agent. Requires project.agents.write.","operationId":"updateAgent"}},"delete":{"operationId":"deleteAgent","tags":["agents/Agents/Agents"],"summary":"Delete agent","description":"Delete agent. Requires project.agents.write; API keys also need delete scope.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","minLength":1,"description":"Agent identifier"},"required":true,"name":"agent_id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"}],"responses":{"200":{"description":"Agent deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AgentProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AgentProblem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AgentProblem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project agents","x-canonical-documentation":{"domain":"agents","resource":"Agents","subgroup":"Agents","name":"Delete agent","description":"Delete agent. Requires project.agents.write; API keys also need delete scope.","operationId":"deleteAgent"}}},"/projects/{project_reference}/agents/{agent_id}/labels":{"get":{"operationId":"listAgentLabels","tags":["agents/Agents/Agent Labels"],"summary":"List agent labels","description":"List agent labels. Requires project.agents.read.","parameters":[{"schema":{"type":"string","description":"Project UUID or slug.","example":"my-project"},"required":true,"description":"Project UUID or slug.","name":"project_reference","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"agent_id","in":"path"},{"schema":{"type":"string","enum":["project","main_branch","preview_branch"],"default":"project"},"required":false,"name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"}],"responses":{"200":{"description":"Agent labels.","content":{"application/json":{"schema":{"type":"object","properties":{"labels":{"type":"array","items":{"$ref":"#/components/schemas/Label"}}},"required":["labels"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Agent Labels","x-canonical-documentation":{"domain":"agents","resource":"Agents","subgroup":"Agent Labels","name":"List agent labels","description":"List agent labels. Requires project.agents.read.","operationId":"listAgentLabels"}},"post":{"operationId":"createAgentLabel","tags":["agents/Agents/Agent Labels"],"summary":"Create agent label","description":"Create agent label. Requires project.agents.write.","parameters":[{"schema":{"type":"string","description":"Project UUID or slug.","example":"my-project"},"required":true,"description":"Project UUID or slug.","name":"project_reference","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"agent_id","in":"path"},{"schema":{"type":"string","enum":["project","main_branch","preview_branch"],"default":"project"},"required":false,"name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"description":"Required label key. Trimmed and lowercased; starts with a letter or number and allows letters, numbers, dot, underscore and dash."},"value":{"type":["string","null"],"maxLength":128,"description":"Label value. Trimmed; a supplied blank value is invalid. Omit or use null for a key-only label, including on replacement."},"color":{"type":["string","null"],"maxLength":32,"description":"Display color. Omit, use null or supply a blank string to clear it, including on replacement."}},"required":["key"]}}}},"responses":{"200":{"description":"Created label.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Label"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Requires project.agents.write.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Agent Labels","x-canonical-documentation":{"domain":"agents","resource":"Agents","subgroup":"Agent Labels","name":"Create agent label","description":"Create agent label. Requires project.agents.write.","operationId":"createAgentLabel"}}},"/projects/{project_reference}/agents/{agent_id}/labels/{label_id}":{"put":{"operationId":"updateAgentLabel","tags":["agents/Agents/Agent Labels"],"summary":"Update agent label","description":"Update agent label. Requires project.agents.write.","parameters":[{"schema":{"type":"string","description":"Project UUID or slug.","example":"my-project"},"required":true,"description":"Project UUID or slug.","name":"project_reference","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"agent_id","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Label UUID within the selected resource."},"required":true,"description":"Label UUID within the selected resource.","name":"label_id","in":"path"},{"schema":{"type":"string","enum":["project","main_branch","preview_branch"],"default":"project"},"required":false,"name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"description":"Required label key. Trimmed and lowercased; starts with a letter or number and allows letters, numbers, dot, underscore and dash."},"value":{"type":["string","null"],"maxLength":128,"description":"Label value. Trimmed; a supplied blank value is invalid. Omit or use null for a key-only label, including on replacement."},"color":{"type":["string","null"],"maxLength":32,"description":"Display color. Omit, use null or supply a blank string to clear it, including on replacement."}},"required":["key"]}}}},"responses":{"200":{"description":"Updated label.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Label"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Requires project.agents.write.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Agent Labels","x-canonical-documentation":{"domain":"agents","resource":"Agents","subgroup":"Agent Labels","name":"Update agent label","description":"Update agent label. Requires project.agents.write.","operationId":"updateAgentLabel"}},"delete":{"operationId":"deleteAgentLabel","tags":["agents/Agents/Agent Labels"],"summary":"Delete agent label","description":"Delete agent label. Requires project.agents.write; API keys also need delete scope.","parameters":[{"schema":{"type":"string","description":"Project UUID or slug.","example":"my-project"},"required":true,"description":"Project UUID or slug.","name":"project_reference","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"agent_id","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Label UUID within the selected resource."},"required":true,"description":"Label UUID within the selected resource.","name":"label_id","in":"path"},{"schema":{"type":"string","enum":["project","main_branch","preview_branch"],"default":"project"},"required":false,"name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"}],"responses":{"200":{"description":"Label soft-deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Requires project.agents.write; API keys also require delete scope. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Agent Labels","x-canonical-documentation":{"domain":"agents","resource":"Agents","subgroup":"Agent Labels","name":"Delete agent label","description":"Delete agent label. Requires project.agents.write; API keys also need delete scope.","operationId":"deleteAgentLabel"}}},"/agent-templates":{"get":{"operationId":"listAgentTemplates","tags":["agents/Agents/Agent templates"],"summary":"List agent templates","description":"List agent templates.","parameters":[{"schema":{"type":"string","description":"Opaque cursor returned from `page_info.next` or `page_info.prev`."},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"description":"Page size (1-200, default 100)."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Case-insensitive substring search across agent name, description, `agent_id`, and `category_label`. Uses the catalog cache; template edits appear within approximately 60 seconds.","example":"support"},"required":false,"name":"search","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Filter to a single category ID."},"required":false,"name":"category","in":"query"},{"schema":{"type":"string","enum":["template_agent","installable_agent"],"description":"Filter to one catalog identity kind."},"required":false,"name":"kind","in":"query"},{"schema":{"type":"string","enum":["veryfront","user"],"description":"Filter by who published the entry."},"required":false,"name":"origin","in":"query"},{"schema":{"type":"string","enum":["name","agent_id","category_label"],"description":"Sort field. Defaults to \"name\".","example":"name"},"required":false,"name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"description":"Sort order. Defaults to \"asc\".","example":"asc"},"required":false,"name":"sort_order","in":"query"}],"responses":{"200":{"description":"Paginated agent template catalog","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agent_id":{"type":"string"},"kind":{"type":"string","enum":["template_agent","installable_agent"],"description":"Catalog identity kind. Template agents are fork-only; installable agents are installed into a project before they can run."},"name":{"type":"string"},"description":{"type":["string","null"]},"avatar_url":{"type":["string","null"],"format":"uri"},"category_id":{"type":"string"},"category_label":{"type":"string"},"provider_name":{"type":"string"},"provider_url":{"type":["string","null"],"format":"uri"},"model":{"type":["string","null"]},"version":{"type":["string","null"]},"tools":{"type":"array","items":{"type":"string","minLength":1}},"suggestions":{"type":"array","items":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"title":{"type":"string","minLength":1},"prompt":{"type":"string","minLength":1}},"required":["title","prompt"],"additionalProperties":false}]}},"actions":{"type":"array","items":{"type":"string","enum":["fork","install"]},"description":"Allowed catalog actions for the caller. Clients should use this instead of inferring behavior from provenance."},"template_project":{"type":"object","properties":{"name":{"type":"string","description":"Display name of the template project used as the forked project name."},"project_reference":{"type":"string","description":"Template project reference used by the fork flow."},"source_path":{"type":["string","null"],"description":"Source path of the agent inside the template project."}},"required":["name","project_reference","source_path"],"description":"Present for template_agent items; omitted for installable_agent items."},"installability":{"type":"object","properties":{"status":{"type":"string","enum":["installable","already_installed","unavailable"]},"reason":{"type":["string","null"]}},"required":["status","reason"],"description":"Project-install state for installable_agent items."},"origin":{"type":"string","enum":["veryfront","user"]},"runtime_mode":{"type":"string","enum":["push_service","pull_worker","none"]},"runtime_service_key":{"type":["string","null"],"description":"Runtime registry key when the entry is backed by a registered service. Internal invoke URLs are intentionally not exposed."},"environment_scope":{"type":"string","enum":["development","staging","production","all"]},"card":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"provider":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":["string","null"],"format":"uri"}},"required":["name","url"]},"version":{"type":["string","null"]},"runtime_mode":{"type":"string","enum":["push_service","pull_worker","none"]},"runtime_service_key":{"type":["string","null"]},"default_input_modes":{"type":"array","items":{"type":"string"}},"default_output_modes":{"type":"array","items":{"type":"string"}},"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"required":["id","name"]}},"tools":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","provider","version","runtime_mode","runtime_service_key","default_input_modes","default_output_modes","skills","tools"]}},"required":["id","agent_id","kind","name","description","category_id","category_label","provider_name","provider_url","version","actions"]},"description":"Unified catalog: agents from configured template projects and approved installable registry entries. Template agents expose the fork action; installable agents expose the install action."},"page_info":{"$ref":"#/components/schemas/PageInfo"},"total":{"type":"integer"}},"required":["data","page_info","total"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Agent templates","x-canonical-documentation":{"domain":"agents","resource":"Agents","subgroup":"Agent templates","name":"List agent templates","description":"List agent templates.","operationId":"listAgentTemplates"}}},"/projects/{project_reference}/agent-tool-references":{"get":{"operationId":"listAgentToolReferences","tags":["agents/Agents/Agent Tool References"],"summary":"Search attachable agent tools","description":"Returns compact schema-free metadata; use exact returned names in tool_ids, never provider_tool_ids. Requires project.agents.write.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string"},"required":false,"name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"},{"$ref":"#/components/parameters/PaginationCursor"},{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum number of compact references to return. Defaults to 20; maximum is 100."},"required":false,"description":"Maximum number of compact references to return. Defaults to 20; maximum is 100.","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Focused text query matched against valid tool reference names and descriptions."},"required":false,"description":"Focused text query matched against valid tool reference names and descriptions.","name":"query","in":"query"},{"schema":{"type":"array","items":{"type":"string","minLength":1,"description":"Exact tool reference name to validate."},"minItems":1,"maxItems":20,"description":"Exact candidate names to return when they are valid for agent tool_ids."},"required":false,"description":"Exact candidate names to return when they are valid for agent tool_ids.","name":"names","in":"query"}],"responses":{"200":{"description":"Matching attachable tools","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Returned tool identity. Submit this canonical name for a new platform selection."},"legacy_name":{"type":"string","description":"Rollback-compatible identity stored by the API after it validates a canonical platform selection."},"description":{"type":"string","description":"Compact purpose of the referenced tool."},"source":{"type":"string","enum":["platform","project","integration"],"description":"Control-plane source that makes this tool reference valid for the selected project target."},"attach_via":{"type":"string","enum":["tool_ids"],"description":"Agent field used to attach this reference. Use the exact returned name in tool_ids, never in provider_tool_ids."}},"required":["name","description","source","attach_via"],"description":"Schema-free tool reference that can be attached to a project agent."},"description":"Deterministically ranked and deduplicated tool references assignable to project agents. This search does not load callable tool contracts; use host tool discovery for executable tools."},"page_info":{"$ref":"#/components/schemas/PageInfo"},"returned":{"type":"integer","minimum":0,"description":"Number of references returned after applying the limit."},"total_matches":{"type":"integer","minimum":0,"description":"Total matching references before applying the limit."}},"required":["data","page_info","returned","total_matches"],"description":"Compact schema-free agent tool reference search result."}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Agent Tool References","x-canonical-documentation":{"domain":"agents","resource":"Agents","subgroup":"Agent Tool References","name":"Search attachable agent tools","description":"Returns compact schema-free metadata; use exact returned names in tool_ids, never provider_tool_ids. Requires project.agents.write.","operationId":"listAgentToolReferences"}}},"/projects/{project_reference}/agents/{agent_id}/avatar.svg":{"get":{"operationId":"getAgentAvatar","tags":["agents/Agents/Agent Avatars"],"summary":"Get agent avatar","description":"Get agent avatar.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string"},"required":true,"name":"agent_id","in":"path"},{"schema":{"type":"string","enum":["project","main_branch","environment","preview_branch"],"description":"Read the avatar from this source target. Defaults to \"project\". Ignored for template projects."},"required":false,"name":"source_target_kind","in":"query"},{"schema":{"type":"string","description":"Branch ID when source_target_kind=preview_branch."},"required":false,"name":"target_branch_id","in":"query"}],"responses":{"200":{"description":"SVG avatar rendered from the agent’s saved avatar configuration. Agents in configured template projects allow anonymous access; other agents require project read access.","content":{"image/svg+xml":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Authentication required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The caller can see the project but cannot read its agents","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Agent not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Agent Avatars","x-canonical-documentation":{"domain":"agents","resource":"Agents","subgroup":"Agent Avatars","name":"Get agent avatar","description":"Get agent avatar.","operationId":"getAgentAvatar"}}},"/projects/{project_reference}/agents/{agent_id}/avatar":{"post":{"operationId":"createAgentAvatar","tags":["agents/Agents/Agent Avatars"],"summary":"Create agent avatar","description":"Create agent avatar. Requires project.agents.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-zA-Z0-9_-]+$"},"required":true,"name":"agent_id","in":"path"},{"schema":{"type":"string","description":"Source target: project or preview_branch. Defaults to project."},"required":false,"description":"Source target: project or preview_branch. Defaults to project.","name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Preview branch UUID, for a preview_branch target."},"required":false,"description":"Preview branch UUID, for a preview_branch target.","name":"target_branch_id","in":"query"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"assign":{"type":"boolean","default":false,"description":"Persist the generated avatar_url onto the agent. Defaults to false; set true to assign it to an existing agent."},"config":{"type":"object","properties":{"seed":{"type":"string","minLength":1,"maxLength":128},"archetype":{"type":"string","enum":["upright","slumped","alert","profile","leaning","crouched","tall","spread","happy","sad","angry","surprised","sleepy","curious"]},"texture":{"type":"string","pattern":"^(?:[0-9]|none)$"},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"shape":{"type":"string","enum":["snircle","circle","square"]},"matrix":{"type":"string","pattern":"^[012]{16}$"}},"description":"Avatar configuration. Omit `seed` to generate a new avatar. With an explicit seed, omitted visual options use the existing avatar configuration if available. New agents use generator defaults."}}}}}},"responses":{"200":{"description":"Agent avatar generated","content":{"application/json":{"schema":{"type":"object","properties":{"avatar_url":{"type":"string","format":"uri","description":"API upload URL of the generated SVG, stored as a project upload. The agent ID may be existing or prospective; the URL is persisted on the agent only when `assign` is true."}},"required":["avatar_url"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Agent Avatars","x-canonical-documentation":{"domain":"agents","resource":"Agents","subgroup":"Agent Avatars","name":"Create agent avatar","description":"Create agent avatar. Requires project.agents.write.","operationId":"createAgentAvatar"}}},"/projects/{project_reference}/agents/{agent_id}/capabilities":{"get":{"operationId":"getAgentCapabilities","tags":["agents/Agents/Agent Capabilities"],"summary":"Get agent capabilities","description":"Get agent capabilities. Requires project.agents.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","minLength":1,"description":"Agent identifier"},"required":true,"name":"agent_id","in":"path"},{"schema":{"type":["string","null"],"enum":["main_branch","environment","preview_branch",null]},"required":false,"name":"runtime_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_environment_id","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"},{"schema":{"type":"string","enum":["project","main_branch","environment","preview_branch"]},"required":false,"name":"source_target_kind","in":"query"}],"responses":{"200":{"description":"Resolved agent capabilities","content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"],"description":"Public agent summary. Saved system instructions are in the agent source document (get_agent_source)."},"provider":{"type":"object","properties":{"organization":{"type":"string"},"url":{"type":"string"}},"required":["organization","url"]},"version":{"type":"string"},"capabilities":{"type":"object","properties":{"streaming":{"type":"boolean"},"push_notifications":{"type":"boolean"},"extensions":{"type":"array","items":{"type":"string"}}},"required":["streaming","push_notifications","extensions"]},"default_input_modes":{"type":"array","items":{"type":"string"}},"default_output_modes":{"type":"array","items":{"type":"string"}},"tools":{"type":"array","items":{"type":"string"},"description":"Source-selected tools summarized by the card as exact tool IDs. An empty array does not establish that tools are disabled. Read saved configuration from the agent source document and source-selected tools and integration readiness from agent capabilities; neither verifies execution grants."},"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"examples":{"type":"array","items":{"type":"string"}}},"required":["id","name"]}},"suggestions":{"type":"array","items":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"title":{"type":"string","minLength":1},"prompt":{"type":"string","minLength":1}},"required":["title","prompt"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["source_project_agent","installed_project_agent"]},"can_run":{"type":"boolean","description":"Whether the card supports invocation. When false, inspect runtime_readiness.status and runtime_readiness.reason before starting a run. True does not prove live runtime readiness, model availability, or execution authorization. These are checked when a run starts."},"source_type":{"type":"string","enum":["project","catalog_install"]},"installed_access":{"type":"object","properties":{"grant_id":{"type":"string","format":"uuid"},"relation":{"type":"string","enum":["owner","admin","editor","viewer"]},"service_account_id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"status":{"type":"string"}},"required":["grant_id","relation","service_account_id","project_id","status"]},"runtime_readiness":{"type":"object","properties":{"status":{"type":"string","enum":["ready","offline","not_applicable","unknown"]},"reason":{"type":["string","null"]},"runtime_target_kind":{"type":["string","null"],"enum":["registered_push_service","pull_worker",null]},"runtime_service_key":{"type":["string","null"]}},"required":["status","reason","runtime_target_kind","runtime_service_key"],"description":"Readiness of a registered push or pull runtime service, when one applies. For a source agent, not_applicable means this service check does not apply; it does not mean the agent cannot run. This field does not verify model availability or execution access."},"source_path":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]},"avatar_url":{"type":["string","null"],"description":"This agent's avatar: an http(s) URL, or a root-relative path served from the project. Null when no custom avatar has been set."},"model":{"type":["string","null"],"description":"Model identifier exposed by the agent card. Null does not mean a model is required or identify the model a run will use. Model selection and availability are checked at run admission."},"url":{"type":"string","description":"URL of the agent."}},"required":["id","name","description","provider","version","capabilities","default_input_modes","default_output_modes","tools","skills","kind","can_run","source_type","source_path","edit_mode","model","url"]},"resolved_capabilities":{"type":"object","properties":{"source_target":{"type":"object","properties":{"kind":{"type":"string","enum":["project","main_branch","environment","preview_branch"]},"target_environment_id":{"type":["string","null"],"format":"uuid"},"target_branch_id":{"type":["string","null"],"format":"uuid"}},"required":["kind","target_environment_id","target_branch_id"]},"runtime_target":{"type":"object","properties":{"kind":{"type":["string","null"],"enum":["main_branch","environment","preview_branch",null]},"target_environment_id":{"type":["string","null"],"format":"uuid"},"target_branch_id":{"type":["string","null"],"format":"uuid"}},"required":["kind","target_environment_id","target_branch_id"]},"skills":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["project"]},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"source_path":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]},"allowed_tools":{"type":"array","items":{"type":"string"}}},"required":["type","id","name","description","source_path","edit_mode"],"title":"ProjectSkill"},{"type":"object","properties":{"type":{"type":"string","enum":["agent"]},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"examples":{"type":"array","items":{"type":"string"}}},"required":["type","id","name"],"title":"AgentSkill"}]},"description":"Skills available in the selected project source, with advertised agent card skills when reading an agent. This is not the inventory of loaded run skills."},"tools":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["control_plane"]},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{}}},"required":["type","name"],"title":"ControlPlaneTool"},{"type":"object","properties":{"type":{"type":"string","enum":["integration"]},"name":{"type":"string"},"description":{"type":"string"},"input_schema":{"type":"object","additionalProperties":{}}},"required":["type","name","description","input_schema"],"title":"IntegrationTool"},{"type":"object","properties":{"type":{"type":"string","enum":["project"]},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"source_path":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]},"input_schema":{"type":["object","null"],"additionalProperties":{}}},"required":["type","id","name","source_path","edit_mode"],"title":"ProjectTool"}]},"description":"Available tool catalog for project capabilities. For agent capabilities, selected catalog tools only, excluding framework helper inventory; tool_selection reports the recovered authored selector. This does not verify run execution access."},"integrations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tool_names":{"type":"array","items":{"type":"string"}}},"required":["id","name","tool_names"]},"description":"Available integration groups for project capabilities; groups of selected available tools for agent capabilities. Read tool_resolution for blocked or missing selections."},"tool_resolution":{"type":"array","items":{"type":"object","properties":{"tool_name":{"type":"string"},"source_selected":{"type":"boolean"},"catalog_available":{"type":"boolean"},"catalog_state":{"type":"string","enum":["available","removed"]},"effective_authorization":{"type":"string","enum":["authorized","restricted_by_policy","catalog_unavailable"]},"policy":{"type":"object","properties":{"state":{"type":"string","enum":["absent","allowed","restricted"]},"scope":{"type":"string","enum":["project","user"]},"allowed_tools":{"type":["array","null"],"items":{"type":"string"}},"execution_mode":{"type":"string","enum":["real","mock"]}},"required":["state","scope","allowed_tools","execution_mode"]},"credential_requirement":{"type":"object","properties":{"mode":{"type":"string","enum":["oauth_connection","project_credentials","none"]},"managed_oauth":{"type":"boolean"},"byo_oauth_app_override":{"type":"object","properties":{"supported":{"type":"boolean"},"required":{"type":"boolean"},"client_id_env_var":{"type":["string","null"]},"client_secret_env_var":{"type":["string","null"]}},"required":["supported","required","client_id_env_var","client_secret_env_var"]},"mandatory_env_vars":{"type":"array","items":{"type":"string"}}},"required":["mode","managed_oauth","byo_oauth_app_override","mandatory_env_vars"]},"connection_readiness":{"type":"object","properties":{"status":{"type":"string","enum":["ready","required","not_applicable","unknown"]},"scope":{"type":["string","null"],"enum":["project","user",null]},"connected_count":{"type":["integer","null"],"minimum":0}},"required":["status","scope","connected_count"]}},"required":["tool_name","source_selected","catalog_available","catalog_state","effective_authorization","policy","credential_requirement","connection_readiness"]}},"tool_access":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"freshness":{"type":"object","properties":{"resolved_at":{"type":"string","format":"date-time"},"valid_for_ms":{"type":"integer","exclusiveMinimum":0},"fail_closed_on_expiry":{"type":"boolean","enum":[true]}},"required":["resolved_at","valid_for_ms","fail_closed_on_expiry"]},"inputs":{"type":"object","properties":{"capabilities":{"type":"array","items":{"type":"string","enum":["project.read","project.settings.manage","project.delete","project.members.read","project.members.manage","project.invites.read","project.invites.manage","project.files.read","project.files.write","project.realtime.connect","project.realtime.write","project.files.admin","project.uploads.read","project.uploads.write","project.uploads.admin","project.knowledge.read","project.knowledge.write","project.releases.read","project.releases.write","project.deployments.read","project.deployments.write","project.deploy.execute","project.runtime.manage","project.channels.read","project.channels.write","project.sandboxes.manage","project.domains.write","project.environments.manage","project.env_vars.write","project.runs.read","project.runs.write","project.runs.admin","project.agents.read","project.agents.write","project.evals.read","project.evals.write","project.evals.run","project.conversations.read","project.conversations.write","project.conversations.create","project.integrations.read","project.integrations.connect","project.integrations.configure","project.api_keys.read","project.api_keys.manage","project.cache.read","project.cache.write","project.logs.read","project.metrics.read","project.resources.read"]}},"billing":{"type":"object","properties":{"collaboration_allowed":{"type":"boolean"},"can_invite":{"type":"boolean"}},"required":["collaboration_allowed","can_invite"]},"entitlements":{"type":"object","properties":{"dedicated_runtime":{"type":"boolean"},"custom_domains":{"type":"boolean"},"export_apps":{"type":"boolean"}},"required":["dedicated_runtime","custom_domains","export_apps"]}},"required":["capabilities","billing","entitlements"]},"families":{"type":"array","items":{"type":"object","properties":{"family":{"type":"string","enum":["collaboration","runtime","domains","export"]},"default_decision":{"type":"object","properties":{"visibility":{"type":"string","enum":["visible","hidden"]},"reason_code":{"type":"string","enum":["allowed","missing_capability","billing_plan_restriction","billing_seat_limit","target_not_supported","resource_state_restriction","policy_exception","unknown"]},"message":{"type":"string"}},"required":["visibility","reason_code"]},"action_overrides":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["create_invite","delete_member","create_server","delete_server","create_domain","download_release"]},"decision":{"type":"object","properties":{"visibility":{"type":"string","enum":["visible","hidden"]},"reason_code":{"type":"string","enum":["allowed","missing_capability","billing_plan_restriction","billing_seat_limit","target_not_supported","resource_state_restriction","policy_exception","unknown"]},"message":{"type":"string"}},"required":["visibility","reason_code"]}},"required":["action","decision"]}}},"required":["family","default_decision","action_overrides"]}}},"required":["version","freshness","inputs","families"],"description":"Requesting-principal policy for catalog visibility, not the agent tool selection or execution grants."},"prompts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"source_path":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]}},"required":["id","name","source_path","edit_mode"]}},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"target":{"type":"string"},"source_path":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]},"version":{"type":["string","null"]},"input_schema":{"type":["object","null"],"additionalProperties":{}},"output_schema":{"type":["object","null"],"additionalProperties":{}},"schedulable":{"type":"boolean"}},"required":["id","name","target","source_path","edit_mode","schedulable"]}},"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"target":{"type":"string"},"source_path":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]},"input_schema":{"type":["object","null"],"additionalProperties":{}},"output_schema":{"type":["object","null"],"additionalProperties":{}},"schedulable":{"type":"boolean"}},"required":["id","name","target","source_path","edit_mode","schedulable"]}},"diagnostics":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["source_file_diagnostic","source_agent_discovery_error","source_trigger_discovery_error"]},"source_kind":{"type":"string","enum":["agent","prompt","tool","task","workflow","resource","skill","eval","schedule","webhook"]},"source_path":{"type":"string","minLength":1},"source_id":{"type":"string","minLength":1},"code":{"type":"string","enum":["parse_error","invalid_definition","dynamic_definition","duplicate_source_id","unsupported_target","manual_conflict"]},"message":{"type":"string","minLength":1},"details":{"type":"object","additionalProperties":{}}},"required":["kind","source_kind","source_path","code","message"]}},"tool_selection":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["omitted"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["disabled"]},"selector":{"type":"boolean","enum":[false]}},"required":["kind","selector"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["all"]},"selector":{"type":"boolean","enum":[true]}},"required":["kind","selector"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["explicit"]},"selector":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":500},{"type":"object","additionalProperties":{"type":"boolean"}}]}},"required":["kind","selector"],"additionalProperties":false}],"description":"Source selector evidence only. Omitted means no statically recovered tools selector, including source that cannot be statically resolved. Disabled corresponds to false; explicit retains arrays or maps, including empty selections. This does not report runtime helper availability or execution grants."},"evidence_scope":{"type":"object","properties":{"tools":{"type":"string","enum":["agent_source_selection"]},"integrations":{"type":"string","enum":["selected_tool_readiness"]},"skills":{"type":"string","enum":["project_catalog_and_agent_card"]},"prompts":{"type":"string","enum":["project_catalog"]},"workflows":{"type":"string","enum":["project_catalog"]},"tasks":{"type":"string","enum":["project_catalog"]},"tool_access":{"type":"string","enum":["caller_catalog_visibility"]},"runtime_model":{"type":"string","enum":["not_resolved"]},"agent_execution_access":{"type":"string","enum":["not_verified"]}},"required":["tools","integrations","skills","prompts","workflows","tasks","tool_access","runtime_model","agent_execution_access"]}},"required":["source_target","runtime_target","skills","tools","integrations","tool_access","prompts","workflows","tasks","tool_selection","evidence_scope"],"description":"Source-selected tools and integration groups, with project catalogs and requesting-principal visibility policy. This does not resolve a runtime model or verify run execution access."}},"required":["agent","resolved_capabilities"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Agent Capabilities","x-canonical-documentation":{"domain":"agents","resource":"Agents","subgroup":"Agent Capabilities","name":"Get agent capabilities","description":"Get agent capabilities. Requires project.agents.read.","operationId":"getAgentCapabilities"}}},"/projects/{project_reference}/definitions":{"get":{"operationId":"searchProjectDefinitions","tags":["agents/Agents/Agent Capabilities"],"summary":"Search project definitions","description":"Search project source definitions by ID or display name.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":["string","null"],"enum":["main_branch","environment","preview_branch",null]},"required":false,"name":"runtime_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_environment_id","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"},{"schema":{"type":"string","enum":["project","main_branch","environment","preview_branch"]},"required":false,"name":"source_target_kind","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":4096,"description":"Exact definition ID or display name. Omit to browse."},"required":false,"description":"Exact definition ID or display name. Omit to browse.","name":"identity","in":"query"},{"schema":{"type":"array","items":{"type":"string","enum":["agent","prompt","tool","task","workflow","resource","skill","eval","schedule","webhook"]},"minItems":1,"maxItems":10},"required":false,"name":"kinds","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":512},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Definition identities and source coverage","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["agent","prompt","tool","task","workflow","resource","skill","eval","schedule","webhook"]},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"description":{"type":"string","maxLength":240},"source_path":{"type":"string","minLength":1},"reader":{"type":["object","null"],"properties":{"operation":{"type":"string"},"identity_parameter":{"type":"string"},"identity":{"type":"string"}},"required":["operation","identity_parameter","identity"]},"reader_unavailable_reason":{"type":"string"}},"required":["kind","id","name","source_path","reader"]},"maxItems":50,"description":"Saved project source definitions, not executable tools. A display name does not establish its kind; read a definition with its reader operation and identity."},"total_matches":{"type":"integer","minimum":0},"page_info":{"type":"object","properties":{"self":{"type":["string","null"]},"first":{"type":"null"},"next":{"type":["string","null"]},"prev":{"type":["string","null"]}},"required":["self","first","next","prev"]},"resolution":{"type":"string","enum":["listed","found","ambiguous","not_found","incomplete"],"description":"Lookup result for the requested kinds at the selected source target. not_found means no matching identity in those kinds only when their coverage is complete; it does not rule out other kinds or targets."},"suggested_query":{"type":"object","properties":{"project_reference":{"type":"string","minLength":1},"identity":{"type":"string","minLength":1},"source_target_kind":{"type":"string","enum":["project","main_branch","environment","preview_branch"]},"target_environment_id":{"type":"string","minLength":1},"target_branch_id":{"type":"string","minLength":1}},"required":["project_reference","identity","source_target_kind"],"description":"For a complete miss with an explicit kind filter, retry this exact identity and source target without kinds. This does not imply a match exists in another kind."},"kind_filter_miss":{"type":"object","properties":{"requested_kinds":{"type":"array","items":{"type":"string","enum":["agent","prompt","tool","task","workflow","resource","skill","eval","schedule","webhook"]},"minItems":1}},"required":["requested_kinds"],"description":"Present when the identity was absent from the requested kinds but exists in another kind. data, coverage, resolution and page_info then describe the unfiltered lookup; use each match kind and reader, not the requested kinds. To continue, re-send the same query (with or without kinds) and page_info.next; the widening is re-applied."},"coverage":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["agent","prompt","tool","task","workflow","resource","skill","eval","schedule","webhook"]},"status":{"type":"string","enum":["complete","incomplete","not_authorized"]},"diagnostic_count":{"type":"integer","minimum":0},"diagnostics":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["source_file_diagnostic","source_agent_discovery_error","source_trigger_discovery_error"]},"source_kind":{"type":"string","enum":["agent","prompt","tool","task","workflow","resource","skill","eval","schedule","webhook"]},"source_path":{"type":"string","minLength":1},"source_id":{"type":"string","minLength":1},"code":{"type":"string","enum":["parse_error","invalid_definition","dynamic_definition","duplicate_source_id","unsupported_target","manual_conflict"]},"message":{"type":"string","minLength":1},"details":{"type":"object","additionalProperties":{}}},"required":["kind","source_kind","source_path","code","message"]},"maxItems":5}},"required":["kind","status","diagnostic_count","diagnostics"]},"description":"Discovery coverage for the requested kinds at the selected source target."},"source_selection":{"type":"object","properties":{"project_id":{"type":"string","minLength":1,"description":"Resolved project ID for this authorized lookup."},"source_target_kind":{"type":"string","enum":["project","main_branch","environment","preview_branch"]},"target_environment_id":{"type":["string","null"]},"target_branch_id":{"type":["string","null"]}},"required":["project_id","source_target_kind","target_environment_id","target_branch_id"]}},"required":["data","total_matches","page_info","resolution","coverage","source_selection"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Agent Capabilities","x-canonical-documentation":{"domain":"agents","resource":"Agents","subgroup":"Agent Capabilities","name":"Search project definitions","description":"Search project source definitions by ID or display name.","operationId":"searchProjectDefinitions"}}},"/projects/{project_reference}/capabilities":{"get":{"operationId":"getProjectCapabilities","tags":["agents/Agents/Agent Capabilities"],"summary":"Get capabilities","description":"Get project capabilities. Requires project.agents.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":["string","null"],"enum":["main_branch","environment","preview_branch",null]},"required":false,"name":"runtime_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_environment_id","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"},{"schema":{"type":"string","enum":["project","main_branch","environment","preview_branch"]},"required":false,"name":"source_target_kind","in":"query"}],"responses":{"200":{"description":"Resolved project capabilities","content":{"application/json":{"schema":{"type":"object","properties":{"resolved_capabilities":{"type":"object","properties":{"source_target":{"type":"object","properties":{"kind":{"type":"string","enum":["project","main_branch","environment","preview_branch"]},"target_environment_id":{"type":["string","null"],"format":"uuid"},"target_branch_id":{"type":["string","null"],"format":"uuid"}},"required":["kind","target_environment_id","target_branch_id"]},"runtime_target":{"type":"object","properties":{"kind":{"type":["string","null"],"enum":["main_branch","environment","preview_branch",null]},"target_environment_id":{"type":["string","null"],"format":"uuid"},"target_branch_id":{"type":["string","null"],"format":"uuid"}},"required":["kind","target_environment_id","target_branch_id"]},"skills":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["project"]},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"source_path":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]},"allowed_tools":{"type":"array","items":{"type":"string"}}},"required":["type","id","name","description","source_path","edit_mode"],"title":"ProjectSkill"},{"type":"object","properties":{"type":{"type":"string","enum":["agent"]},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"examples":{"type":"array","items":{"type":"string"}}},"required":["type","id","name"],"title":"AgentSkill"}]},"description":"Skills available in the selected project source, with advertised agent card skills when reading an agent. This is not the inventory of loaded run skills."},"tools":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["control_plane"]},"name":{"type":"string"},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{}}},"required":["type","name"],"title":"ControlPlaneTool"},{"type":"object","properties":{"type":{"type":"string","enum":["integration"]},"name":{"type":"string"},"description":{"type":"string"},"input_schema":{"type":"object","additionalProperties":{}}},"required":["type","name","description","input_schema"],"title":"IntegrationTool"},{"type":"object","properties":{"type":{"type":"string","enum":["project"]},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"source_path":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]},"input_schema":{"type":["object","null"],"additionalProperties":{}}},"required":["type","id","name","source_path","edit_mode"],"title":"ProjectTool"}]},"description":"Available tool catalog for project capabilities. For agent capabilities, selected catalog tools only, excluding framework helper inventory; tool_selection reports the recovered authored selector. This does not verify run execution access."},"integrations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tool_names":{"type":"array","items":{"type":"string"}}},"required":["id","name","tool_names"]},"description":"Available integration groups for project capabilities; groups of selected available tools for agent capabilities. Read tool_resolution for blocked or missing selections."},"tool_resolution":{"type":"array","items":{"type":"object","properties":{"tool_name":{"type":"string"},"source_selected":{"type":"boolean"},"catalog_available":{"type":"boolean"},"catalog_state":{"type":"string","enum":["available","removed"]},"effective_authorization":{"type":"string","enum":["authorized","restricted_by_policy","catalog_unavailable"]},"policy":{"type":"object","properties":{"state":{"type":"string","enum":["absent","allowed","restricted"]},"scope":{"type":"string","enum":["project","user"]},"allowed_tools":{"type":["array","null"],"items":{"type":"string"}},"execution_mode":{"type":"string","enum":["real","mock"]}},"required":["state","scope","allowed_tools","execution_mode"]},"credential_requirement":{"type":"object","properties":{"mode":{"type":"string","enum":["oauth_connection","project_credentials","none"]},"managed_oauth":{"type":"boolean"},"byo_oauth_app_override":{"type":"object","properties":{"supported":{"type":"boolean"},"required":{"type":"boolean"},"client_id_env_var":{"type":["string","null"]},"client_secret_env_var":{"type":["string","null"]}},"required":["supported","required","client_id_env_var","client_secret_env_var"]},"mandatory_env_vars":{"type":"array","items":{"type":"string"}}},"required":["mode","managed_oauth","byo_oauth_app_override","mandatory_env_vars"]},"connection_readiness":{"type":"object","properties":{"status":{"type":"string","enum":["ready","required","not_applicable","unknown"]},"scope":{"type":["string","null"],"enum":["project","user",null]},"connected_count":{"type":["integer","null"],"minimum":0}},"required":["status","scope","connected_count"]}},"required":["tool_name","source_selected","catalog_available","catalog_state","effective_authorization","policy","credential_requirement","connection_readiness"]}},"tool_access":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"freshness":{"type":"object","properties":{"resolved_at":{"type":"string","format":"date-time"},"valid_for_ms":{"type":"integer","exclusiveMinimum":0},"fail_closed_on_expiry":{"type":"boolean","enum":[true]}},"required":["resolved_at","valid_for_ms","fail_closed_on_expiry"]},"inputs":{"type":"object","properties":{"capabilities":{"type":"array","items":{"type":"string","enum":["project.read","project.settings.manage","project.delete","project.members.read","project.members.manage","project.invites.read","project.invites.manage","project.files.read","project.files.write","project.realtime.connect","project.realtime.write","project.files.admin","project.uploads.read","project.uploads.write","project.uploads.admin","project.knowledge.read","project.knowledge.write","project.releases.read","project.releases.write","project.deployments.read","project.deployments.write","project.deploy.execute","project.runtime.manage","project.channels.read","project.channels.write","project.sandboxes.manage","project.domains.write","project.environments.manage","project.env_vars.write","project.runs.read","project.runs.write","project.runs.admin","project.agents.read","project.agents.write","project.evals.read","project.evals.write","project.evals.run","project.conversations.read","project.conversations.write","project.conversations.create","project.integrations.read","project.integrations.connect","project.integrations.configure","project.api_keys.read","project.api_keys.manage","project.cache.read","project.cache.write","project.logs.read","project.metrics.read","project.resources.read"]}},"billing":{"type":"object","properties":{"collaboration_allowed":{"type":"boolean"},"can_invite":{"type":"boolean"}},"required":["collaboration_allowed","can_invite"]},"entitlements":{"type":"object","properties":{"dedicated_runtime":{"type":"boolean"},"custom_domains":{"type":"boolean"},"export_apps":{"type":"boolean"}},"required":["dedicated_runtime","custom_domains","export_apps"]}},"required":["capabilities","billing","entitlements"]},"families":{"type":"array","items":{"type":"object","properties":{"family":{"type":"string","enum":["collaboration","runtime","domains","export"]},"default_decision":{"type":"object","properties":{"visibility":{"type":"string","enum":["visible","hidden"]},"reason_code":{"type":"string","enum":["allowed","missing_capability","billing_plan_restriction","billing_seat_limit","target_not_supported","resource_state_restriction","policy_exception","unknown"]},"message":{"type":"string"}},"required":["visibility","reason_code"]},"action_overrides":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["create_invite","delete_member","create_server","delete_server","create_domain","download_release"]},"decision":{"type":"object","properties":{"visibility":{"type":"string","enum":["visible","hidden"]},"reason_code":{"type":"string","enum":["allowed","missing_capability","billing_plan_restriction","billing_seat_limit","target_not_supported","resource_state_restriction","policy_exception","unknown"]},"message":{"type":"string"}},"required":["visibility","reason_code"]}},"required":["action","decision"]}}},"required":["family","default_decision","action_overrides"]}}},"required":["version","freshness","inputs","families"],"description":"Requesting-principal policy for catalog visibility, not the agent tool selection or execution grants."},"prompts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"source_path":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]}},"required":["id","name","source_path","edit_mode"]}},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"target":{"type":"string"},"source_path":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]},"version":{"type":["string","null"]},"input_schema":{"type":["object","null"],"additionalProperties":{}},"output_schema":{"type":["object","null"],"additionalProperties":{}},"schedulable":{"type":"boolean"}},"required":["id","name","target","source_path","edit_mode","schedulable"]}},"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"target":{"type":"string"},"source_path":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]},"input_schema":{"type":["object","null"],"additionalProperties":{}},"output_schema":{"type":["object","null"],"additionalProperties":{}},"schedulable":{"type":"boolean"}},"required":["id","name","target","source_path","edit_mode","schedulable"]}},"diagnostics":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["source_file_diagnostic","source_agent_discovery_error","source_trigger_discovery_error"]},"source_kind":{"type":"string","enum":["agent","prompt","tool","task","workflow","resource","skill","eval","schedule","webhook"]},"source_path":{"type":"string","minLength":1},"source_id":{"type":"string","minLength":1},"code":{"type":"string","enum":["parse_error","invalid_definition","dynamic_definition","duplicate_source_id","unsupported_target","manual_conflict"]},"message":{"type":"string","minLength":1},"details":{"type":"object","additionalProperties":{}}},"required":["kind","source_kind","source_path","code","message"]}},"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"],"description":"Public agent summary. Saved system instructions are in the agent source document (get_agent_source)."},"provider":{"type":"object","properties":{"organization":{"type":"string"},"url":{"type":"string"}},"required":["organization","url"]},"version":{"type":"string"},"capabilities":{"type":"object","properties":{"streaming":{"type":"boolean"},"push_notifications":{"type":"boolean"},"extensions":{"type":"array","items":{"type":"string"}}},"required":["streaming","push_notifications","extensions"]},"default_input_modes":{"type":"array","items":{"type":"string"}},"default_output_modes":{"type":"array","items":{"type":"string"}},"tools":{"type":"array","items":{"type":"string"},"description":"Source-selected tools summarized by the card as exact tool IDs. An empty array does not establish that tools are disabled. Read saved configuration from the agent source document and source-selected tools and integration readiness from agent capabilities; neither verifies execution grants."},"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"examples":{"type":"array","items":{"type":"string"}}},"required":["id","name"]}},"suggestions":{"type":"array","items":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"title":{"type":"string","minLength":1},"prompt":{"type":"string","minLength":1}},"required":["title","prompt"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["source_project_agent","installed_project_agent"]},"can_run":{"type":"boolean","description":"Whether the card supports invocation. When false, inspect runtime_readiness.status and runtime_readiness.reason before starting a run. True does not prove live runtime readiness, model availability, or execution authorization. These are checked when a run starts."},"source_type":{"type":"string","enum":["project","catalog_install"]},"installed_access":{"type":"object","properties":{"grant_id":{"type":"string","format":"uuid"},"relation":{"type":"string","enum":["owner","admin","editor","viewer"]},"service_account_id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"status":{"type":"string"}},"required":["grant_id","relation","service_account_id","project_id","status"]},"runtime_readiness":{"type":"object","properties":{"status":{"type":"string","enum":["ready","offline","not_applicable","unknown"]},"reason":{"type":["string","null"]},"runtime_target_kind":{"type":["string","null"],"enum":["registered_push_service","pull_worker",null]},"runtime_service_key":{"type":["string","null"]}},"required":["status","reason","runtime_target_kind","runtime_service_key"],"description":"Readiness of a registered push or pull runtime service, when one applies. For a source agent, not_applicable means this service check does not apply; it does not mean the agent cannot run. This field does not verify model availability or execution access."},"source_path":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]},"avatar_url":{"type":["string","null"],"description":"This agent's avatar: an http(s) URL, or a root-relative path served from the project. Null when no custom avatar has been set."},"model":{"type":["string","null"],"description":"Model identifier exposed by the agent card. Null does not mean a model is required or identify the model a run will use. Model selection and availability are checked at run admission."},"url":{"type":"string","description":"URL of the agent."}},"required":["id","name","description","provider","version","capabilities","default_input_modes","default_output_modes","tools","skills","kind","can_run","source_type","source_path","edit_mode","model","url"]}}},"required":["source_target","runtime_target","skills","tools","integrations","tool_access","prompts","workflows","tasks","agents"]}},"required":["resolved_capabilities"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Agent Capabilities","x-canonical-documentation":{"domain":"agents","resource":"Agents","subgroup":"Agent Capabilities","name":"Get capabilities","description":"Get project capabilities. Requires project.agents.read.","operationId":"getProjectCapabilities"}}},"/projects/{project_reference}/agents/{agent_id}/install":{"post":{"operationId":"installAgent","tags":["agents/Agents/Agent Installation"],"summary":"Install agent","description":"Install agent. Requires project.agents.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Catalog agent identifier"},"required":true,"description":"Catalog agent identifier.","name":"agent_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"relation":{"type":"string","enum":["owner","admin","editor","viewer"],"default":"editor","description":"Relation of the agent access grant that installs the catalog agent. Installing creates or reuses an access grant; the agent is not copied."}}}}}},"responses":{"200":{"description":"Existing installed agent card","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"],"description":"Public agent summary. Saved system instructions are in the agent source document (get_agent_source)."},"provider":{"type":"object","properties":{"organization":{"type":"string"},"url":{"type":"string"}},"required":["organization","url"]},"version":{"type":"string"},"capabilities":{"type":"object","properties":{"streaming":{"type":"boolean"},"push_notifications":{"type":"boolean"},"extensions":{"type":"array","items":{"type":"string"}}},"required":["streaming","push_notifications","extensions"]},"default_input_modes":{"type":"array","items":{"type":"string"}},"default_output_modes":{"type":"array","items":{"type":"string"}},"tools":{"type":"array","items":{"type":"string"},"description":"Source-selected tools summarized by the card as exact tool IDs. An empty array does not establish that tools are disabled. Read saved configuration from the agent source document and source-selected tools and integration readiness from agent capabilities; neither verifies execution grants."},"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"examples":{"type":"array","items":{"type":"string"}}},"required":["id","name"]}},"suggestions":{"type":"array","items":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"title":{"type":"string","minLength":1},"prompt":{"type":"string","minLength":1}},"required":["title","prompt"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["source_project_agent","installed_project_agent"]},"can_run":{"type":"boolean","description":"Whether the card supports invocation. When false, inspect runtime_readiness.status and runtime_readiness.reason before starting a run. True does not prove live runtime readiness, model availability, or execution authorization. These are checked when a run starts."},"source_type":{"type":"string","enum":["project","catalog_install"]},"installed_access":{"type":"object","properties":{"grant_id":{"type":"string","format":"uuid"},"relation":{"type":"string","enum":["owner","admin","editor","viewer"]},"service_account_id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"status":{"type":"string"}},"required":["grant_id","relation","service_account_id","project_id","status"]},"runtime_readiness":{"type":"object","properties":{"status":{"type":"string","enum":["ready","offline","not_applicable","unknown"]},"reason":{"type":["string","null"]},"runtime_target_kind":{"type":["string","null"],"enum":["registered_push_service","pull_worker",null]},"runtime_service_key":{"type":["string","null"]}},"required":["status","reason","runtime_target_kind","runtime_service_key"],"description":"Readiness of a registered push or pull runtime service, when one applies. For a source agent, not_applicable means this service check does not apply; it does not mean the agent cannot run. This field does not verify model availability or execution access."},"source_path":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]},"avatar_url":{"type":["string","null"],"description":"This agent's avatar: an http(s) URL, or a root-relative path served from the project. Null when no custom avatar has been set."},"model":{"type":["string","null"],"description":"Model identifier exposed by the agent card. Null does not mean a model is required or identify the model a run will use. Model selection and availability are checked at run admission."},"url":{"type":"string","description":"URL of the agent."}},"required":["id","name","description","provider","version","capabilities","default_input_modes","default_output_modes","tools","skills","kind","can_run","source_type","source_path","edit_mode","model","url"]}}}},"201":{"description":"Installed agent card","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"],"description":"Public agent summary. Saved system instructions are in the agent source document (get_agent_source)."},"provider":{"type":"object","properties":{"organization":{"type":"string"},"url":{"type":"string"}},"required":["organization","url"]},"version":{"type":"string"},"capabilities":{"type":"object","properties":{"streaming":{"type":"boolean"},"push_notifications":{"type":"boolean"},"extensions":{"type":"array","items":{"type":"string"}}},"required":["streaming","push_notifications","extensions"]},"default_input_modes":{"type":"array","items":{"type":"string"}},"default_output_modes":{"type":"array","items":{"type":"string"}},"tools":{"type":"array","items":{"type":"string"},"description":"Source-selected tools summarized by the card as exact tool IDs. An empty array does not establish that tools are disabled. Read saved configuration from the agent source document and source-selected tools and integration readiness from agent capabilities; neither verifies execution grants."},"skills":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"examples":{"type":"array","items":{"type":"string"}}},"required":["id","name"]}},"suggestions":{"type":"array","items":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"title":{"type":"string","minLength":1},"prompt":{"type":"string","minLength":1}},"required":["title","prompt"],"additionalProperties":false}]}},"kind":{"type":"string","enum":["source_project_agent","installed_project_agent"]},"can_run":{"type":"boolean","description":"Whether the card supports invocation. When false, inspect runtime_readiness.status and runtime_readiness.reason before starting a run. True does not prove live runtime readiness, model availability, or execution authorization. These are checked when a run starts."},"source_type":{"type":"string","enum":["project","catalog_install"]},"installed_access":{"type":"object","properties":{"grant_id":{"type":"string","format":"uuid"},"relation":{"type":"string","enum":["owner","admin","editor","viewer"]},"service_account_id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"status":{"type":"string"}},"required":["grant_id","relation","service_account_id","project_id","status"]},"runtime_readiness":{"type":"object","properties":{"status":{"type":"string","enum":["ready","offline","not_applicable","unknown"]},"reason":{"type":["string","null"]},"runtime_target_kind":{"type":["string","null"],"enum":["registered_push_service","pull_worker",null]},"runtime_service_key":{"type":["string","null"]}},"required":["status","reason","runtime_target_kind","runtime_service_key"],"description":"Readiness of a registered push or pull runtime service, when one applies. For a source agent, not_applicable means this service check does not apply; it does not mean the agent cannot run. This field does not verify model availability or execution access."},"source_path":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]},"avatar_url":{"type":["string","null"],"description":"This agent's avatar: an http(s) URL, or a root-relative path served from the project. Null when no custom avatar has been set."},"model":{"type":["string","null"],"description":"Model identifier exposed by the agent card. Null does not mean a model is required or identify the model a run will use. Model selection and availability are checked at run admission."},"url":{"type":"string","description":"URL of the agent."}},"required":["id","name","description","provider","version","capabilities","default_input_modes","default_output_modes","tools","skills","kind","can_run","source_type","source_path","edit_mode","model","url"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Agent Installation","x-canonical-documentation":{"domain":"agents","resource":"Agents","subgroup":"Agent Installation","name":"Install agent","description":"Install agent. Requires project.agents.write.","operationId":"installAgent"}},"delete":{"operationId":"uninstallAgent","tags":["agents/Agents/Agent Installation"],"summary":"Uninstall agent","description":"Uninstall agent. Requires project.agents.write; API keys also need delete scope.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Catalog agent identifier"},"required":true,"name":"agent_id","in":"path"}],"responses":{"200":{"description":"Installed agent grant revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Agent Installation","x-canonical-documentation":{"domain":"agents","resource":"Agents","subgroup":"Agent Installation","name":"Uninstall agent","description":"Uninstall agent. Requires project.agents.write; API keys also need delete scope.","operationId":"uninstallAgent"}}},"/projects/{project_reference}/agents/{agent_id}/install-selected":{"post":{"operationId":"installAgentForProjects","tags":["agents/Agents/Agent Installation"],"summary":"Install agents","description":"Install agent in projects. Requires project.agents.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Catalog agent identifier"},"required":true,"description":"Catalog agent identifier.","name":"agent_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"relation":{"type":"string","enum":["owner","admin","editor","viewer"],"default":"editor","description":"Relation of each agent access grant. The selection expands into one explicit grant per project; the agent is not copied."},"selected_project_references":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"selected_project_ids":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100}}}}}},"responses":{"200":{"description":"Existing installed agent cards","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCardList"}}}},"201":{"description":"Installed agent cards","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCardList"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Agent Installation","x-canonical-documentation":{"domain":"agents","resource":"Agents","subgroup":"Agent Installation","name":"Install agents","description":"Install agent in projects. Requires project.agents.write.","operationId":"installAgentForProjects"}}},"/projects/{project_reference}/prompts":{"get":{"operationId":"listPrompts","tags":["agents/Prompts/Project prompts"],"summary":"List prompts","description":"List the prompts defined in the source of a project, a branch or an environment to find one to use or edit; returns every prompt with the source files that could not be read as prompts. Requires project.agents.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","enum":["project","main_branch","environment","preview_branch"],"description":"Source to read prompts from: project, main_branch, environment or preview_branch. Falls back to runtime_target_kind when omitted."},"required":false,"description":"Source to read prompts from: project, main_branch, environment or preview_branch. Falls back to runtime_target_kind when omitted.","name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"enum":["main_branch","environment","preview_branch",null],"description":"Runtime target to read from when source_target_kind is omitted: main_branch, environment or preview_branch."},"required":false,"description":"Runtime target to read from when source_target_kind is omitted: main_branch, environment or preview_branch.","name":"runtime_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Environment to use. Required for the environment target; rejected for any other target."},"required":false,"description":"Environment to use. Required for the environment target; rejected for any other target.","name":"target_environment_id","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Preview branch to use. Required for the preview_branch target; rejected for any other target."},"required":false,"description":"Preview branch to use. Required for the preview_branch target; rejected for any other target.","name":"target_branch_id","in":"query"}],"responses":{"200":{"description":"Discovered project prompts","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"source_path":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]}},"required":["id","name","description","source_path","edit_mode"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["source_file_diagnostic","source_agent_discovery_error","source_trigger_discovery_error"]},"source_kind":{"type":"string","enum":["agent","prompt","tool","task","workflow","resource","skill","eval","schedule","webhook"]},"source_path":{"type":"string","minLength":1},"source_id":{"type":["string","null"],"minLength":1},"code":{"type":"string","enum":["parse_error","invalid_definition","dynamic_definition","duplicate_source_id","unsupported_target","manual_conflict"]},"message":{"type":"string","minLength":1},"details":{"type":["object","null"],"additionalProperties":{}}},"required":["kind","source_kind","source_path","code","message"]},"description":"Prompt source files that could not be read. REST omits it when there are none."}},"required":["data","page_info"]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}}},"x-documentation-source-tag":"Project prompts","x-canonical-documentation":{"domain":"agents","resource":"Prompts","subgroup":"Project prompts","name":"List prompts","description":"List the prompts defined in the source of a project, a branch or an environment to find one to use or edit; returns every prompt with the source files that could not be read as prompts. Requires project.agents.read.","operationId":"listPrompts"}},"post":{"operationId":"createPrompt","tags":["agents/Prompts/Project prompts"],"summary":"Create prompt","description":"Create a prompt source file in the project source or a preview branch so agents and clients can reuse its text; returns the prompt source document. Requires project.agents.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Where to write the prompt file: project (the default) or preview_branch. Other values are rejected."},"required":false,"description":"Where to write the prompt file: project (the default) or preview_branch. Other values are rejected.","name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Preview branch to use. Required for the preview_branch target; rejected for any other target."},"required":false,"description":"Preview branch to use. Required for the preview_branch target; rejected for any other target.","name":"target_branch_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-z0-9][a-z0-9-]*$","description":"Prompt id, also the name of its source file."},"description":{"type":["string","null"],"description":"Prompt description. Omit it or send null for none."},"content":{"type":"string","minLength":1,"description":"Prompt text."},"source":{"type":"string","minLength":1,"description":"Complete prompt source file. It must export a structured prompt whose id matches id; when omitted the file is generated from description and content."}},"required":["id","content"]}}}},"responses":{"201":{"description":"Created prompt document","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"content":{"type":["string","null"]},"source_path":{"type":"string"},"source":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]},"source_only_reasons":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","content","source_path","source","edit_mode","source_only_reasons"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}}},"x-documentation-source-tag":"Project prompts","x-canonical-documentation":{"domain":"agents","resource":"Prompts","subgroup":"Project prompts","name":"Create prompt","description":"Create a prompt source file in the project source or a preview branch so agents and clients can reuse its text; returns the prompt source document. Requires project.agents.write.","operationId":"createPrompt"}}},"/projects/{project_reference}/prompts/{prompt_id}":{"get":{"operationId":"getPrompt","tags":["agents/Prompts/Project prompts"],"summary":"Get prompt","description":"Read one prompt by its ID to inspect its name and description; returns the prompt. Requires project.agents.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Prompt identifier"},"required":true,"name":"prompt_id","in":"path"},{"schema":{"type":"string","enum":["project","main_branch","environment","preview_branch"],"description":"Source to read prompts from: project, main_branch, environment or preview_branch. Falls back to runtime_target_kind when omitted."},"required":false,"description":"Source to read prompts from: project, main_branch, environment or preview_branch. Falls back to runtime_target_kind when omitted.","name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"enum":["main_branch","environment","preview_branch",null],"description":"Runtime target to read from when source_target_kind is omitted: main_branch, environment or preview_branch."},"required":false,"description":"Runtime target to read from when source_target_kind is omitted: main_branch, environment or preview_branch.","name":"runtime_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Environment to use. Required for the environment target; rejected for any other target."},"required":false,"description":"Environment to use. Required for the environment target; rejected for any other target.","name":"target_environment_id","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Preview branch to use. Required for the preview_branch target; rejected for any other target."},"required":false,"description":"Preview branch to use. Required for the preview_branch target; rejected for any other target.","name":"target_branch_id","in":"query"}],"responses":{"200":{"description":"Discovered project prompt","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"source_path":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]}},"required":["id","name","description","source_path","edit_mode"]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}}},"x-documentation-source-tag":"Project prompts","x-canonical-documentation":{"domain":"agents","resource":"Prompts","subgroup":"Project prompts","name":"Get prompt","description":"Read one prompt by its ID to inspect its name and description; returns the prompt. Requires project.agents.read.","operationId":"getPrompt"}},"put":{"operationId":"updatePrompt","tags":["agents/Prompts/Project prompts"],"summary":"Update prompt","description":"Replace the content and description of a structured prompt, where REST and GraphQL clear an omitted description and the MCP tool keeps it; returns the updated prompt source document. Requires project.agents.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Prompt identifier"},"required":true,"name":"prompt_id","in":"path"},{"schema":{"type":"string","description":"Where to write the prompt file: project (the default) or preview_branch. Other values are rejected."},"required":false,"description":"Where to write the prompt file: project (the default) or preview_branch. Other values are rejected.","name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Preview branch to use. Required for the preview_branch target; rejected for any other target."},"required":false,"description":"Preview branch to use. Required for the preview_branch target; rejected for any other target.","name":"target_branch_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":["string","null"],"description":"Prompt description. Null clears it. When omitted, REST and GraphQL clear it and the MCP tool keeps the current one."},"content":{"type":"string","minLength":1,"description":"Prompt text."}},"required":["content"]}}}},"responses":{"200":{"description":"Updated prompt document","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"content":{"type":["string","null"]},"source_path":{"type":"string"},"source":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]},"source_only_reasons":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","content","source_path","source","edit_mode","source_only_reasons"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}}},"x-documentation-source-tag":"Project prompts","x-canonical-documentation":{"domain":"agents","resource":"Prompts","subgroup":"Project prompts","name":"Update prompt","description":"Replace the content and description of a structured prompt, where REST and GraphQL clear an omitted description and the MCP tool keeps it; returns the updated prompt source document. Requires project.agents.write.","operationId":"updatePrompt"}},"delete":{"operationId":"deletePrompt","tags":["agents/Prompts/Project prompts"],"summary":"Delete prompt","description":"Delete the source file of a prompt that is no longer needed; returns an acknowledgement. Requires project.agents.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","minLength":1,"description":"Prompt identifier"},"required":true,"description":"Prompt identifier","name":"prompt_id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"}],"responses":{"200":{"description":"Prompt deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"403":{"description":"Forbidden. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}}},"x-documentation-source-tag":"Project prompts","x-canonical-documentation":{"domain":"agents","resource":"Prompts","subgroup":"Project prompts","name":"Delete prompt","description":"Delete the source file of a prompt that is no longer needed; returns an acknowledgement. Requires project.agents.write.","operationId":"deletePrompt"}}},"/projects/{project_reference}/prompts/{prompt_id}/source":{"get":{"operationId":"readPromptSource","tags":["agents/Prompts/Project prompts"],"summary":"Read prompt source","description":"Read the editable source behind one prompt before changing it; returns the prompt with its content, source text, edit mode and the reasons it can only be edited as source. Requires project.agents.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Prompt identifier"},"required":true,"name":"prompt_id","in":"path"},{"schema":{"type":"string","description":"Source to read the prompt file from: project or preview_branch. Falls back to runtime_target_kind when omitted."},"required":false,"description":"Source to read the prompt file from: project or preview_branch. Falls back to runtime_target_kind when omitted.","name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"enum":["main_branch","environment","preview_branch",null],"description":"Used as the source target kind when source_target_kind is omitted."},"required":false,"description":"Used as the source target kind when source_target_kind is omitted.","name":"runtime_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Not supported for source reads; a non-null value is rejected."},"required":false,"description":"Not supported for source reads; a non-null value is rejected.","name":"target_environment_id","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Preview branch to use. Required for the preview_branch target; rejected for any other target."},"required":false,"description":"Preview branch to use. Required for the preview_branch target; rejected for any other target.","name":"target_branch_id","in":"query"}],"responses":{"200":{"description":"Prompt document","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"content":{"type":["string","null"]},"source_path":{"type":"string"},"source":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]},"source_only_reasons":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","content","source_path","source","edit_mode","source_only_reasons"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}}},"x-documentation-source-tag":"Project prompts","x-canonical-documentation":{"domain":"agents","resource":"Prompts","subgroup":"Project prompts","name":"Read prompt source","description":"Read the editable source behind one prompt before changing it; returns the prompt with its content, source text, edit mode and the reasons it can only be edited as source. Requires project.agents.read.","operationId":"readPromptSource"}}},"/projects/{project_reference}/tools":{"get":{"operationId":"listTools","tags":["agents/Tools/Project tools"],"summary":"List tools","description":"List tools. Requires project.agents.read.","parameters":[{"schema":{"type":"string","description":"Project ID, slug, or domain whose source-defined tool metadata is returned, not the host executable platform or integration tool catalog. An empty list does not mean the host has no callable tools."},"required":true,"description":"Project ID, slug, or domain whose source-defined tool metadata is returned, not the host executable platform or integration tool catalog. An empty list does not mean the host has no callable tools.","name":"project_reference","in":"path"},{"schema":{"type":["string","null"],"enum":["main_branch","environment","preview_branch",null]},"required":false,"name":"runtime_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_environment_id","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"},{"schema":{"type":"string","enum":["project","main_branch","environment","preview_branch"]},"required":false,"name":"source_target_kind","in":"query"}],"responses":{"200":{"description":"Discovered project tools","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"source_path":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]},"input_schema":{"type":["object","null"],"additionalProperties":{}},"output_schema":{"type":["object","null"],"additionalProperties":{}}},"required":["id","name","description","source_path","edit_mode","input_schema","output_schema"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["source_file_diagnostic","source_agent_discovery_error","source_trigger_discovery_error"]},"source_kind":{"type":"string","enum":["agent","prompt","tool","task","workflow","resource","skill","eval","schedule","webhook"]},"source_path":{"type":"string","minLength":1},"source_id":{"type":"string","minLength":1},"code":{"type":"string","enum":["parse_error","invalid_definition","dynamic_definition","duplicate_source_id","unsupported_target","manual_conflict"]},"message":{"type":"string","minLength":1},"details":{"type":"object","additionalProperties":{}}},"required":["kind","source_kind","source_path","code","message"]},"description":"Source files that could not be read as tools. REST omits it when there are none."}},"required":["data","page_info"]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ToolProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ToolProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ToolProblem"}}}}},"x-documentation-source-tag":"Project tools","x-canonical-documentation":{"domain":"agents","resource":"Tools","subgroup":"Project tools","name":"List tools","description":"List tools. Requires project.agents.read.","operationId":"listTools"}},"post":{"operationId":"createTool","tags":["agents/Tools/Project tools"],"summary":"Create tool","description":"Create a project tool source file in the project source or a preview branch so project agents can call it; returns the tool source document. Requires project.agents.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string"},"required":false,"name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-z0-9][a-z0-9-]*$","description":"Tool ID, a lowercase slug; it also names the tool source file."},"description":{"type":["string","null"],"description":"Tool description. Null leaves it empty. On update, REST and GraphQL clear an omitted description and the MCP tool keeps the current one."},"source":{"type":"string","minLength":1,"description":"Complete TypeScript source of the tool file. When set it is written as-is and description is ignored."}},"required":["id"]}}}},"responses":{"201":{"description":"Created tool document","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"source_path":{"type":"string"},"source":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]},"source_only_reasons":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","source_path","source","edit_mode","source_only_reasons"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ToolProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ToolProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ToolProblem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ToolProblem"}}}}},"x-documentation-source-tag":"Project tools","x-canonical-documentation":{"domain":"agents","resource":"Tools","subgroup":"Project tools","name":"Create tool","description":"Create a project tool source file in the project source or a preview branch so project agents can call it; returns the tool source document. Requires project.agents.write.","operationId":"createTool"}}},"/projects/{project_reference}/tools/{tool_id}":{"get":{"operationId":"getTool","tags":["agents/Tools/Project tools"],"summary":"Get tool","description":"Read one project tool by its ID to inspect its input and output schemas; returns the tool. Requires project.agents.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Project-defined tool ID returned by list_tools. This lookup does not load a host executable tool contract."},"required":true,"description":"Project-defined tool ID returned by list_tools. This lookup does not load a host executable tool contract.","name":"tool_id","in":"path"},{"schema":{"type":["string","null"],"enum":["main_branch","environment","preview_branch",null]},"required":false,"name":"runtime_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_environment_id","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"},{"schema":{"type":"string","enum":["project","main_branch","environment","preview_branch"]},"required":false,"name":"source_target_kind","in":"query"}],"responses":{"200":{"description":"Discovered project tool","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"source_path":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]},"input_schema":{"type":["object","null"],"additionalProperties":{}},"output_schema":{"type":["object","null"],"additionalProperties":{}}},"required":["id","name","description","source_path","edit_mode","input_schema","output_schema"]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ToolProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ToolProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ToolProblem"}}}}},"x-documentation-source-tag":"Project tools","x-canonical-documentation":{"domain":"agents","resource":"Tools","subgroup":"Project tools","name":"Get tool","description":"Read one project tool by its ID to inspect its input and output schemas; returns the tool. Requires project.agents.read.","operationId":"getTool"}},"put":{"operationId":"updateTool","tags":["agents/Tools/Project tools"],"summary":"Update tool","description":"Replace the description of a structured project tool, where REST and GraphQL clear an omitted description and the MCP tool keeps it; returns the updated tool source document. Requires project.agents.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Project-defined tool ID returned by list_tools. This lookup does not load a host executable tool contract."},"required":true,"description":"Project-defined tool ID returned by list_tools. This lookup does not load a host executable tool contract.","name":"tool_id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":["string","null"],"description":"Tool description. Null leaves it empty. On update, REST and GraphQL clear an omitted description and the MCP tool keeps the current one."},"source":{"type":"string","minLength":1,"description":"Complete TypeScript source of the tool file. When set it is written as-is and description is ignored."}}}}}},"responses":{"200":{"description":"Updated tool document","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"source_path":{"type":"string"},"source":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]},"source_only_reasons":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","source_path","source","edit_mode","source_only_reasons"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ToolProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ToolProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ToolProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ToolProblem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ToolProblem"}}}}},"x-documentation-source-tag":"Project tools","x-canonical-documentation":{"domain":"agents","resource":"Tools","subgroup":"Project tools","name":"Update tool","description":"Replace the description of a structured project tool, where REST and GraphQL clear an omitted description and the MCP tool keeps it; returns the updated tool source document. Requires project.agents.write.","operationId":"updateTool"}},"delete":{"operationId":"deleteTool","tags":["agents/Tools/Project tools"],"summary":"Delete tool","description":"Delete the source file of a project tool that is no longer needed; returns an acknowledgement. Requires project.agents.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Project-defined tool ID returned by list_tools. This lookup does not load a host executable tool contract."},"required":true,"description":"Project-defined tool ID returned by list_tools. This lookup does not load a host executable tool contract.","name":"tool_id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"}],"responses":{"200":{"description":"Tool deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ToolProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ToolProblem"}}}},"403":{"description":"Forbidden. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ToolProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ToolProblem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ToolProblem"}}}}},"x-documentation-source-tag":"Project tools","x-canonical-documentation":{"domain":"agents","resource":"Tools","subgroup":"Project tools","name":"Delete tool","description":"Delete the source file of a project tool that is no longer needed; returns an acknowledgement. Requires project.agents.write.","operationId":"deleteTool"}}},"/projects/{project_reference}/tools/{tool_id}/source":{"get":{"operationId":"readToolSource","tags":["agents/Tools/Project tools"],"summary":"Read tool source","description":"Read the editable source behind one project tool before changing it; returns the tool with its source text, edit mode and the reasons it can only be edited as source. Requires project.agents.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Project-defined tool ID returned by list_tools. This lookup does not load a host executable tool contract."},"required":true,"description":"Project-defined tool ID returned by list_tools. This lookup does not load a host executable tool contract.","name":"tool_id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"}],"responses":{"200":{"description":"Tool document","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"source_path":{"type":"string"},"source":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]},"source_only_reasons":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","source_path","source","edit_mode","source_only_reasons"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ToolProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ToolProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ToolProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ToolProblem"}}}}},"x-documentation-source-tag":"Project tools","x-canonical-documentation":{"domain":"agents","resource":"Tools","subgroup":"Project tools","name":"Read tool source","description":"Read the editable source behind one project tool before changing it; returns the tool with its source text, edit mode and the reasons it can only be edited as source. Requires project.agents.read.","operationId":"readToolSource"}}},"/projects/{project_reference}/skills":{"get":{"operationId":"listSkills","tags":["agents/Skills/Project skills"],"summary":"List skills","description":"List the skills defined in the source of a project, a branch or an environment to find one to assign or edit; returns every skill with the source files that could not be read as skills. Requires project.agents.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":["string","null"],"enum":["main_branch","environment","preview_branch",null],"description":"Runtime target: main_branch, environment or preview_branch. Used as the source target kind when source_target_kind is omitted."},"required":false,"description":"Runtime target: main_branch, environment or preview_branch. Used as the source target kind when source_target_kind is omitted.","name":"runtime_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Environment UUID, for an environment target."},"required":false,"description":"Environment UUID, for an environment target.","name":"target_environment_id","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Preview branch UUID, for a preview_branch target."},"required":false,"description":"Preview branch UUID, for a preview_branch target.","name":"target_branch_id","in":"query"},{"schema":{"type":"string","enum":["project","main_branch","environment","preview_branch"],"description":"Source target: project, main_branch, environment or preview_branch. Must match runtime_target_kind when both are sent."},"required":false,"description":"Source target: project, main_branch, environment or preview_branch. Must match runtime_target_kind when both are sent.","name":"source_target_kind","in":"query"}],"responses":{"200":{"description":"Discovered project skills","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"source_path":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]},"allowed_tools":{"type":"array","items":{"type":"string"}},"owner_agent_id":{"type":"string"},"short_name":{"type":"string"}},"required":["id","name","description","source_path","edit_mode"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["source_file_diagnostic","source_agent_discovery_error","source_trigger_discovery_error"]},"source_kind":{"type":"string","enum":["agent","prompt","tool","task","workflow","resource","skill","eval","schedule","webhook"]},"source_path":{"type":"string","minLength":1},"source_id":{"type":"string","minLength":1},"code":{"type":"string","enum":["parse_error","invalid_definition","dynamic_definition","duplicate_source_id","unsupported_target","manual_conflict"]},"message":{"type":"string","minLength":1},"details":{"type":"object","additionalProperties":{}}},"required":["kind","source_kind","source_path","code","message"]},"description":"Source files that could not be read as skills. REST omits it when there are none."}},"required":["data","page_info"]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SkillProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SkillProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SkillProblem"}}}}},"x-documentation-source-tag":"Project skills","x-canonical-documentation":{"domain":"agents","resource":"Skills","subgroup":"Project skills","name":"List skills","description":"List the skills defined in the source of a project, a branch or an environment to find one to assign or edit; returns every skill with the source files that could not be read as skills. Requires project.agents.read.","operationId":"listSkills"}},"post":{"operationId":"createSkill","tags":["agents/Skills/Project skills"],"summary":"Create skill","description":"Create a skill, a SKILL.md file an agent loads on demand, in the project source or a preview branch; returns the skill source document. Requires project.agents.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string"},"required":false,"name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","description":"Canonical skill name, also used as the skill directory name. For example \"daily-changelog-flow\", not \"daily--changelog\". A skill cannot be renamed. There is no display_name field; put the human-readable label in description. Max 64 characters. Lowercase letters, numbers, and hyphens only. Must not start or end with a hyphen, and must not contain consecutive hyphens."},"description":{"type":"string","minLength":1,"maxLength":1024,"description":"Max 1024 characters. Non-empty. Describes what the skill does and when to use it."},"allowed_tools":{"type":"array","items":{"type":"string","minLength":1}},"instructions":{"type":"string","description":"Full markdown body of SKILL.md, meaning everything below the frontmatter, written verbatim with any markdown headings. Sending it replaces the whole body. The former sections object is rejected; put the whole skill here."},"source":{"type":"string","minLength":1}},"required":["name","description"]}}}},"responses":{"201":{"description":"Created project skill document","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectSkillDocument"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SkillProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SkillProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SkillProblem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SkillProblem"}}}}},"x-documentation-source-tag":"Project skills","x-canonical-documentation":{"domain":"agents","resource":"Skills","subgroup":"Project skills","name":"Create skill","description":"Create a skill, a SKILL.md file an agent loads on demand, in the project source or a preview branch; returns the skill source document. Requires project.agents.write.","operationId":"createSkill"}}},"/projects/{project_reference}/skills/{skill_id}":{"get":{"operationId":"getSkill","tags":["agents/Skills/Project skills"],"summary":"Get skill","description":"Read one skill by its ID to inspect its description and the tools it may call; returns the skill. Requires project.agents.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Skill identifier"},"required":true,"name":"skill_id","in":"path"},{"schema":{"type":["string","null"],"enum":["main_branch","environment","preview_branch",null],"description":"Runtime target: main_branch, environment or preview_branch. Used as the source target kind when source_target_kind is omitted."},"required":false,"description":"Runtime target: main_branch, environment or preview_branch. Used as the source target kind when source_target_kind is omitted.","name":"runtime_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Environment UUID, for an environment target."},"required":false,"description":"Environment UUID, for an environment target.","name":"target_environment_id","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Preview branch UUID, for a preview_branch target."},"required":false,"description":"Preview branch UUID, for a preview_branch target.","name":"target_branch_id","in":"query"},{"schema":{"type":"string","enum":["project","main_branch","environment","preview_branch"],"description":"Source target: project, main_branch, environment or preview_branch. Must match runtime_target_kind when both are sent."},"required":false,"description":"Source target: project, main_branch, environment or preview_branch. Must match runtime_target_kind when both are sent.","name":"source_target_kind","in":"query"}],"responses":{"200":{"description":"Discovered project skill","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"source_path":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]},"allowed_tools":{"type":"array","items":{"type":"string"}},"owner_agent_id":{"type":"string"},"short_name":{"type":"string"}},"required":["id","name","description","source_path","edit_mode"]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SkillProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SkillProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SkillProblem"}}}}},"x-documentation-source-tag":"Project skills","x-canonical-documentation":{"domain":"agents","resource":"Skills","subgroup":"Project skills","name":"Get skill","description":"Read one skill by its ID to inspect its description and the tools it may call; returns the skill. Requires project.agents.read.","operationId":"getSkill"}},"put":{"operationId":"updateSkill","tags":["agents/Skills/Project skills"],"summary":"Update skill","description":"Change the description, allowed tools or instructions of a structured skill, where omitted tools and instructions keep their values; returns the updated skill source document. Requires project.agents.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Skill identifier"},"required":true,"name":"skill_id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","description":"Canonical skill name, also used as the skill directory name. For example \"daily-changelog-flow\", not \"daily--changelog\". A skill cannot be renamed. There is no display_name field; put the human-readable label in description. Max 64 characters. Lowercase letters, numbers, and hyphens only. Must not start or end with a hyphen, and must not contain consecutive hyphens."},"description":{"type":"string","minLength":1,"maxLength":1024,"description":"Max 1024 characters. Non-empty. Describes what the skill does and when to use it."},"allowed_tools":{"type":"array","items":{"type":"string","minLength":1}},"instructions":{"type":"string","description":"Full markdown body of SKILL.md, meaning everything below the frontmatter, written verbatim with any markdown headings. Sending it replaces the whole body. The former sections object is rejected; put the whole skill here."},"source":{"type":"string","minLength":1}},"required":["description"]}}}},"responses":{"200":{"description":"Updated project skill document","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectSkillDocument"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SkillProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SkillProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SkillProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SkillProblem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SkillProblem"}}}}},"x-documentation-source-tag":"Project skills","x-canonical-documentation":{"domain":"agents","resource":"Skills","subgroup":"Project skills","name":"Update skill","description":"Change the description, allowed tools or instructions of a structured skill, where omitted tools and instructions keep their values; returns the updated skill source document. Requires project.agents.write.","operationId":"updateSkill"}},"delete":{"operationId":"deleteSkill","tags":["agents/Skills/Project skills"],"summary":"Delete skill","description":"Delete the source files of a skill that is no longer needed; returns an acknowledgement. Requires project.agents.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","minLength":1,"description":"Skill to delete. Source-only recovery files under the skill are deleted too."},"required":true,"description":"Skill to delete. Source-only recovery files under the skill are deleted too.","name":"skill_id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"}],"responses":{"200":{"description":"Deleted. Skill to delete. Source-only recovery files under the skill are deleted too.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SkillProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SkillProblem"}}}},"403":{"description":"Forbidden. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SkillProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SkillProblem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SkillProblem"}}}}},"x-documentation-source-tag":"Project skills","x-canonical-documentation":{"domain":"agents","resource":"Skills","subgroup":"Project skills","name":"Delete skill","description":"Delete the source files of a skill that is no longer needed; returns an acknowledgement. Requires project.agents.write.","operationId":"deleteSkill"}}},"/projects/{project_reference}/skills/{skill_id}/source":{"get":{"operationId":"readSkillSource","tags":["agents/Skills/Project skills"],"summary":"Read skill source","description":"Read the editable source behind one skill before changing it; returns the skill with its instructions, source text, edit mode and the reasons it can only be edited as source. Requires project.agents.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Skill identifier"},"required":true,"name":"skill_id","in":"path"},{"schema":{"type":["string","null"],"enum":["main_branch","environment","preview_branch",null],"description":"Used as the source target kind when source_target_kind is omitted."},"required":false,"description":"Used as the source target kind when source_target_kind is omitted.","name":"runtime_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Not supported for source reads; a non-null value is rejected."},"required":false,"description":"Not supported for source reads; a non-null value is rejected.","name":"target_environment_id","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Preview branch UUID, for a preview_branch target."},"required":false,"description":"Preview branch UUID, for a preview_branch target.","name":"target_branch_id","in":"query"},{"schema":{"type":"string","description":"Source target: project or preview_branch. Defaults to project."},"required":false,"description":"Source target: project or preview_branch. Defaults to project.","name":"source_target_kind","in":"query"}],"responses":{"200":{"description":"Project skill document","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectSkillDocument"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SkillProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SkillProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SkillProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SkillProblem"}}}}},"x-documentation-source-tag":"Project skills","x-canonical-documentation":{"domain":"agents","resource":"Skills","subgroup":"Project skills","name":"Read skill source","description":"Read the editable source behind one skill before changing it; returns the skill with its instructions, source text, edit mode and the reasons it can only be edited as source. Requires project.agents.read.","operationId":"readSkillSource"}}},"/projects/{project_reference}/resources":{"get":{"operationId":"listProjectResources","tags":["agents/Resources/Project resources"],"summary":"List project resources","description":"List the project resources defined in the source of a project, a branch or an environment to find one to read or edit; returns every project resource with the source files that could not be read. Requires project.resources.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":["string","null"],"enum":["main_branch","environment","preview_branch",null]},"required":false,"name":"runtime_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_environment_id","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"},{"schema":{"type":"string","enum":["project","main_branch","environment","preview_branch"]},"required":false,"name":"source_target_kind","in":"query"}],"responses":{"200":{"description":"Discovered project resources","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pattern":{"type":"string"},"description":{"type":"string"},"title":{"type":["string","null"]},"source_path":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]}},"required":["id","pattern","description","source_path","edit_mode"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["source_file_diagnostic","source_agent_discovery_error","source_trigger_discovery_error"]},"source_kind":{"type":"string","enum":["agent","prompt","tool","task","workflow","resource","skill","eval","schedule","webhook"]},"source_path":{"type":"string","minLength":1},"source_id":{"type":"string","minLength":1},"code":{"type":"string","enum":["parse_error","invalid_definition","dynamic_definition","duplicate_source_id","unsupported_target","manual_conflict"]},"message":{"type":"string","minLength":1},"details":{"type":"object","additionalProperties":{}}},"required":["kind","source_kind","source_path","code","message"]},"description":"Source files that could not be read as project resources. REST omits it when there are none."}},"required":["data","page_info"]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}}},"x-documentation-source-tag":"Project resources","x-canonical-documentation":{"domain":"agents","resource":"Resources","subgroup":"Project resources","name":"List project resources","description":"List the project resources defined in the source of a project, a branch or an environment to find one to read or edit; returns every project resource with the source files that could not be read. Requires project.resources.read.","operationId":"listProjectResources"}},"post":{"operationId":"createProjectResource","tags":["agents/Resources/Project resources"],"summary":"Create project resource","description":"Create a project resource, an MCP resource definition under resources/, in the project source or a preview branch; returns the project resource source document. Requires project.files.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string"},"required":false,"name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Resource ID, unique among the project resources."},"pattern":{"type":"string","minLength":1,"description":"URI pattern the resource answers, such as /users/:userId/profile."},"description":{"type":"string","minLength":1,"description":"What the resource returns."},"title":{"type":["string","null"],"description":"Display title. Omit it or send null for no title."}},"required":["id","pattern","description"]}}}},"responses":{"201":{"description":"Created resource document","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"pattern":{"type":"string"},"description":{"type":"string"},"title":{"type":["string","null"]},"source_path":{"type":"string"},"source":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]},"source_only_reasons":{"type":"array","items":{"type":"string"}}},"required":["id","pattern","description","title","source_path","source","edit_mode","source_only_reasons"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}}},"x-documentation-source-tag":"Project resources","x-canonical-documentation":{"domain":"agents","resource":"Resources","subgroup":"Project resources","name":"Create project resource","description":"Create a project resource, an MCP resource definition under resources/, in the project source or a preview branch; returns the project resource source document. Requires project.files.write.","operationId":"createProjectResource"}}},"/projects/{project_reference}/resources/{resource_id}":{"get":{"operationId":"getProjectResource","tags":["agents/Resources/Project resources"],"summary":"Get project resource","description":"Read one project resource by its ID to inspect its URI pattern, title and description; returns the project resource. Requires project.resources.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Resource ID from list_project_resources"},"required":true,"description":"Resource ID from list_project_resources","name":"resource_id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"}],"responses":{"200":{"description":"Project resource","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"pattern":{"type":"string"},"description":{"type":"string"},"title":{"type":["string","null"]},"source_path":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]}},"required":["id","pattern","description","title","source_path","edit_mode"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}}},"x-documentation-source-tag":"Project resources","x-canonical-documentation":{"domain":"agents","resource":"Resources","subgroup":"Project resources","name":"Get project resource","description":"Read one project resource by its ID to inspect its URI pattern, title and description; returns the project resource. Requires project.resources.read.","operationId":"getProjectResource"}},"put":{"operationId":"updateProjectResource","tags":["agents/Resources/Project resources"],"summary":"Update project resource","description":"Change the pattern, description or title of a structured project resource, where an omitted field keeps its value; returns the updated project resource source document. Requires project.files.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Resource identifier"},"required":true,"name":"resource_id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pattern":{"type":"string","minLength":1,"description":"New URI pattern. Omit it to keep the current pattern."},"description":{"type":"string","minLength":1,"description":"New description. Omit it to keep the current description."},"title":{"type":["string","null"],"description":"New display title. Omit it to keep the title; null clears it."}}}}}},"responses":{"200":{"description":"Updated resource document","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"pattern":{"type":"string"},"description":{"type":"string"},"title":{"type":["string","null"]},"source_path":{"type":"string"},"source":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]},"source_only_reasons":{"type":"array","items":{"type":"string"}}},"required":["id","pattern","description","title","source_path","source","edit_mode","source_only_reasons"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}}},"x-documentation-source-tag":"Project resources","x-canonical-documentation":{"domain":"agents","resource":"Resources","subgroup":"Project resources","name":"Update project resource","description":"Change the pattern, description or title of a structured project resource, where an omitted field keeps its value; returns the updated project resource source document. Requires project.files.write.","operationId":"updateProjectResource"}},"delete":{"operationId":"deleteProjectResource","tags":["agents/Resources/Project resources"],"summary":"Delete project resource","description":"Delete the source file of a project resource that is no longer needed; returns an acknowledgement. Requires project.files.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","minLength":1,"description":"Resource identifier"},"required":true,"name":"resource_id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"}],"responses":{"200":{"description":"Resource deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"403":{"description":"Forbidden. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}}},"x-documentation-source-tag":"Project resources","x-canonical-documentation":{"domain":"agents","resource":"Resources","subgroup":"Project resources","name":"Delete project resource","description":"Delete the source file of a project resource that is no longer needed; returns an acknowledgement. Requires project.files.write.","operationId":"deleteProjectResource"}}},"/projects/{project_reference}/resources/{resource_id}/source":{"get":{"operationId":"readProjectResourceSource","tags":["agents/Resources/Project resources"],"summary":"Read project resource source","description":"Read the editable source behind one project resource before changing it; returns the project resource with its source text, edit mode and the reasons it can only be edited as source. Requires project.resources.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Resource ID from list_project_resources"},"required":true,"description":"Resource ID from list_project_resources","name":"resource_id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"}],"responses":{"200":{"description":"Project resource source document","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"pattern":{"type":"string"},"description":{"type":"string"},"title":{"type":["string","null"]},"source_path":{"type":"string"},"source":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]},"source_only_reasons":{"type":"array","items":{"type":"string"}}},"required":["id","pattern","description","title","source_path","source","edit_mode","source_only_reasons"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project resources","x-canonical-documentation":{"domain":"agents","resource":"Resources","subgroup":"Project resources","name":"Read project resource source","description":"Read the editable source behind one project resource before changing it; returns the project resource with its source text, edit mode and the reasons it can only be edited as source. Requires project.resources.read.","operationId":"readProjectResourceSource"}}},"/projects/{project_reference}/tasks":{"get":{"operationId":"listTasks","tags":["agents/Tasks/Tasks"],"summary":"List tasks","description":"List the tasks defined in the source of a project, a branch or an environment to find a task to run, schedule or edit; returns every task as one page with the source files that could not be read as tasks. Requires project.runs.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","enum":["project","main_branch","environment","preview_branch"],"description":"Source to read: project, main_branch, environment or preview_branch. Overrides runtime_target_kind."},"required":false,"description":"Source to read: project, main_branch, environment or preview_branch. Overrides runtime_target_kind.","name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"enum":["main_branch","environment","preview_branch",null],"description":"Runtime target to read from: main_branch, environment or preview_branch."},"required":false,"description":"Runtime target to read from: main_branch, environment or preview_branch.","name":"runtime_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Environment to read from when the target kind is environment."},"required":false,"description":"Environment to read from when the target kind is environment.","name":"target_environment_id","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Preview branch to use when the target kind is preview_branch."},"required":false,"description":"Preview branch to use when the target kind is preview_branch.","name":"target_branch_id","in":"query"}],"responses":{"200":{"description":"Discovered project tasks","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Task identifier."},"name":{"type":"string","description":"Human-readable task name."},"description":{"type":["string","null"],"description":"Short description of what the task does."},"target":{"type":"string","description":"Execution target that implements the task."},"source_path":{"type":"string","description":"Source file path where the task definition lives."},"edit_mode":{"type":"string","enum":["structured","source_only"],"description":"Editing mode supported for the task definition; source_only definitions reject update_task with source_only_conflict."},"input_schema":{"type":["object","null"],"additionalProperties":{},"description":"Structured input schema for task execution, when defined."},"output_schema":{"type":["object","null"],"additionalProperties":{},"description":"Structured output schema for task execution, when defined."},"schedulable":{"type":"boolean","description":"Whether the task can be used from cron schedules or workflow schedulers."}},"required":["id","name","description","target","source_path","edit_mode","input_schema","output_schema","schedulable"],"description":"Task definition."},"description":"Task definitions returned for the project."},"page_info":{"$ref":"#/components/schemas/PageInfo"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["source_file_diagnostic","source_agent_discovery_error","source_trigger_discovery_error"]},"source_kind":{"type":"string","enum":["agent","prompt","tool","task","workflow","resource","skill","eval","schedule","webhook"]},"source_path":{"type":"string","minLength":1},"source_id":{"type":"string","minLength":1},"code":{"type":"string","enum":["parse_error","invalid_definition","dynamic_definition","duplicate_source_id","unsupported_target","manual_conflict"]},"message":{"type":"string","minLength":1},"details":{"type":"object","additionalProperties":{}}},"required":["kind","source_kind","source_path","code","message"]},"description":"Source files that could not be read as task definitions."}},"required":["data","page_info"]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TaskProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TaskProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TaskProblem"}}}}},"x-documentation-source-tag":"Project tasks","x-canonical-documentation":{"domain":"agents","resource":"Tasks","subgroup":"Tasks","name":"List tasks","description":"List the tasks defined in the source of a project, a branch or an environment to find a task to run, schedule or edit; returns every task as one page with the source files that could not be read as tasks. Requires project.runs.read.","operationId":"listTasks"}},"post":{"operationId":"createTask","tags":["agents/Tasks/Tasks"],"summary":"Create task","description":"Create a task source file in the project source or a preview branch when a new unit of work must be runnable or schedulable; returns the task source document. Requires project.runs.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Source to write: project or preview_branch. Defaults to project."},"required":false,"description":"Source to write: project or preview_branch. Defaults to project.","name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Preview branch to write when source_target_kind is preview_branch."},"required":false,"description":"Preview branch to write when source_target_kind is preview_branch.","name":"target_branch_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-z0-9][a-z0-9-]*$","description":"Stable task identifier used in MCP and project source."},"name":{"type":"string","minLength":1,"description":"Human-readable task name."},"description":{"type":["string","null"],"description":"Optional short description of what the task does."},"schedulable":{"type":"boolean","description":"Whether the task can be used from schedulers and cron definitions. Defaults to true."}},"required":["id","name"]}}}},"responses":{"201":{"description":"Created task document","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Task identifier."},"name":{"type":"string","description":"Human-readable task name."},"description":{"type":["string","null"],"description":"Short description of what the task does."},"target":{"type":"string","description":"Execution target that implements the task."},"source_path":{"type":"string","description":"Source file path where the task definition lives."},"source":{"type":"string","description":"Task source code or structured document content."},"schedulable":{"type":"boolean","description":"Whether the task can be used from schedulers."},"edit_mode":{"type":"string","enum":["structured","source_only"],"description":"Editing mode supported for the task definition."},"source_only_reasons":{"type":"array","items":{"type":"string"},"description":"Reasons why the task can only be edited as raw source, when applicable."}},"required":["id","name","description","target","source_path","source","schedulable","edit_mode","source_only_reasons"],"description":"Task definition including editable source content."}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TaskProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TaskProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TaskProblem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TaskProblem"}}}}},"x-documentation-source-tag":"Project tasks","x-canonical-documentation":{"domain":"agents","resource":"Tasks","subgroup":"Tasks","name":"Create task","description":"Create a task source file in the project source or a preview branch when a new unit of work must be runnable or schedulable; returns the task source document. Requires project.runs.write.","operationId":"createTask"}}},"/projects/{project_reference}/tasks/{task_id}":{"get":{"operationId":"getTask","tags":["agents/Tasks/Tasks"],"summary":"Get task","description":"Read one task definition by its ID to inspect its target, input and output schemas and whether it can be scheduled; returns the task. Requires project.runs.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Task identifier"},"required":true,"name":"task_id","in":"path"},{"schema":{"type":"string","enum":["project","main_branch","environment","preview_branch"],"description":"Source to read: project, main_branch, environment or preview_branch. Overrides runtime_target_kind."},"required":false,"description":"Source to read: project, main_branch, environment or preview_branch. Overrides runtime_target_kind.","name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"enum":["main_branch","environment","preview_branch",null],"description":"Runtime target to read from: main_branch, environment or preview_branch."},"required":false,"description":"Runtime target to read from: main_branch, environment or preview_branch.","name":"runtime_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Environment to read from when the target kind is environment."},"required":false,"description":"Environment to read from when the target kind is environment.","name":"target_environment_id","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Preview branch to use when the target kind is preview_branch."},"required":false,"description":"Preview branch to use when the target kind is preview_branch.","name":"target_branch_id","in":"query"}],"responses":{"200":{"description":"Discovered project task","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Task identifier."},"name":{"type":"string","description":"Human-readable task name."},"description":{"type":["string","null"],"description":"Short description of what the task does."},"target":{"type":"string","description":"Execution target that implements the task."},"source_path":{"type":"string","description":"Source file path where the task definition lives."},"edit_mode":{"type":"string","enum":["structured","source_only"],"description":"Editing mode supported for the task definition; source_only definitions reject update_task with source_only_conflict."},"input_schema":{"type":["object","null"],"additionalProperties":{},"description":"Structured input schema for task execution, when defined."},"output_schema":{"type":["object","null"],"additionalProperties":{},"description":"Structured output schema for task execution, when defined."},"schedulable":{"type":"boolean","description":"Whether the task can be used from cron schedules or workflow schedulers."}},"required":["id","name","description","target","source_path","edit_mode","input_schema","output_schema","schedulable"],"description":"Task definition."}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TaskProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TaskProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TaskProblem"}}}}},"x-documentation-source-tag":"Project tasks","x-canonical-documentation":{"domain":"agents","resource":"Tasks","subgroup":"Tasks","name":"Get task","description":"Read one task definition by its ID to inspect its target, input and output schemas and whether it can be scheduled; returns the task. Requires project.runs.read.","operationId":"getTask"}},"patch":{"operationId":"updateTask","tags":["agents/Tasks/Tasks"],"summary":"Update task","description":"Change the name, description or schedulable flag of a structured task, where an omitted description or flag keeps its value; returns the updated task source document. Requires project.runs.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Task identifier"},"required":true,"name":"task_id","in":"path"},{"schema":{"type":"string","description":"Source to write: project or preview_branch. Defaults to project."},"required":false,"description":"Source to write: project or preview_branch. Defaults to project.","name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Preview branch to write when source_target_kind is preview_branch."},"required":false,"description":"Preview branch to write when source_target_kind is preview_branch.","name":"target_branch_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Updated human-readable task name."},"description":{"type":["string","null"],"description":"Updated task description. Omit it to keep the current description."},"schedulable":{"type":"boolean","description":"Updated schedulable flag. Omit it to keep the current value."}},"required":["name"]}}}},"responses":{"200":{"description":"Updated task document","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Task identifier."},"name":{"type":"string","description":"Human-readable task name."},"description":{"type":["string","null"],"description":"Short description of what the task does."},"target":{"type":"string","description":"Execution target that implements the task."},"source_path":{"type":"string","description":"Source file path where the task definition lives."},"source":{"type":"string","description":"Task source code or structured document content."},"schedulable":{"type":"boolean","description":"Whether the task can be used from schedulers."},"edit_mode":{"type":"string","enum":["structured","source_only"],"description":"Editing mode supported for the task definition."},"source_only_reasons":{"type":"array","items":{"type":"string"},"description":"Reasons why the task can only be edited as raw source, when applicable."}},"required":["id","name","description","target","source_path","source","schedulable","edit_mode","source_only_reasons"],"description":"Task definition including editable source content."}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AutomationProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AutomationProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AutomationProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AutomationProblem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AutomationProblem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AutomationProblem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project tasks","x-canonical-documentation":{"domain":"agents","resource":"Tasks","subgroup":"Tasks","name":"Update task","description":"Change the name, description or schedulable flag of a structured task, where an omitted description or flag keeps its value; returns the updated task source document. Requires project.runs.write.","operationId":"updateTask"}},"delete":{"operationId":"deleteTask","tags":["agents/Tasks/Tasks"],"summary":"Delete task","description":"Delete the source file of a task that is no longer needed; returns the acknowledgement ok: true. Requires project.runs.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Task identifier"},"required":true,"name":"task_id","in":"path"},{"schema":{"type":"string","description":"Source to write: project or preview_branch. Defaults to project."},"required":false,"description":"Source to write: project or preview_branch. Defaults to project.","name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Preview branch to write when source_target_kind is preview_branch."},"required":false,"description":"Preview branch to write when source_target_kind is preview_branch.","name":"target_branch_id","in":"query"}],"responses":{"200":{"description":"Task deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TaskProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TaskProblem"}}}},"403":{"description":"Forbidden. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TaskProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TaskProblem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TaskProblem"}}}}},"x-documentation-source-tag":"Project tasks","x-canonical-documentation":{"domain":"agents","resource":"Tasks","subgroup":"Tasks","name":"Delete task","description":"Delete the source file of a task that is no longer needed; returns the acknowledgement ok: true. Requires project.runs.write.","operationId":"deleteTask"}}},"/projects/{project_reference}/tasks/{task_id}/source":{"get":{"operationId":"readTaskSource","tags":["agents/Tasks/Tasks"],"summary":"Read task source","description":"Read the editable source behind one task before changing it; returns the task source document with its source text, edit mode and the reasons it can only be edited as source. Requires project.runs.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Task identifier"},"required":true,"name":"task_id","in":"path"},{"schema":{"type":"string","description":"Source to read: project or preview_branch. Defaults to runtime_target_kind, then project."},"required":false,"description":"Source to read: project or preview_branch. Defaults to runtime_target_kind, then project.","name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Preview branch to use when the target kind is preview_branch."},"required":false,"description":"Preview branch to use when the target kind is preview_branch.","name":"target_branch_id","in":"query"},{"schema":{"type":["string","null"],"enum":["main_branch","environment","preview_branch",null],"description":"Used as the source target kind when source_target_kind is omitted."},"required":false,"description":"Used as the source target kind when source_target_kind is omitted.","name":"runtime_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Not supported for source reads; a non-null value is rejected."},"required":false,"description":"Not supported for source reads; a non-null value is rejected.","name":"target_environment_id","in":"query"}],"responses":{"200":{"description":"Task document","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Task identifier."},"name":{"type":"string","description":"Human-readable task name."},"description":{"type":["string","null"],"description":"Short description of what the task does."},"target":{"type":"string","description":"Execution target that implements the task."},"source_path":{"type":"string","description":"Source file path where the task definition lives."},"source":{"type":"string","description":"Task source code or structured document content."},"schedulable":{"type":"boolean","description":"Whether the task can be used from schedulers."},"edit_mode":{"type":"string","enum":["structured","source_only"],"description":"Editing mode supported for the task definition."},"source_only_reasons":{"type":"array","items":{"type":"string"},"description":"Reasons why the task can only be edited as raw source, when applicable."}},"required":["id","name","description","target","source_path","source","schedulable","edit_mode","source_only_reasons"],"description":"Task definition including editable source content."}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TaskProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TaskProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TaskProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TaskProblem"}}}}},"x-documentation-source-tag":"Project tasks","x-canonical-documentation":{"domain":"agents","resource":"Tasks","subgroup":"Tasks","name":"Read task source","description":"Read the editable source behind one task before changing it; returns the task source document with its source text, edit mode and the reasons it can only be edited as source. Requires project.runs.read.","operationId":"readTaskSource"}}},"/projects/{project_reference}/workflows":{"get":{"operationId":"listWorkflows","tags":["agents/Workflows/Workflows"],"summary":"List workflows","description":"List the workflows defined in the source of a project, a branch or an environment to find a workflow to run, schedule or edit; returns every workflow as one page with the source files that could not be read as workflows. Requires project.runs.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":["string","null"],"enum":["main_branch","environment","preview_branch",null]},"required":false,"name":"runtime_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_environment_id","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"},{"schema":{"type":"string","enum":["project","main_branch","environment","preview_branch"]},"required":false,"name":"source_target_kind","in":"query"}],"responses":{"200":{"description":"Discovered project workflows","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Workflow identifier."},"name":{"type":"string","description":"Human-readable workflow name."},"description":{"type":["string","null"],"description":"Short description of the workflow purpose."},"target":{"type":"string","description":"Execution target that implements the workflow."},"source_path":{"type":"string","description":"Source file path where the workflow definition lives."},"edit_mode":{"type":"string","enum":["structured","source_only"],"description":"Editing mode supported for the workflow definition; source_only definitions reject update_workflow with source_only_conflict."},"version":{"type":["string","null"],"description":"Version string for the workflow definition, when tracked."},"input_schema":{"type":["object","null"],"additionalProperties":{},"description":"Structured input schema for workflow execution, when defined."},"output_schema":{"type":["object","null"],"additionalProperties":{},"description":"Structured output schema for workflow execution, when defined."},"schedulable":{"type":"boolean","description":"Whether the workflow can be triggered by schedulers or automations."}},"required":["id","name","description","target","source_path","edit_mode","version","input_schema","output_schema","schedulable"],"description":"Workflow definition returned by MCP workflow tools."},"description":"Workflow definitions returned for the project."},"page_info":{"$ref":"#/components/schemas/PageInfo"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["source_file_diagnostic","source_agent_discovery_error","source_trigger_discovery_error"]},"source_kind":{"type":"string","enum":["agent","prompt","tool","task","workflow","resource","skill","eval","schedule","webhook"]},"source_path":{"type":"string","minLength":1},"source_id":{"type":"string","minLength":1},"code":{"type":"string","enum":["parse_error","invalid_definition","dynamic_definition","duplicate_source_id","unsupported_target","manual_conflict"]},"message":{"type":"string","minLength":1},"details":{"type":"object","additionalProperties":{}}},"required":["kind","source_kind","source_path","code","message"]}}},"required":["data","page_info"],"description":"List of workflow definitions for a project."}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/WorkflowProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/WorkflowProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/WorkflowProblem"}}}}},"x-documentation-source-tag":"Project workflows","x-canonical-documentation":{"domain":"agents","resource":"Workflows","subgroup":"Workflows","name":"List workflows","description":"List the workflows defined in the source of a project, a branch or an environment to find a workflow to run, schedule or edit; returns every workflow as one page with the source files that could not be read as workflows. Requires project.runs.read.","operationId":"listWorkflows"}},"post":{"operationId":"createWorkflow","tags":["agents/Workflows/Workflows"],"summary":"Create workflow","description":"Create a workflow source file in the project source or a preview branch when a new multi-step process must be runnable or schedulable; returns the workflow source document. Requires project.runs.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string"},"required":false,"name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-z0-9][a-z0-9-]*$","description":"Stable workflow identifier used in MCP and project source."},"description":{"type":["string","null"],"description":"Optional short description of what the workflow does."},"version":{"type":["string","null"],"description":"Optional workflow version string."},"schedulable":{"type":"boolean","description":"Whether the workflow can be triggered by schedulers."}},"required":["id"]}}}},"responses":{"201":{"description":"Created workflow document","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Workflow identifier."},"name":{"type":"string","description":"Human-readable workflow name."},"description":{"type":["string","null"],"description":"Short description of the workflow purpose."},"target":{"type":"string","description":"Execution target that implements the workflow."},"source_path":{"type":"string","description":"Source file path where the workflow definition lives."},"source":{"type":"string","description":"Workflow source code or structured document content."},"version":{"type":["string","null"],"description":"Version string for the workflow definition, when tracked."},"schedulable":{"type":"boolean","description":"Whether the workflow can be triggered by schedulers."},"edit_mode":{"type":"string","enum":["structured","source_only"],"description":"Editing mode supported for the workflow definition."},"source_only_reasons":{"type":"array","items":{"type":"string"},"description":"Reasons why the workflow can only be edited as raw source, when applicable."}},"required":["id","name","description","target","source_path","source","version","schedulable","edit_mode","source_only_reasons"],"description":"Workflow definition including editable source content."}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/WorkflowProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/WorkflowProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/WorkflowProblem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/WorkflowProblem"}}}}},"x-documentation-source-tag":"Project workflows","x-canonical-documentation":{"domain":"agents","resource":"Workflows","subgroup":"Workflows","name":"Create workflow","description":"Create a workflow source file in the project source or a preview branch when a new multi-step process must be runnable or schedulable; returns the workflow source document. Requires project.runs.write.","operationId":"createWorkflow"}}},"/projects/{project_reference}/workflows/{workflow_id}":{"get":{"operationId":"getWorkflow","tags":["agents/Workflows/Workflows"],"summary":"Get workflow","description":"Read one workflow definition by its ID to inspect its target, version, input and output schemas and whether it can be scheduled; returns the workflow. Requires project.runs.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Workflow ID from list_workflows, for example publish-site"},"required":true,"description":"Workflow ID from list_workflows, for example publish-site","name":"workflow_id","in":"path"},{"schema":{"type":["string","null"],"enum":["main_branch","environment","preview_branch",null]},"required":false,"name":"runtime_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_environment_id","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"},{"schema":{"type":"string","enum":["project","main_branch","environment","preview_branch"]},"required":false,"name":"source_target_kind","in":"query"}],"responses":{"200":{"description":"Discovered project workflow","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Workflow identifier."},"name":{"type":"string","description":"Human-readable workflow name."},"description":{"type":["string","null"],"description":"Short description of the workflow purpose."},"target":{"type":"string","description":"Execution target that implements the workflow."},"source_path":{"type":"string","description":"Source file path where the workflow definition lives."},"edit_mode":{"type":"string","enum":["structured","source_only"],"description":"Editing mode supported for the workflow definition; source_only definitions reject update_workflow with source_only_conflict."},"version":{"type":["string","null"],"description":"Version string for the workflow definition, when tracked."},"input_schema":{"type":["object","null"],"additionalProperties":{},"description":"Structured input schema for workflow execution, when defined."},"output_schema":{"type":["object","null"],"additionalProperties":{},"description":"Structured output schema for workflow execution, when defined."},"schedulable":{"type":"boolean","description":"Whether the workflow can be triggered by schedulers or automations."}},"required":["id","name","description","target","source_path","edit_mode","version","input_schema","output_schema","schedulable"],"description":"Workflow definition returned by MCP workflow tools."}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/WorkflowProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/WorkflowProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/WorkflowProblem"}}}}},"x-documentation-source-tag":"Project workflows","x-canonical-documentation":{"domain":"agents","resource":"Workflows","subgroup":"Workflows","name":"Get workflow","description":"Read one workflow definition by its ID to inspect its target, version, input and output schemas and whether it can be scheduled; returns the workflow. Requires project.runs.read.","operationId":"getWorkflow"}},"patch":{"operationId":"updateWorkflow","tags":["agents/Workflows/Workflows"],"summary":"Update workflow","description":"Change the description, version or schedulable flag of a structured workflow, where an omitted field keeps its value; returns the updated workflow source document. Requires project.runs.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Workflow identifier"},"required":true,"name":"workflow_id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":["string","null"],"description":"Updated workflow description."},"version":{"type":["string","null"],"description":"Updated workflow version string."},"schedulable":{"type":"boolean","description":"Updated schedulable flag for the workflow definition."}}}}}},"responses":{"200":{"description":"Updated workflow document","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Workflow identifier."},"name":{"type":"string","description":"Human-readable workflow name."},"description":{"type":["string","null"],"description":"Short description of the workflow purpose."},"target":{"type":"string","description":"Execution target that implements the workflow."},"source_path":{"type":"string","description":"Source file path where the workflow definition lives."},"source":{"type":"string","description":"Workflow source code or structured document content."},"version":{"type":["string","null"],"description":"Version string for the workflow definition, when tracked."},"schedulable":{"type":"boolean","description":"Whether the workflow can be triggered by schedulers."},"edit_mode":{"type":"string","enum":["structured","source_only"],"description":"Editing mode supported for the workflow definition."},"source_only_reasons":{"type":"array","items":{"type":"string"},"description":"Reasons why the workflow can only be edited as raw source, when applicable."}},"required":["id","name","description","target","source_path","source","version","schedulable","edit_mode","source_only_reasons"],"description":"Workflow definition including editable source content."}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AutomationProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AutomationProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AutomationProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AutomationProblem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AutomationProblem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AutomationProblem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project workflows","x-canonical-documentation":{"domain":"agents","resource":"Workflows","subgroup":"Workflows","name":"Update workflow","description":"Change the description, version or schedulable flag of a structured workflow, where an omitted field keeps its value; returns the updated workflow source document. Requires project.runs.write.","operationId":"updateWorkflow"}},"delete":{"operationId":"deleteWorkflow","tags":["agents/Workflows/Workflows"],"summary":"Delete workflow","description":"Delete the source file of a workflow that is no longer needed; returns the acknowledgement ok: true. Requires project.runs.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","minLength":1,"description":"Existing workflow identifier to delete."},"required":true,"description":"Existing workflow identifier to delete.","name":"workflow_id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"}],"responses":{"200":{"description":"Workflow deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/WorkflowProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/WorkflowProblem"}}}},"403":{"description":"Forbidden. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/WorkflowProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/WorkflowProblem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/WorkflowProblem"}}}}},"x-documentation-source-tag":"Project workflows","x-canonical-documentation":{"domain":"agents","resource":"Workflows","subgroup":"Workflows","name":"Delete workflow","description":"Delete the source file of a workflow that is no longer needed; returns the acknowledgement ok: true. Requires project.runs.write.","operationId":"deleteWorkflow"}}},"/projects/{project_reference}/workflows/{workflow_id}/source":{"get":{"operationId":"readWorkflowSource","tags":["agents/Workflows/Workflows"],"summary":"Read workflow source","description":"Read the editable source behind one workflow before changing it; returns the workflow source document with its source text, edit mode and the reasons it can only be edited as source. Requires project.runs.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Workflow ID from list_workflows"},"required":true,"description":"Workflow ID from list_workflows","name":"workflow_id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid"},"required":false,"name":"target_branch_id","in":"query"},{"schema":{"type":["string","null"],"enum":["main_branch","environment","preview_branch",null],"description":"Used as the source target kind when source_target_kind is omitted."},"required":false,"description":"Used as the source target kind when source_target_kind is omitted.","name":"runtime_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Not supported for source reads; a non-null value is rejected."},"required":false,"description":"Not supported for source reads; a non-null value is rejected.","name":"target_environment_id","in":"query"}],"responses":{"200":{"description":"Workflow document","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Workflow identifier."},"name":{"type":"string","description":"Human-readable workflow name."},"description":{"type":["string","null"],"description":"Short description of the workflow purpose."},"target":{"type":"string","description":"Execution target that implements the workflow."},"source_path":{"type":"string","description":"Source file path where the workflow definition lives."},"source":{"type":"string","description":"Workflow source code or structured document content."},"version":{"type":["string","null"],"description":"Version string for the workflow definition, when tracked."},"schedulable":{"type":"boolean","description":"Whether the workflow can be triggered by schedulers."},"edit_mode":{"type":"string","enum":["structured","source_only"],"description":"Editing mode supported for the workflow definition."},"source_only_reasons":{"type":"array","items":{"type":"string"},"description":"Reasons why the workflow can only be edited as raw source, when applicable."}},"required":["id","name","description","target","source_path","source","version","schedulable","edit_mode","source_only_reasons"],"description":"Workflow definition including editable source content."}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/WorkflowProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/WorkflowProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/WorkflowProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/WorkflowProblem"}}}}},"x-documentation-source-tag":"Project workflows","x-canonical-documentation":{"domain":"agents","resource":"Workflows","subgroup":"Workflows","name":"Read workflow source","description":"Read the editable source behind one workflow before changing it; returns the workflow source document with its source text, edit mode and the reasons it can only be edited as source. Requires project.runs.read.","operationId":"readWorkflowSource"}}},"/conversations":{"get":{"operationId":"listConversations","tags":["execution/Conversations/Conversations"],"summary":"List conversations","description":"List the conversations the caller can read, newest activity first, to build a conversation picker or to find a conversation of a project; returns one page of conversations, filtered by project reference and paged with the returned cursor until it is null.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project UUID or slug"},"required":false,"description":"Project UUID or slug","name":"project_reference","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type","in":"query"},{"schema":{"type":"string"},"required":false,"name":"participant_ids","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":false,"name":"agent_id","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"user_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"search","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["updated_at","created_at","title","message_count"],"default":"updated_at"},"required":false,"name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"required":false,"name":"sort_order","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"project_id","in":"query"}],"responses":{"200":{"description":"Conversation list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"project_id":{"type":["string","null"]},"responding_agent_id":{"type":["string","null"],"default":null},"type":{"type":"string","enum":["chat","default_chat","plan","research","agent_task","support","channel","project_agent"]},"title":{"type":["string","null"]},"summary":{"type":["string","null"]},"status":{"type":"string","enum":["active","archived","deleted"]},"current_node":{"type":["string","null"]},"message_count":{"type":"number"},"last_message_at":{"type":["string","null"]},"metadata":{"type":["object","null"],"additionalProperties":{}},"created_by":{"type":["string","null"]},"archived_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"participants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"participant_id":{"type":["string","null"]},"participant_type":{"type":"string","enum":["user","agent"],"default":"user"},"user_id":{"type":["string","null"]},"agent_id":{"type":["string","null"]},"display_name":{"type":["string","null"]},"agent_kind":{"type":["string","null"],"enum":["project",null]},"avatar_url":{"type":["string","null"]},"role":{"type":"string","enum":["owner","member","viewer"]}},"required":["id","role"]},"default":[]}},"required":["id","type","status","message_count","created_by","created_at","updated_at"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Conversations","x-canonical-documentation":{"domain":"execution","resource":"Conversations","subgroup":"Conversations","name":"List conversations","description":"List the conversations the caller can read, newest activity first, to build a conversation picker or to find a conversation of a project; returns one page of conversations, filtered by project reference and paged with the returned cursor until it is null.","operationId":"listConversations"}},"post":{"operationId":"createConversation","tags":["execution/Conversations/Conversations"],"summary":"Create conversation","description":"Start a conversation in a project when a user or an agent opens a new thread, optionally with a first user message; a retry with the same idempotency key returns the same conversation. Requires project.conversations.create.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"project_reference":{"type":"string","minLength":1,"description":"Project UUID or slug"},"type":{"type":"string","enum":["chat","default_chat","plan","research","agent_task","support","channel","project_agent"]},"title":{"type":"string","maxLength":500},"idempotency_key":{"type":"string","minLength":1,"maxLength":255},"metadata":{"type":"object","additionalProperties":{}},"initial_message":{"type":"object","properties":{"composing_user_id":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["user"]},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string","maxLength":100000}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"upload_id":{"type":"string","format":"uuid"},"media_type":{"type":"string"},"url":{"type":"string"}},"required":["type","upload_id","media_type"]},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"upload_id":{"type":"string","format":"uuid"},"media_type":{"type":"string"},"filename":{"type":"string"},"url":{"type":"string"}},"required":["type","media_type"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_call"]},"id":{"type":"string"},"name":{"type":"string"},"input":{"type":"object","additionalProperties":{}},"state":{"type":"string","enum":["streaming","pending","completed","error"]}},"required":["type","id","name","input","state"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_result"]},"tool_call_id":{"type":"string"},"output":{},"is_error":{"type":"boolean"}},"required":["type","tool_call_id"]},{"type":"object","properties":{"type":{"type":"string","enum":["reasoning"]},"text":{"type":"string","maxLength":100000},"signature":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["citation"]},"source_id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"quote":{"type":"string"}},"required":["type","source_id"]},{"type":"object","properties":{"type":{"type":"string","enum":["source_document"]},"source_id":{"type":"string"},"media_type":{"type":"string"},"title":{"type":"string"},"filename":{"type":"string"}},"required":["type","source_id","media_type","title"]},{"type":"object","properties":{"type":{"type":"string","enum":["step_start"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"code":{"type":"string"},"message":{"type":"string"}},"required":["type","code","message"]},{"type":"object","properties":{"type":{"type":"string","enum":["data"]},"name":{"type":"string"},"value":{}},"required":["type","name"]}]},"minItems":1,"maxItems":200},"idempotency_key":{"type":"string","maxLength":255},"metadata":{"type":"object","additionalProperties":{}}},"required":["role","parts"],"additionalProperties":false,"description":"First user message, persisted atomically with the conversation."},"project_id":{"type":"string","format":"uuid"}}}}}},"responses":{"201":{"description":"Created conversation","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"project_id":{"type":["string","null"]},"responding_agent_id":{"type":["string","null"],"default":null},"type":{"type":"string","enum":["chat","default_chat","plan","research","agent_task","support","channel","project_agent"]},"title":{"type":["string","null"]},"summary":{"type":["string","null"]},"status":{"type":"string","enum":["active","archived","deleted"]},"current_node":{"type":["string","null"]},"message_count":{"type":"number"},"last_message_at":{"type":["string","null"]},"metadata":{"type":["object","null"],"additionalProperties":{}},"created_by":{"type":["string","null"]},"archived_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"participants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"participant_id":{"type":["string","null"]},"participant_type":{"type":"string","enum":["user","agent"],"default":"user"},"user_id":{"type":["string","null"]},"agent_id":{"type":["string","null"]},"display_name":{"type":["string","null"]},"agent_kind":{"type":["string","null"],"enum":["project",null]},"avatar_url":{"type":["string","null"]},"role":{"type":"string","enum":["owner","member","viewer"]}},"required":["id","role"]},"default":[]},"initial_message_id":{"type":["string","null"],"format":"uuid"}},"required":["id","type","status","message_count","created_by","created_at","updated_at","initial_message_id"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Conversations","x-canonical-documentation":{"domain":"execution","resource":"Conversations","subgroup":"Conversations","name":"Create conversation","description":"Start a conversation in a project when a user or an agent opens a new thread, optionally with a first user message; a retry with the same idempotency key returns the same conversation. Requires project.conversations.create.","operationId":"createConversation"}}},"/conversations/{conversation_id}":{"get":{"operationId":"getConversation","tags":["execution/Conversations/Conversations"],"summary":"Get conversation","description":"Get one conversation before rendering a thread or to check its status, title and project; returns the conversation with its participants and its current branch head.","parameters":[{"schema":{"$ref":"#/components/schemas/Uuid"},"required":true,"name":"conversation_id","in":"path"}],"responses":{"200":{"description":"Conversation","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"project_id":{"type":["string","null"]},"responding_agent_id":{"type":["string","null"],"default":null},"type":{"type":"string","enum":["chat","default_chat","plan","research","agent_task","support","channel","project_agent"]},"title":{"type":["string","null"]},"summary":{"type":["string","null"]},"status":{"type":"string","enum":["active","archived","deleted"]},"current_node":{"type":["string","null"]},"message_count":{"type":"number"},"last_message_at":{"type":["string","null"]},"metadata":{"type":["object","null"],"additionalProperties":{}},"created_by":{"type":["string","null"]},"archived_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"participants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"participant_id":{"type":["string","null"]},"participant_type":{"type":"string","enum":["user","agent"],"default":"user"},"user_id":{"type":["string","null"]},"agent_id":{"type":["string","null"]},"display_name":{"type":["string","null"]},"agent_kind":{"type":["string","null"],"enum":["project",null]},"avatar_url":{"type":["string","null"]},"role":{"type":"string","enum":["owner","member","viewer"]}},"required":["id","role"]},"default":[]}},"required":["id","type","status","message_count","created_by","created_at","updated_at"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Conversations","x-canonical-documentation":{"domain":"execution","resource":"Conversations","subgroup":"Conversations","name":"Get conversation","description":"Get one conversation before rendering a thread or to check its status, title and project; returns the conversation with its participants and its current branch head.","operationId":"getConversation"}},"patch":{"operationId":"updateConversation","tags":["execution/Conversations/Conversations"],"summary":"Update conversation","description":"Change the title, summary, project or status (active or archived) of a conversation, for example to rename or archive a thread; a change of status, summary or project needs the admin relation.","parameters":[{"schema":{"$ref":"#/components/schemas/Uuid"},"required":true,"name":"conversation_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":500},"status":{"type":"string","enum":["active","archived"]},"summary":{"type":"string","maxLength":5000},"project_reference":{"type":"string","minLength":1,"description":"Project UUID or slug"},"project_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"Updated conversation","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"project_id":{"type":["string","null"]},"responding_agent_id":{"type":["string","null"],"default":null},"type":{"type":"string","enum":["chat","default_chat","plan","research","agent_task","support","channel","project_agent"]},"title":{"type":["string","null"]},"summary":{"type":["string","null"]},"status":{"type":"string","enum":["active","archived","deleted"]},"current_node":{"type":["string","null"]},"message_count":{"type":"number"},"last_message_at":{"type":["string","null"]},"metadata":{"type":["object","null"],"additionalProperties":{}},"created_by":{"type":["string","null"]},"archived_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"participants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"participant_id":{"type":["string","null"]},"participant_type":{"type":"string","enum":["user","agent"],"default":"user"},"user_id":{"type":["string","null"]},"agent_id":{"type":["string","null"]},"display_name":{"type":["string","null"]},"agent_kind":{"type":["string","null"],"enum":["project",null]},"avatar_url":{"type":["string","null"]},"role":{"type":"string","enum":["owner","member","viewer"]}},"required":["id","role"]},"default":[]}},"required":["id","type","status","message_count","created_by","created_at","updated_at"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Conversations","x-canonical-documentation":{"domain":"execution","resource":"Conversations","subgroup":"Conversations","name":"Update conversation","description":"Change the title, summary, project or status (active or archived) of a conversation, for example to rename or archive a thread; a change of status, summary or project needs the admin relation.","operationId":"updateConversation"}},"delete":{"operationId":"deleteConversation","tags":["execution/Conversations/Conversations"],"summary":"Delete conversation","description":"Delete a conversation only when the user asks to remove the thread, so that it and its messages are no longer accessible; the deletion cannot be undone through the API and needs the admin relation.","parameters":[{"schema":{"$ref":"#/components/schemas/Uuid"},"required":true,"name":"conversation_id","in":"path"}],"responses":{"200":{"description":"Conversation soft-deleted; the record is kept.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Conversations","x-canonical-documentation":{"domain":"execution","resource":"Conversations","subgroup":"Conversations","name":"Delete conversation","description":"Delete a conversation only when the user asks to remove the thread, so that it and its messages are no longer accessible; the deletion cannot be undone through the API and needs the admin relation.","operationId":"deleteConversation"}}},"/conversations/{conversation_id}/messages":{"get":{"operationId":"listConversationMessages","tags":["execution/Conversations/Conversation messages"],"summary":"List conversation messages","description":"List the messages of a conversation in sequence order, including branches, to render or replay a thread; returns one page of messages, paged with the returned cursor until it is null.","parameters":[{"schema":{"$ref":"#/components/schemas/Uuid"},"required":true,"name":"conversation_id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Message list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ConversationMessage"}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Conversation messages","x-canonical-documentation":{"domain":"execution","resource":"Conversations","subgroup":"Conversation messages","name":"List conversation messages","description":"List the messages of a conversation in sequence order, including branches, to render or replay a thread; returns one page of messages, paged with the returned cursor until it is null.","operationId":"listConversationMessages"}},"post":{"operationId":"createConversationMessage","tags":["execution/Conversations/Conversation messages"],"summary":"Create conversation message","description":"Add a user message to a conversation to send what the user typed; the parent message defaults to the selected branch and an idempotency key makes retries safe.","parameters":[{"schema":{"$ref":"#/components/schemas/Uuid"},"required":true,"name":"conversation_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"composing_user_id":{"type":"string","format":"uuid"},"parent_id":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["user"]},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string","maxLength":100000}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"upload_id":{"type":"string","format":"uuid"},"media_type":{"type":"string"},"url":{"type":"string"}},"required":["type","upload_id","media_type"]},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"upload_id":{"type":"string","format":"uuid"},"media_type":{"type":"string"},"filename":{"type":"string"},"url":{"type":"string"}},"required":["type","media_type"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_call"]},"id":{"type":"string"},"name":{"type":"string"},"input":{"type":"object","additionalProperties":{}},"state":{"type":"string","enum":["streaming","pending","completed","error"]}},"required":["type","id","name","input","state"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_result"]},"tool_call_id":{"type":"string"},"output":{},"is_error":{"type":"boolean"}},"required":["type","tool_call_id"]},{"type":"object","properties":{"type":{"type":"string","enum":["reasoning"]},"text":{"type":"string","maxLength":100000},"signature":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["citation"]},"source_id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"quote":{"type":"string"}},"required":["type","source_id"]},{"type":"object","properties":{"type":{"type":"string","enum":["source_document"]},"source_id":{"type":"string"},"media_type":{"type":"string"},"title":{"type":"string"},"filename":{"type":"string"}},"required":["type","source_id","media_type","title"]},{"type":"object","properties":{"type":{"type":"string","enum":["step_start"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"code":{"type":"string"},"message":{"type":"string"}},"required":["type","code","message"]},{"type":"object","properties":{"type":{"type":"string","enum":["data"]},"name":{"type":"string"},"value":{}},"required":["type","name"]}]},"minItems":1,"maxItems":200},"idempotency_key":{"type":"string","maxLength":255},"metadata":{"type":"object","additionalProperties":{}}},"required":["role","parts"]}}}},"responses":{"201":{"description":"Created message","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationMessage"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Conversation messages","x-canonical-documentation":{"domain":"execution","resource":"Conversations","subgroup":"Conversation messages","name":"Create conversation message","description":"Add a user message to a conversation to send what the user typed; the parent message defaults to the selected branch and an idempotency key makes retries safe.","operationId":"createConversationMessage"}}},"/conversations/{conversation_id}/messages/{message_id}":{"get":{"operationId":"getConversationMessage","tags":["execution/Conversations/Conversation messages"],"summary":"Get conversation message","description":"Get one message of a conversation to refresh a single message, for example after streaming finishes; returns the message.","parameters":[{"schema":{"$ref":"#/components/schemas/Uuid"},"required":true,"name":"conversation_id","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Message ID"},"required":true,"name":"message_id","in":"path"}],"responses":{"200":{"description":"Message","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationMessage"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Conversation messages","x-canonical-documentation":{"domain":"execution","resource":"Conversations","subgroup":"Conversation messages","name":"Get conversation message","description":"Get one message of a conversation to refresh a single message, for example after streaming finishes; returns the message.","operationId":"getConversationMessage"}},"patch":{"operationId":"updateConversationMessage","tags":["execution/Conversations/Conversation messages"],"summary":"Update conversation message","description":"Replace the parts of an existing message to edit it in place; to keep the original, create a branch instead.","parameters":[{"schema":{"$ref":"#/components/schemas/Uuid"},"required":true,"name":"conversation_id","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Message ID"},"required":true,"name":"message_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string","maxLength":100000}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"upload_id":{"type":"string","format":"uuid"},"media_type":{"type":"string"},"url":{"type":"string"}},"required":["type","upload_id","media_type"]},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"upload_id":{"type":"string","format":"uuid"},"media_type":{"type":"string"},"filename":{"type":"string"},"url":{"type":"string"}},"required":["type","media_type"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_call"]},"id":{"type":"string"},"name":{"type":"string"},"input":{"type":"object","additionalProperties":{}},"state":{"type":"string","enum":["streaming","pending","completed","error"]}},"required":["type","id","name","input","state"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_result"]},"tool_call_id":{"type":"string"},"output":{},"is_error":{"type":"boolean"}},"required":["type","tool_call_id"]},{"type":"object","properties":{"type":{"type":"string","enum":["reasoning"]},"text":{"type":"string","maxLength":100000},"signature":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["citation"]},"source_id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"quote":{"type":"string"}},"required":["type","source_id"]},{"type":"object","properties":{"type":{"type":"string","enum":["source_document"]},"source_id":{"type":"string"},"media_type":{"type":"string"},"title":{"type":"string"},"filename":{"type":"string"}},"required":["type","source_id","media_type","title"]},{"type":"object","properties":{"type":{"type":"string","enum":["step_start"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"code":{"type":"string"},"message":{"type":"string"}},"required":["type","code","message"]},{"type":"object","properties":{"type":{"type":"string","enum":["data"]},"name":{"type":"string"},"value":{}},"required":["type","name"]}]},"minItems":1,"maxItems":200}},"required":["parts"]}}}},"responses":{"200":{"description":"Updated message","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationMessage"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error, or query-error: the message is still streaming and cannot be edited or deleted; retry once it has completed.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Conversation messages","x-canonical-documentation":{"domain":"execution","resource":"Conversations","subgroup":"Conversation messages","name":"Update conversation message","description":"Replace the parts of an existing message to edit it in place; to keep the original, create a branch instead.","operationId":"updateConversationMessage"}},"delete":{"operationId":"deleteConversationMessage","tags":["execution/Conversations/Conversation messages"],"summary":"Delete conversation message","description":"Delete one message from a conversation only when the user asks to remove that message; the deletion needs editor access.","parameters":[{"schema":{"$ref":"#/components/schemas/Uuid"},"required":true,"name":"conversation_id","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Message ID"},"required":true,"name":"message_id","in":"path"}],"responses":{"200":{"description":"Soft-deletes a message; the record is kept.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error, or query-error: the message is still streaming and cannot be edited or deleted; retry once it has completed.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Conversation messages","x-canonical-documentation":{"domain":"execution","resource":"Conversations","subgroup":"Conversation messages","name":"Delete conversation message","description":"Delete one message from a conversation only when the user asks to remove that message; the deletion needs editor access.","operationId":"deleteConversationMessage"}}},"/conversations/{conversation_id}/messages/{message_id}/branches":{"get":{"operationId":"listConversationMessageBranches","tags":["execution/Conversations/Conversation messages"],"summary":"List conversation message branches","description":"List the child messages of a message, oldest first, which are the alternative continuations that start at it; to show the alternatives to an edited message, list the children of the parent of that message.","parameters":[{"schema":{"$ref":"#/components/schemas/Uuid"},"required":true,"name":"conversation_id","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Parent message ID"},"required":true,"name":"message_id","in":"path"}],"responses":{"200":{"description":"Every child message of the parent message in one page; page_info.next is null.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ConversationMessage"}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Conversation messages","x-canonical-documentation":{"domain":"execution","resource":"Conversations","subgroup":"Conversation messages","name":"List conversation message branches","description":"List the child messages of a message, oldest first, which are the alternative continuations that start at it; to show the alternatives to an edited message, list the children of the parent of that message.","operationId":"listConversationMessageBranches"}},"post":{"operationId":"createConversationMessageBranch","tags":["execution/Conversations/Conversation messages"],"summary":"Create conversation message branch","description":"Create a sibling of a message with new parts when the user edits an earlier message and wants to keep the original reply; the new message gets the parent and role of the original and becomes the selected branch.","parameters":[{"schema":{"$ref":"#/components/schemas/Uuid"},"required":true,"name":"conversation_id","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Message to branch from"},"required":true,"name":"message_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"composing_user_id":{"type":"string","format":"uuid"},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string","maxLength":100000}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"upload_id":{"type":"string","format":"uuid"},"media_type":{"type":"string"},"url":{"type":"string"}},"required":["type","upload_id","media_type"]},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"upload_id":{"type":"string","format":"uuid"},"media_type":{"type":"string"},"filename":{"type":"string"},"url":{"type":"string"}},"required":["type","media_type"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_call"]},"id":{"type":"string"},"name":{"type":"string"},"input":{"type":"object","additionalProperties":{}},"state":{"type":"string","enum":["streaming","pending","completed","error"]}},"required":["type","id","name","input","state"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_result"]},"tool_call_id":{"type":"string"},"output":{},"is_error":{"type":"boolean"}},"required":["type","tool_call_id"]},{"type":"object","properties":{"type":{"type":"string","enum":["reasoning"]},"text":{"type":"string","maxLength":100000},"signature":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["citation"]},"source_id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string"},"quote":{"type":"string"}},"required":["type","source_id"]},{"type":"object","properties":{"type":{"type":"string","enum":["source_document"]},"source_id":{"type":"string"},"media_type":{"type":"string"},"title":{"type":"string"},"filename":{"type":"string"}},"required":["type","source_id","media_type","title"]},{"type":"object","properties":{"type":{"type":"string","enum":["step_start"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"code":{"type":"string"},"message":{"type":"string"}},"required":["type","code","message"]},{"type":"object","properties":{"type":{"type":"string","enum":["data"]},"name":{"type":"string"},"value":{}},"required":["type","name"]}]},"minItems":1,"maxItems":200}},"required":["parts"]}}}},"responses":{"201":{"description":"Created sibling message","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationMessage"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Conversation messages","x-canonical-documentation":{"domain":"execution","resource":"Conversations","subgroup":"Conversation messages","name":"Create conversation message branch","description":"Create a sibling of a message with new parts when the user edits an earlier message and wants to keep the original reply; the new message gets the parent and role of the original and becomes the selected branch.","operationId":"createConversationMessageBranch"}}},"/conversations/{conversation_id}/branch-selection":{"put":{"operationId":"updateConversationBranchSelection","tags":["execution/Conversations/Conversation messages"],"summary":"Update conversation branch selection","description":"Select which branch is the current path of a conversation after the user switches branches, so that later messages continue from the selected message; returns the ID of the selected message.","parameters":[{"schema":{"$ref":"#/components/schemas/Uuid"},"required":true,"name":"conversation_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"message_id":{"type":"string","format":"uuid"}},"required":["message_id"]}}}},"responses":{"200":{"description":"Updated branch selection","content":{"application/json":{"schema":{"type":"object","properties":{"message_id":{"type":["string","null"],"format":"uuid"}},"required":["message_id"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Conversation messages","x-canonical-documentation":{"domain":"execution","resource":"Conversations","subgroup":"Conversation messages","name":"Update conversation branch selection","description":"Select which branch is the current path of a conversation after the user switches branches, so that later messages continue from the selected message; returns the ID of the selected message.","operationId":"updateConversationBranchSelection"}}},"/conversations/{conversation_id}/participants":{"get":{"operationId":"listConversationParticipants","tags":["execution/Conversations/Conversation participants"],"summary":"List conversation participants","description":"List the users and agents in a conversation with their roles and read cursors to show who is in a thread; returns every participant in one page.","parameters":[{"schema":{"$ref":"#/components/schemas/Uuid"},"required":true,"name":"conversation_id","in":"path"}],"responses":{"200":{"description":"Participant list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"conversation_id":{"type":"string"},"participant_id":{"type":["string","null"]},"participant_type":{"type":"string","enum":["user","agent"],"default":"user"},"user_id":{"type":["string","null"]},"agent_id":{"type":["string","null"]},"display_name":{"type":["string","null"]},"agent_kind":{"type":["string","null"],"enum":["project",null]},"avatar_url":{"type":["string","null"]},"role":{"type":"string","enum":["owner","member","viewer"]},"last_read_message_id":{"type":["string","null"]},"notification_preference":{"type":"string"},"joined_at":{"type":"string"}},"required":["id","conversation_id","role","notification_preference","joined_at"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Conversation participants","x-canonical-documentation":{"domain":"execution","resource":"Conversations","subgroup":"Conversation participants","name":"List conversation participants","description":"List the users and agents in a conversation with their roles and read cursors to show who is in a thread; returns every participant in one page.","operationId":"listConversationParticipants"}},"post":{"operationId":"createConversationParticipant","tags":["execution/Conversations/Conversation participants"],"summary":"Create conversation participant","description":"Add a user to a conversation as member or viewer to share a thread; the operation needs the admin relation.","parameters":[{"schema":{"$ref":"#/components/schemas/Uuid"},"required":true,"name":"conversation_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"string","format":"uuid"},"role":{"type":"string","enum":["member","viewer"],"default":"member"}},"required":["user_id"]}}}},"responses":{"201":{"description":"Added participant","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"conversation_id":{"type":"string"},"participant_id":{"type":["string","null"]},"participant_type":{"type":"string","enum":["user","agent"],"default":"user"},"user_id":{"type":["string","null"]},"agent_id":{"type":["string","null"]},"display_name":{"type":["string","null"]},"agent_kind":{"type":["string","null"],"enum":["project",null]},"avatar_url":{"type":["string","null"]},"role":{"type":"string","enum":["owner","member","viewer"]},"last_read_message_id":{"type":["string","null"]},"notification_preference":{"type":"string"},"joined_at":{"type":"string"}},"required":["id","conversation_id","role","notification_preference","joined_at"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Conversation participants","x-canonical-documentation":{"domain":"execution","resource":"Conversations","subgroup":"Conversation participants","name":"Create conversation participant","description":"Add a user to a conversation as member or viewer to share a thread; the operation needs the admin relation.","operationId":"createConversationParticipant"}}},"/conversations/{conversation_id}/participants/{user_id}":{"delete":{"operationId":"deleteConversationParticipant","tags":["execution/Conversations/Conversation participants"],"summary":"Delete conversation participant","description":"Remove a user from a conversation to revoke the access of that participant to the thread; the operation needs the admin relation.","parameters":[{"schema":{"$ref":"#/components/schemas/Uuid"},"required":true,"name":"conversation_id","in":"path"},{"schema":{"type":"string","format":"uuid","description":"User ID to remove"},"required":true,"name":"user_id","in":"path"}],"responses":{"200":{"description":"Participant removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Conversation participants","x-canonical-documentation":{"domain":"execution","resource":"Conversations","subgroup":"Conversation participants","name":"Delete conversation participant","description":"Remove a user from a conversation to revoke the access of that participant to the thread; the operation needs the admin relation.","operationId":"deleteConversationParticipant"}}},"/participants":{"get":{"operationId":"listParticipantIdentities","tags":["execution/Conversations/Conversation participants"],"summary":"List participants","description":"Find participant identities in conversations the authenticated user belongs to.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Agent ID whose conversation participant identity is returned."},"required":false,"description":"Agent ID whose conversation participant identity is returned.","name":"agent","in":"query"},{"schema":{"type":"string","format":"uuid","description":"User ID whose conversation participant identity is returned."},"required":false,"description":"User ID whose conversation participant identity is returned.","name":"user","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Use page_info.next to continue the same filtered directory lookup."},"required":false,"description":"Use page_info.next to continue the same filtered directory lookup.","name":"cursor","in":"query"}],"responses":{"200":{"description":"Conversation participant identities for the specified user or agent IDs.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"participant_type":{"type":"string","enum":["user","agent"]},"user_id":{"type":["string","null"],"format":"uuid"},"agent_id":{"type":["string","null"]},"project_id":{"type":["string","null"],"format":"uuid"},"display_name":{"type":["string","null"]}},"required":["id","participant_type"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Conversation participants","x-canonical-documentation":{"domain":"execution","resource":"Conversations","subgroup":"Conversation participants","name":"List participants","description":"Find participant identities in conversations the authenticated user belongs to.","operationId":"listParticipantIdentities"}}},"/conversations/{conversation_id}/read-state":{"get":{"operationId":"getConversationReadState","tags":["execution/Conversations/Conversation read state"],"summary":"Get conversation read state","description":"Get the read cursor and the unread count of the caller for a conversation to show unread badges; returns the last read message and the number of unread messages.","parameters":[{"schema":{"$ref":"#/components/schemas/Uuid"},"required":true,"name":"conversation_id","in":"path"}],"responses":{"200":{"description":"Read state","content":{"application/json":{"schema":{"type":"object","properties":{"last_read_message_id":{"type":["string","null"],"format":"uuid"},"unread_count":{"type":"integer","minimum":0}},"required":["last_read_message_id","unread_count"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Conversation read state","x-canonical-documentation":{"domain":"execution","resource":"Conversations","subgroup":"Conversation read state","name":"Get conversation read state","description":"Get the read cursor and the unread count of the caller for a conversation to show unread badges; returns the last read message and the number of unread messages.","operationId":"getConversationReadState"}},"put":{"operationId":"updateConversationReadState","tags":["execution/Conversations/Conversation read state"],"summary":"Update conversation read state","description":"Advance the read cursor of the caller to a message of the conversation when the user has seen messages; the cursor never moves backwards.","parameters":[{"schema":{"$ref":"#/components/schemas/Uuid"},"required":true,"name":"conversation_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"message_id":{"type":"string","format":"uuid","description":"Advances the read cursor to this message; an older message does not move it backward."}},"required":["message_id"]}}}},"responses":{"200":{"description":"Advances the read cursor for the current user and returns its effective persisted state. An older message marker does not move the cursor backward.","content":{"application/json":{"schema":{"type":"object","properties":{"last_read_message_id":{"type":["string","null"],"format":"uuid"},"unread_count":{"type":"integer","minimum":0}},"required":["last_read_message_id","unread_count"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Conversation read state","x-canonical-documentation":{"domain":"execution","resource":"Conversations","subgroup":"Conversation read state","name":"Update conversation read state","description":"Advance the read cursor of the caller to a message of the conversation when the user has seen messages; the cursor never moves backwards.","operationId":"updateConversationReadState"}}},"/projects/{project_reference}/schedules":{"get":{"operationId":"listSchedules","tags":["execution/Triggers/Project schedules"],"summary":"List schedules","description":"List the schedules stored for a project, newest first, to find a schedule or check its state and last runs; returns one page of schedules. Requires project.runs.read.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","enum":["active","paused","deleting"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":255},"required":false,"name":"source_trigger_id","in":"query"},{"schema":{"type":"string","enum":["created_at","name"],"default":"created_at"},"required":false,"name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"required":false,"name":"sort_order","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":100,"description":"Maximum schedules per page. Defaults to 100."},"required":false,"description":"Maximum schedules per page. Defaults to 100.","name":"limit","in":"query"},{"schema":{"type":"string","format":"uuid","description":"The `page_info.next` of the previous page: the id of its last schedule. Keep the filters, `sort_by` and `sort_order` the same across pages."},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Lists recurring project schedules that trigger task, workflow, or agent runs.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["active","paused","deleting"]},"target":{"type":"object","properties":{"kind":{"type":"string","enum":["task","workflow","agent"]},"id":{"type":"string","minLength":1,"maxLength":255},"conversation_mode":{"type":"string","enum":["create_new","existing","none"],"description":"Conversation behaviour for an agent target. Defaults to none. Use create_new for an agent that delegates with invoke_agent - a run with no conversation cannot be paused for delegation. Agent targets run headlessly by default; create_new or existing creates or appends a conversation message."},"conversation_id":{"type":["string","null"],"format":"uuid","description":"Existing conversation to continue. Only allowed when conversation_mode is existing, and required in that case."}},"required":["kind","id"],"additionalProperties":false},"schedule":{"type":"string"},"timezone":{"type":"string"},"runtime_target_kind":{"type":"string","enum":["main_branch","environment","preview_branch"]},"runtime_target_environment_id":{"type":["string","null"],"format":"uuid"},"runtime_target_branch_id":{"type":["string","null"],"format":"uuid"},"config":{"type":"object","additionalProperties":{}},"timeout_seconds":{"type":"integer"},"backoff_limit":{"type":"integer"},"concurrency_policy":{"type":"string"},"definition_source":{"type":"string","enum":["manual","source"]},"source_trigger_id":{"type":["string","null"]},"source_path":{"type":["string","null"]},"source_hash":{"type":["string","null"]},"last_scheduled_at":{"type":["string","null"]},"last_successful_at":{"type":["string","null"]},"health":{"type":["object","null"],"properties":{"maxStalenessSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["maxStalenessSeconds"],"additionalProperties":false},"max_runs":{"type":["integer","null"],"exclusiveMinimum":0},"run_count":{"type":"integer","minimum":0},"completed_at":{"type":["string","null"]},"paused_reason":{"type":["string","null"]},"paused_at":{"type":["string","null"]},"last_failure_at":{"type":["string","null"]},"last_failure_code":{"type":["string","null"]},"last_failure_message":{"type":["string","null"]},"last_failure_run_id":{"type":["string","null"],"format":"uuid"},"created_by":{"type":["string","null"],"format":"uuid"},"integration_requirements":{"type":"array","items":{"type":"object","properties":{"integration":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"required_scopes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":255},"maxItems":50,"default":[]},"resources":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"},"id":{"type":"string","minLength":1,"maxLength":512},"parent":{"type":"object","properties":{"kind":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"},"id":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","id"],"additionalProperties":false}},"required":["kind","id"],"additionalProperties":false},"maxItems":50,"default":[]}},"required":["integration"],"additionalProperties":false},"maxItems":20,"default":[]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","project_id","name","status","target","schedule","timezone","runtime_target_kind","runtime_target_environment_id","runtime_target_branch_id","config","timeout_seconds","backoff_limit","concurrency_policy","definition_source","source_trigger_id","source_path","source_hash","last_scheduled_at","last_successful_at","health","max_runs","run_count","completed_at","paused_reason","paused_at","last_failure_at","last_failure_code","last_failure_message","last_failure_run_id","created_by","created_at","updated_at"],"additionalProperties":false},"description":"The page of managed schedules."},"page_info":{"allOf":[{"$ref":"#/components/schemas/PageInfo"},{"description":"Pass `next` as `cursor`, with the same filters and sort, for the next page; it is null on the last page."}]}},"required":["data","page_info"]}}}},"400":{"description":"invalid_input: invalid query parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"unauthenticated","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"forbidden: a project member without project.runs.read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"not_found: project not found or not visible","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"internal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project schedules","x-canonical-documentation":{"domain":"execution","resource":"Triggers","subgroup":"Project schedules","name":"List schedules","description":"List the schedules stored for a project, newest first, to find a schedule or check its state and last runs; returns one page of schedules. Requires project.runs.read.","operationId":"listSchedules"}},"post":{"operationId":"createSchedule","tags":["execution/Triggers/Project schedules"],"summary":"Create schedule","description":"Create a recurring schedule that starts a task, a workflow or an agent on a cron expression, or, on REST and GraphQL only, activate a schedule declared in source (the MCP tool creates manual schedules only); returns the schedule: a new schedule is active, and a source schedule that was activated before keeps its current status. Requires project.runs.write.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"project_reference","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"description":"Human-readable schedule name."},"target":{"type":"object","properties":{"kind":{"type":"string","enum":["task","workflow","agent"],"description":"Kind of scheduled target."},"id":{"type":"string","minLength":1,"maxLength":255,"description":"Target identifier. For agent schedules, this is the agent ID."},"conversation_mode":{"type":"string","enum":["create_new","existing","none"],"description":"Conversation behaviour for an agent target. Defaults to none. Use create_new for an agent that delegates with invoke_agent - a run with no conversation cannot be paused for delegation. Agent targets run headlessly by default; create_new or existing creates or appends a conversation message."},"conversation_id":{"type":["string","null"],"format":"uuid","description":"Existing conversation to continue. Only allowed when conversation_mode is existing, and required in that case."}},"required":["kind","id"],"additionalProperties":false,"description":"Typed schedule target."},"schedule":{"type":"string","minLength":1,"maxLength":255,"description":"Schedule expression, for example a cron expression."},"timezone":{"type":"string","minLength":1,"maxLength":128,"description":"IANA timezone used to evaluate the schedule. Defaults to UTC."},"runtime_target_kind":{"type":"string","enum":["main_branch","environment","preview_branch"],"description":"Runtime target kind for scheduled runs."},"runtime_target_environment_id":{"type":["string","null"],"format":"uuid","description":"Environment ID when runtime_target_kind is environment."},"runtime_target_branch_id":{"type":["string","null"],"format":"uuid","description":"Branch ID when runtime_target_kind is preview_branch."},"config":{"type":"object","additionalProperties":{},"description":"Run configuration. For agent schedules, put the run prompt in config.prompt."},"timeout_seconds":{"type":"integer","exclusiveMinimum":0,"description":"Per-run timeout in seconds."},"backoff_limit":{"type":"integer","minimum":0,"description":"Retry backoff limit for failed scheduled runs."},"concurrency_policy":{"type":"string","enum":["Allow","Forbid","Replace"],"description":"How overlapping scheduled runs are handled."},"max_runs":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Optional maximum number of scheduled runs."},"definition_source":{"type":"string","enum":["manual","source"],"description":"manual (the default), or source to activate a schedule declared in source, which requires source_trigger_id, source_path and source_hash."},"source_trigger_id":{"type":"string","minLength":1,"maxLength":255,"description":"Trigger id from the source definition. When a schedule with this id already exists, creating it from source can return that schedule with its current status; a paused schedule remains paused."},"source_path":{"type":"string","minLength":1,"maxLength":1024,"description":"Source file path of the source schedule."},"source_hash":{"type":"string","minLength":1,"maxLength":255,"description":"Source definition hash of the source schedule."}},"required":["name","target","schedule"],"additionalProperties":false}}}},"responses":{"201":{"description":"Created an active recurring project schedule for a task, workflow, or agent target.","content":{"application/json":{"schema":{"type":"object","properties":{"schedule":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","enum":["active","paused","deleting"]},"target":{"type":"object","properties":{"kind":{"type":"string","enum":["task","workflow","agent"]},"id":{"type":"string","minLength":1,"maxLength":255},"conversation_mode":{"type":"string","enum":["create_new","existing","none"],"description":"Conversation behaviour for an agent target. Defaults to none. Use create_new for an agent that delegates with invoke_agent - a run with no conversation cannot be paused for delegation. Agent targets run headlessly by default; create_new or existing creates or appends a conversation message."},"conversation_id":{"type":["string","null"],"format":"uuid","description":"Existing conversation to continue. Only allowed when conversation_mode is existing, and required in that case."}},"required":["kind","id"],"additionalProperties":false},"schedule":{"type":"string"},"timezone":{"type":"string"},"runtime_target_kind":{"type":"string","enum":["main_branch","environment","preview_branch"]},"runtime_target_environment_id":{"type":["string","null"],"format":"uuid"},"runtime_target_branch_id":{"type":["string","null"],"format":"uuid"},"config":{"type":"object","additionalProperties":{}},"timeout_seconds":{"type":"integer"},"backoff_limit":{"type":"integer"},"concurrency_policy":{"type":"string"},"definition_source":{"type":"string","enum":["manual","source"]},"source_trigger_id":{"type":["string","null"]},"source_path":{"type":["string","null"]},"source_hash":{"type":["string","null"]},"last_scheduled_at":{"type":["string","null"]},"last_successful_at":{"type":["string","null"]},"health":{"type":["object","null"],"properties":{"maxStalenessSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["maxStalenessSeconds"],"additionalProperties":false},"max_runs":{"type":["integer","null"],"exclusiveMinimum":0},"run_count":{"type":"integer","minimum":0},"completed_at":{"type":["string","null"]},"paused_reason":{"type":["string","null"]},"paused_at":{"type":["string","null"]},"last_failure_at":{"type":["string","null"]},"last_failure_code":{"type":["string","null"]},"last_failure_message":{"type":["string","null"]},"last_failure_run_id":{"type":["string","null"],"format":"uuid"},"created_by":{"type":["string","null"],"format":"uuid"},"integration_requirements":{"type":"array","items":{"type":"object","properties":{"integration":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"required_scopes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":255},"maxItems":50,"default":[]},"resources":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"},"id":{"type":"string","minLength":1,"maxLength":512},"parent":{"type":"object","properties":{"kind":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"},"id":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","id"],"additionalProperties":false}},"required":["kind","id"],"additionalProperties":false},"maxItems":50,"default":[]}},"required":["integration"],"additionalProperties":false},"maxItems":20,"default":[]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","project_id","name","status","target","schedule","timezone","runtime_target_kind","runtime_target_environment_id","runtime_target_branch_id","config","timeout_seconds","backoff_limit","concurrency_policy","definition_source","source_trigger_id","source_path","source_hash","last_scheduled_at","last_successful_at","health","max_runs","run_count","completed_at","paused_reason","paused_at","last_failure_at","last_failure_code","last_failure_message","last_failure_run_id","created_by","created_at","updated_at"],"additionalProperties":false,"description":"The created schedule. New schedules are active by default."}},"required":["schedule"]}}}},"400":{"description":"invalid_input: invalid body or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"unauthenticated","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"forbidden: a project member without project.runs.write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"not_found: project or target not found or not visible","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"internal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project schedules","x-canonical-documentation":{"domain":"execution","resource":"Triggers","subgroup":"Project schedules","name":"Create schedule","description":"Create a recurring schedule that starts a task, a workflow or an agent on a cron expression, or, on REST and GraphQL only, activate a schedule declared in source (the MCP tool creates manual schedules only); returns the schedule: a new schedule is active, and a source schedule that was activated before keeps its current status. Requires project.runs.write.","operationId":"createSchedule"}}},"/projects/{project_reference}/source-schedules":{"get":{"operationId":"listSourceSchedules","tags":["execution/Triggers/Project schedules"],"summary":"List source schedules","description":"List the schedules declared in the source files of a project, a branch or an environment to see what can be activated; returns every declared schedule as one page with the discovery diagnostics. Requires project.runs.read.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":["string","null"],"enum":["main_branch","environment","preview_branch",null],"description":"Runtime target to read from when source_target_kind is omitted."},"required":false,"description":"Runtime target to read from when source_target_kind is omitted.","name":"runtime_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Environment ID when the target kind is environment."},"required":false,"description":"Environment ID when the target kind is environment.","name":"target_environment_id","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Branch ID when the target kind is preview_branch."},"required":false,"description":"Branch ID when the target kind is preview_branch.","name":"target_branch_id","in":"query"},{"schema":{"type":"string","enum":["project","main_branch","environment","preview_branch"],"description":"Source to read: project, main_branch, environment or preview_branch. Defaults to runtime_target_kind, then project."},"required":false,"description":"Source to read: project, main_branch, environment or preview_branch. Defaults to runtime_target_kind, then project.","name":"source_target_kind","in":"query"}],"responses":{"200":{"description":"Schedules declared in project source","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"},"description":{"type":["string","null"]},"target":{"type":"object","properties":{"kind":{"type":"string","enum":["task","workflow","agent"],"description":"Kind of scheduled target."},"id":{"type":"string","minLength":1,"maxLength":255,"description":"Target identifier. For agent schedules, this is the agent ID."},"conversation_mode":{"type":"string","enum":["create_new","existing","none"],"description":"Conversation behaviour for an agent target. Defaults to none. Use create_new for an agent that delegates with invoke_agent - a run with no conversation cannot be paused for delegation. Agent targets run headlessly by default; create_new or existing creates or appends a conversation message."},"conversation_id":{"type":["string","null"],"format":"uuid","description":"Existing conversation to continue. Only allowed when conversation_mode is existing, and required in that case."}},"required":["kind","id"],"additionalProperties":false,"description":"Typed schedule target."},"schedule":{"type":"string"},"timezone":{"type":"string"},"runtime_target_kind":{"type":"string","enum":["main_branch","environment","preview_branch"]},"runtime_target_environment_id":{"type":["string","null"],"format":"uuid"},"runtime_target_branch_id":{"type":["string","null"],"format":"uuid"},"config":{"type":"object","additionalProperties":{}},"timeout_seconds":{"type":"integer","exclusiveMinimum":0},"backoff_limit":{"type":"integer","minimum":0},"concurrency_policy":{"type":"string"},"max_runs":{"type":["integer","null"],"exclusiveMinimum":0},"health":{"type":["object","null"],"properties":{"maxStalenessSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["maxStalenessSeconds"],"additionalProperties":false},"definition_source":{"type":"string","enum":["source"]},"source_trigger_id":{"type":"string"},"source_path":{"type":"string"},"source_hash":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]}},"required":["id","name","description","target","schedule","timezone","runtime_target_kind","runtime_target_environment_id","runtime_target_branch_id","config","timeout_seconds","backoff_limit","concurrency_policy","max_runs","health","definition_source","source_trigger_id","source_path","source_hash","edit_mode"],"additionalProperties":false},"description":"Schedules declared in project source files."},"page_info":{"allOf":[{"$ref":"#/components/schemas/PageInfo"},{"description":"The single page of the list: next is always null."}]},"diagnostics":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["source_file_diagnostic","source_agent_discovery_error","source_trigger_discovery_error"]},"source_kind":{"type":"string","enum":["agent","prompt","tool","task","workflow","resource","skill","eval","schedule","webhook"]},"source_path":{"type":"string","minLength":1},"source_id":{"type":"string","minLength":1},"code":{"type":"string","enum":["parse_error","invalid_definition","dynamic_definition","duplicate_source_id","unsupported_target","manual_conflict"]},"message":{"type":"string","minLength":1},"details":{"type":"object","additionalProperties":{}}},"required":["kind","source_kind","source_path","code","message"]},"description":"Source discovery diagnostics."}},"required":["data","page_info","diagnostics"]}}}},"400":{"description":"invalid_input: invalid source selection","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"unauthenticated","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"forbidden: a project member without project.runs.read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"not_found: project or source target not found or not visible","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"internal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project schedules","x-canonical-documentation":{"domain":"execution","resource":"Triggers","subgroup":"Project schedules","name":"List source schedules","description":"List the schedules declared in the source files of a project, a branch or an environment to see what can be activated; returns every declared schedule as one page with the discovery diagnostics. Requires project.runs.read.","operationId":"listSourceSchedules"}}},"/projects/{project_reference}/schedules/{schedule_id}":{"get":{"operationId":"getSchedule","tags":["execution/Triggers/Project schedules"],"summary":"Get schedule","description":"Read one schedule by its ID to inspect its target, cron expression, runtime target, state and last failure; returns the schedule. Requires project.runs.read.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Schedule ID."},"required":true,"description":"Schedule ID.","name":"schedule_id","in":"path"}],"responses":{"200":{"description":"Project schedule","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Schedule ID."},"project_id":{"type":"string","format":"uuid","description":"Owning project ID."},"name":{"type":"string","description":"Human-readable schedule name."},"status":{"type":"string","enum":["active","paused","deleting"],"description":"Schedule status."},"paused_reason":{"type":["string","null"],"description":"System pause reason when Veryfront pauses the schedule."},"paused_at":{"type":["string","null"],"description":"Timestamp when Veryfront paused the schedule."},"last_failure_at":{"type":["string","null"],"description":"Timestamp of the most recent schedule failure."},"last_failure_code":{"type":["string","null"],"description":"Most recent schedule failure code."},"last_failure_message":{"type":["string","null"],"description":"Most recent schedule failure message."},"last_failure_run_id":{"type":["string","null"],"format":"uuid","description":"Canonical run ID for the most recent schedule failure."},"target":{"type":"object","properties":{"kind":{"type":"string","enum":["task","workflow","agent"],"description":"Kind of scheduled target."},"id":{"type":"string","minLength":1,"maxLength":255,"description":"Target identifier. For agent schedules, this is the agent ID."},"conversation_mode":{"type":"string","enum":["create_new","existing","none"],"description":"Conversation behaviour for an agent target. Defaults to none. Use create_new for an agent that delegates with invoke_agent - a run with no conversation cannot be paused for delegation. Agent targets run headlessly by default; create_new or existing creates or appends a conversation message."},"conversation_id":{"type":["string","null"],"format":"uuid","description":"Existing conversation to continue. Only allowed when conversation_mode is existing, and required in that case."}},"required":["kind","id"],"additionalProperties":false,"description":"Typed schedule target."},"schedule":{"type":"string","description":"Schedule expression."},"timezone":{"type":"string","description":"IANA timezone."},"runtime_target_kind":{"type":"string","enum":["main_branch","environment","preview_branch"],"description":"Runtime target kind."},"runtime_target_environment_id":{"type":["string","null"],"format":"uuid","description":"Environment ID for environment schedules."},"runtime_target_branch_id":{"type":["string","null"],"format":"uuid","description":"Branch ID for preview branch schedules."},"config":{"type":"object","additionalProperties":{},"description":"Run configuration without internal schedule target metadata."},"timeout_seconds":{"type":"integer","description":"Per-run timeout in seconds."},"backoff_limit":{"type":"integer","description":"Retry backoff limit."},"concurrency_policy":{"type":"string","description":"How overlapping scheduled runs are handled."},"definition_source":{"type":"string","enum":["manual","source"],"description":"Whether the schedule is manually managed or source-defined."},"source_trigger_id":{"type":["string","null"],"description":"Source trigger ID for source-defined schedules."},"source_path":{"type":["string","null"],"description":"Source file path for source-defined schedules."},"source_hash":{"type":["string","null"],"description":"Source definition hash for source-defined schedules."},"last_scheduled_at":{"type":["string","null"],"description":"Last scheduled fire time."},"last_successful_at":{"type":["string","null"],"description":"Last successful run time."},"health":{"type":["object","null"],"properties":{"maxStalenessSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["maxStalenessSeconds"],"additionalProperties":false,"description":"Optional staleness budget used for schedule health alerting."},"max_runs":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Optional maximum run count."},"run_count":{"type":"integer","minimum":0,"description":"Fire reservations counted toward the repetition limit; released reservations are subtracted."},"completed_at":{"type":["string","null"],"description":"Completion time for finite schedules."},"created_by":{"type":["string","null"],"format":"uuid","description":"User that created the schedule."},"integration_requirements":{"type":"array","items":{"type":"object","properties":{"integration":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"required_scopes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":255},"maxItems":50,"default":[]},"resources":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"},"id":{"type":"string","minLength":1,"maxLength":512},"parent":{"type":"object","properties":{"kind":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"},"id":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","id"],"additionalProperties":false}},"required":["kind","id"],"additionalProperties":false},"maxItems":50,"default":[]}},"required":["integration"],"additionalProperties":false},"maxItems":20,"default":[],"description":"OAuth scopes and exact provider resources required before the schedule can run."},"created_at":{"type":"string","description":"Creation timestamp."},"updated_at":{"type":"string","description":"Last update timestamp."}},"required":["id","project_id","name","status","paused_reason","paused_at","last_failure_at","last_failure_code","last_failure_message","last_failure_run_id","target","schedule","timezone","runtime_target_kind","runtime_target_environment_id","runtime_target_branch_id","config","timeout_seconds","backoff_limit","concurrency_policy","definition_source","source_trigger_id","source_path","source_hash","last_scheduled_at","last_successful_at","health","max_runs","run_count","completed_at","created_by","created_at","updated_at"],"additionalProperties":false,"description":"Recurring project schedule."}}}},"400":{"description":"invalid_input: invalid schedule_id","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"unauthenticated","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"forbidden: a project member without project.runs.read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"not_found: project or schedule not found or not visible","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"internal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project schedules","x-canonical-documentation":{"domain":"execution","resource":"Triggers","subgroup":"Project schedules","name":"Get schedule","description":"Read one schedule by its ID to inspect its target, cron expression, runtime target, state and last failure; returns the schedule. Requires project.runs.read.","operationId":"getSchedule"}},"patch":{"operationId":"updateSchedule","tags":["execution/Triggers/Project schedules"],"summary":"Update schedule","description":"Change the fields of a schedule, or pause and resume it with the status, where an omitted field keeps its value; returns the updated schedule. Requires project.runs.write.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Schedule ID."},"required":true,"description":"Schedule ID.","name":"schedule_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"description":"Human-readable schedule name."},"target":{"type":"object","properties":{"kind":{"type":"string","enum":["task","workflow","agent"],"description":"Kind of scheduled target."},"id":{"type":"string","minLength":1,"maxLength":255,"description":"Target identifier. For agent schedules, this is the agent ID."},"conversation_mode":{"type":"string","enum":["create_new","existing","none"],"description":"Conversation behaviour for an agent target. Defaults to none. Use create_new for an agent that delegates with invoke_agent - a run with no conversation cannot be paused for delegation. Agent targets run headlessly by default; create_new or existing creates or appends a conversation message."},"conversation_id":{"type":["string","null"],"format":"uuid","description":"Existing conversation to continue. Only allowed when conversation_mode is existing, and required in that case."}},"required":["kind","id"],"additionalProperties":false,"description":"Typed schedule target."},"schedule":{"type":"string","minLength":1,"maxLength":255,"description":"Schedule expression, for example a cron expression."},"timezone":{"type":"string","minLength":1,"maxLength":128,"description":"IANA timezone used to evaluate the schedule."},"runtime_target_kind":{"type":"string","enum":["main_branch","environment","preview_branch"],"description":"Runtime target kind for scheduled runs."},"runtime_target_environment_id":{"type":["string","null"],"format":"uuid","description":"Environment ID when runtime_target_kind is environment."},"runtime_target_branch_id":{"type":["string","null"],"format":"uuid","description":"Branch ID when runtime_target_kind is preview_branch."},"config":{"type":"object","additionalProperties":{},"description":"Run configuration. For agent schedules, put the run prompt in config.prompt."},"timeout_seconds":{"type":"integer","exclusiveMinimum":0,"description":"Per-run timeout in seconds."},"backoff_limit":{"type":"integer","minimum":0,"description":"Retry backoff limit for failed scheduled runs."},"concurrency_policy":{"type":"string","enum":["Allow","Forbid","Replace"],"description":"How overlapping scheduled runs are handled."},"max_runs":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Optional maximum number of scheduled runs."},"status":{"type":"string","enum":["active","paused"],"description":"Updated schedule status."}},"additionalProperties":false}}}},"responses":{"200":{"description":"Updated schedule. Requires project run-write authorization, retaining source ownership and runtime target rules.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Schedule ID."},"project_id":{"type":"string","format":"uuid","description":"Owning project ID."},"name":{"type":"string","description":"Human-readable schedule name."},"status":{"type":"string","enum":["active","paused","deleting"],"description":"Schedule status."},"paused_reason":{"type":["string","null"],"description":"System pause reason when Veryfront pauses the schedule."},"paused_at":{"type":["string","null"],"description":"Timestamp when Veryfront paused the schedule."},"last_failure_at":{"type":["string","null"],"description":"Timestamp of the most recent schedule failure."},"last_failure_code":{"type":["string","null"],"description":"Most recent schedule failure code."},"last_failure_message":{"type":["string","null"],"description":"Most recent schedule failure message."},"last_failure_run_id":{"type":["string","null"],"format":"uuid","description":"Canonical run ID for the most recent schedule failure."},"target":{"type":"object","properties":{"kind":{"type":"string","enum":["task","workflow","agent"],"description":"Kind of scheduled target."},"id":{"type":"string","minLength":1,"maxLength":255,"description":"Target identifier. For agent schedules, this is the agent ID."},"conversation_mode":{"type":"string","enum":["create_new","existing","none"],"description":"Conversation behaviour for an agent target. Defaults to none. Use create_new for an agent that delegates with invoke_agent - a run with no conversation cannot be paused for delegation. Agent targets run headlessly by default; create_new or existing creates or appends a conversation message."},"conversation_id":{"type":["string","null"],"format":"uuid","description":"Existing conversation to continue. Only allowed when conversation_mode is existing, and required in that case."}},"required":["kind","id"],"additionalProperties":false,"description":"Typed schedule target."},"schedule":{"type":"string","description":"Schedule expression."},"timezone":{"type":"string","description":"IANA timezone."},"runtime_target_kind":{"type":"string","enum":["main_branch","environment","preview_branch"],"description":"Runtime target kind."},"runtime_target_environment_id":{"type":["string","null"],"format":"uuid","description":"Environment ID for environment schedules."},"runtime_target_branch_id":{"type":["string","null"],"format":"uuid","description":"Branch ID for preview branch schedules."},"config":{"type":"object","additionalProperties":{},"description":"Run configuration without internal schedule target metadata."},"timeout_seconds":{"type":"integer","description":"Per-run timeout in seconds."},"backoff_limit":{"type":"integer","description":"Retry backoff limit."},"concurrency_policy":{"type":"string","description":"How overlapping scheduled runs are handled."},"definition_source":{"type":"string","enum":["manual","source"],"description":"Whether the schedule is manually managed or source-defined."},"source_trigger_id":{"type":["string","null"],"description":"Source trigger ID for source-defined schedules."},"source_path":{"type":["string","null"],"description":"Source file path for source-defined schedules."},"source_hash":{"type":["string","null"],"description":"Source definition hash for source-defined schedules."},"last_scheduled_at":{"type":["string","null"],"description":"Last scheduled fire time."},"last_successful_at":{"type":["string","null"],"description":"Last successful run time."},"health":{"type":["object","null"],"properties":{"maxStalenessSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["maxStalenessSeconds"],"additionalProperties":false,"description":"Optional staleness budget used for schedule health alerting."},"max_runs":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Optional maximum run count."},"run_count":{"type":"integer","minimum":0,"description":"Fire reservations counted toward the repetition limit; released reservations are subtracted."},"completed_at":{"type":["string","null"],"description":"Completion time for finite schedules."},"created_by":{"type":["string","null"],"format":"uuid","description":"User that created the schedule."},"integration_requirements":{"type":"array","items":{"type":"object","properties":{"integration":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9][a-z0-9_-]*$"},"required_scopes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":255},"maxItems":50,"default":[]},"resources":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"},"id":{"type":"string","minLength":1,"maxLength":512},"parent":{"type":"object","properties":{"kind":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"},"id":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","id"],"additionalProperties":false}},"required":["kind","id"],"additionalProperties":false},"maxItems":50,"default":[]}},"required":["integration"],"additionalProperties":false},"maxItems":20,"default":[],"description":"OAuth scopes and exact provider resources required before the schedule can run."},"created_at":{"type":"string","description":"Creation timestamp."},"updated_at":{"type":"string","description":"Last update timestamp."}},"required":["id","project_id","name","status","paused_reason","paused_at","last_failure_at","last_failure_code","last_failure_message","last_failure_run_id","target","schedule","timezone","runtime_target_kind","runtime_target_environment_id","runtime_target_branch_id","config","timeout_seconds","backoff_limit","concurrency_policy","definition_source","source_trigger_id","source_path","source_hash","last_scheduled_at","last_successful_at","health","max_runs","run_count","completed_at","created_by","created_at","updated_at"],"additionalProperties":false,"description":"Recurring project schedule."}}}},"400":{"description":"invalid_input: invalid body or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"unauthenticated","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"forbidden: a project member without project.runs.write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"not_found: project or schedule not found or not visible","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"internal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project schedules","x-canonical-documentation":{"domain":"execution","resource":"Triggers","subgroup":"Project schedules","name":"Update schedule","description":"Change the fields of a schedule, or pause and resume it with the status, where an omitted field keeps its value; returns the updated schedule. Requires project.runs.write.","operationId":"updateSchedule"}},"delete":{"operationId":"deleteSchedule","tags":["execution/Triggers/Project schedules"],"summary":"Delete schedule","description":"Delete a schedule that is no longer needed so that it starts no more runs; returns the acknowledgement ok: true. Requires project.runs.write; API keys also need delete scope.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Schedule ID."},"required":true,"description":"Schedule ID.","name":"schedule_id","in":"path"}],"responses":{"200":{"description":"Deleted schedule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"invalid_input: invalid schedule_id","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"unauthenticated","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"forbidden: a project member without project.runs.write or an API key without the delete scope. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"not_found: project or schedule not found or not visible","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"internal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project schedules","x-canonical-documentation":{"domain":"execution","resource":"Triggers","subgroup":"Project schedules","name":"Delete schedule","description":"Delete a schedule that is no longer needed so that it starts no more runs; returns the acknowledgement ok: true. Requires project.runs.write; API keys also need delete scope.","operationId":"deleteSchedule"}}},"/projects/{project_reference}/webhooks":{"get":{"operationId":"listWebhooks","tags":["execution/Triggers/Webhooks"],"summary":"List webhooks","description":"List the webhooks stored for a project, newest first, to find a webhook or its public URL; returns one page of webhooks, or every webhook when neither a limit nor a cursor is sent. Requires project.agents.read.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum webhooks to return, from 1 to 100. Without `limit` and `cursor` the response lists every webhook; with a `cursor` alone, the page holds up to 100."},"required":false,"description":"Maximum webhooks to return, from 1 to 100. Without `limit` and `cursor` the response lists every webhook; with a `cursor` alone, the page holds up to 100.","name":"limit","in":"query"},{"schema":{"type":"string","format":"uuid","description":"The `page_info.next` of the previous page: the id of its last webhook. Keep `sort_order` the same across pages."},"required":false,"description":"The `page_info.next` of the previous page: the id of its last webhook. Keep `sort_order` the same across pages.","name":"cursor","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"description":"Creation order: desc (newest first, the default) or asc."},"required":false,"description":"Creation order: desc (newest first, the default) or asc.","name":"sort_order","in":"query"}],"responses":{"200":{"description":"A page of webhooks","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The webhook id. Pass it as webhook_id to the other webhook operations."},"project_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"source":{"type":"string","enum":["webhook"]},"target":{"type":"object","properties":{"kind":{"type":"string","enum":["agent","task","workflow","event"],"description":"Target kind invoked or stored by the webhook."},"id":{"type":"string","minLength":1,"maxLength":128,"description":"Target identifier: agent id, task target, workflow id, or event for store-only webhooks."},"conversation_mode":{"type":"string","enum":["create_new","existing","none"],"description":"Conversation behaviour for an agent target. Defaults to none. Use create_new for an agent that delegates with invoke_agent - a run with no conversation cannot be paused for delegation. Agent targets run headlessly by default; create_new or existing creates or appends a conversation message. Agent targets with conversation mode create_new or existing also require project.conversations.write."},"conversation_id":{"type":["string","null"],"format":"uuid","description":"Existing conversation to continue. Only allowed when conversation_mode is existing, and required in that case."}},"required":["kind","id"],"additionalProperties":false},"prompt_template":{"type":["string","null"]},"event_filter":{"type":["object","null"],"properties":{"mode":{"type":"string","enum":["all","any"],"description":"Whether all or any filter conditions must match."},"conditions":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":255,"description":"Dot path in the incoming payload, for example action or pull_request.state."},"operator":{"type":"string","enum":["equals","not_equals","in","exists","contains"],"description":"Comparison operator."},"value":{"description":"Comparison value for operators that require one."}},"required":["path","operator"],"additionalProperties":false},"maxItems":50,"description":"Filter conditions applied before webhook work is created."}},"required":["mode","conditions"],"additionalProperties":false,"description":"Optional incoming event filter. Missing, null, or empty conditions accept every event."},"status":{"type":"string","enum":["draft","enabled","disabled"]},"runtime_target_kind":{"type":"string","enum":["main_branch","environment","preview_branch"]},"runtime_target_environment_id":{"type":["string","null"],"format":"uuid"},"runtime_target_branch_id":{"type":["string","null"],"format":"uuid"},"definition_source":{"type":"string","enum":["manual","source"]},"source_trigger_id":{"type":["string","null"]},"source_path":{"type":["string","null"]},"source_hash":{"type":["string","null"]},"ingress_id":{"type":"string","description":"The public id in webhook_url that external senders post to."},"webhook_url":{"type":"string"},"created_by_user_id":{"type":"string","format":"uuid"},"enabled_at":{"type":["string","null"]},"disabled_at":{"type":["string","null"]},"disabled_reason":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","project_id","name","source","target","prompt_template","event_filter","status","runtime_target_kind","runtime_target_environment_id","runtime_target_branch_id","definition_source","source_trigger_id","source_path","source_hash","ingress_id","webhook_url","created_by_user_id","enabled_at","disabled_at","disabled_reason","created_at","updated_at"]},"description":"The page of webhooks, newest first by default."},"page_info":{"allOf":[{"$ref":"#/components/schemas/PageInfo"},{"description":"Pass `next` as `cursor` for the next page; it is null on the last page and whenever neither `limit` nor `cursor` is sent."}]}},"required":["data","page_info"]}}}},"400":{"description":"invalid_input: invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"unauthenticated","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"forbidden: a project member without project.agents.read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"not_found: project or webhook not found or not visible","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"internal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Webhooks","x-canonical-documentation":{"domain":"execution","resource":"Triggers","subgroup":"Webhooks","name":"List webhooks","description":"List the webhooks stored for a project, newest first, to find a webhook or its public URL; returns one page of webhooks, or every webhook when neither a limit nor a cursor is sent. Requires project.agents.read.","operationId":"listWebhooks"}},"post":{"operationId":"createWebhook","tags":["execution/Triggers/Webhooks"],"summary":"Create webhook","description":"Create a webhook when an external service must start an agent, task or workflow run, or when its deliveries must only be stored as webhook events; returns the webhook and its secret, which is shown only once. Requires project.agents.write.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"project_reference","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"Webhook name, 1-120 characters."},"target":{"type":"object","properties":{"kind":{"type":"string","enum":["agent","task","workflow","event"],"description":"Target kind invoked or stored by the webhook."},"id":{"type":"string","minLength":1,"maxLength":128,"description":"Target identifier: agent id, task target, workflow id, or event for store-only webhooks."},"conversation_mode":{"type":"string","enum":["create_new","existing","none"],"description":"Conversation behaviour for an agent target. Defaults to none. Use create_new for an agent that delegates with invoke_agent - a run with no conversation cannot be paused for delegation. Agent targets run headlessly by default; create_new or existing creates or appends a conversation message. Agent targets with conversation mode create_new or existing also require project.conversations.write."},"conversation_id":{"type":["string","null"],"format":"uuid","description":"Existing conversation to continue. Only allowed when conversation_mode is existing, and required in that case."}},"required":["kind","id"],"additionalProperties":false,"description":"Target invoked by a webhook definition."},"prompt_template":{"type":"string","minLength":1,"maxLength":20000,"description":"Prompt template for run targets: required unless target.kind is event, where it is not supported."},"event_filter":{"type":["object","null"],"properties":{"mode":{"type":"string","enum":["all","any"],"description":"Whether all or any filter conditions must match."},"conditions":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":255,"description":"Dot path in the incoming payload, for example action or pull_request.state."},"operator":{"type":"string","enum":["equals","not_equals","in","exists","contains"],"description":"Comparison operator."},"value":{"description":"Comparison value for operators that require one."}},"required":["path","operator"],"additionalProperties":false},"maxItems":50,"description":"Filter conditions applied before webhook work is created."}},"required":["mode","conditions"],"additionalProperties":false,"description":"Optional incoming event filter. Missing, null, or empty conditions accept every event."}},"required":["name","target"],"additionalProperties":false}}}},"responses":{"201":{"description":"Created webhook","content":{"application/json":{"schema":{"type":"object","properties":{"webhook":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The webhook id. Pass it as webhook_id to the other webhook operations."},"project_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"source":{"type":"string","enum":["webhook"]},"target":{"type":"object","properties":{"kind":{"type":"string","enum":["agent","task","workflow","event"],"description":"Target kind invoked or stored by the webhook."},"id":{"type":"string","minLength":1,"maxLength":128,"description":"Target identifier: agent id, task target, workflow id, or event for store-only webhooks."},"conversation_mode":{"type":"string","enum":["create_new","existing","none"],"description":"Conversation behaviour for an agent target. Defaults to none. Use create_new for an agent that delegates with invoke_agent - a run with no conversation cannot be paused for delegation. Agent targets run headlessly by default; create_new or existing creates or appends a conversation message. Agent targets with conversation mode create_new or existing also require project.conversations.write."},"conversation_id":{"type":["string","null"],"format":"uuid","description":"Existing conversation to continue. Only allowed when conversation_mode is existing, and required in that case."}},"required":["kind","id"],"additionalProperties":false},"prompt_template":{"type":["string","null"]},"event_filter":{"type":["object","null"],"properties":{"mode":{"type":"string","enum":["all","any"],"description":"Whether all or any filter conditions must match."},"conditions":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":255,"description":"Dot path in the incoming payload, for example action or pull_request.state."},"operator":{"type":"string","enum":["equals","not_equals","in","exists","contains"],"description":"Comparison operator."},"value":{"description":"Comparison value for operators that require one."}},"required":["path","operator"],"additionalProperties":false},"maxItems":50,"description":"Filter conditions applied before webhook work is created."}},"required":["mode","conditions"],"additionalProperties":false,"description":"Optional incoming event filter. Missing, null, or empty conditions accept every event."},"status":{"type":"string","enum":["draft","enabled","disabled"]},"runtime_target_kind":{"type":"string","enum":["main_branch","environment","preview_branch"]},"runtime_target_environment_id":{"type":["string","null"],"format":"uuid"},"runtime_target_branch_id":{"type":["string","null"],"format":"uuid"},"definition_source":{"type":"string","enum":["manual","source"]},"source_trigger_id":{"type":["string","null"]},"source_path":{"type":["string","null"]},"source_hash":{"type":["string","null"]},"ingress_id":{"type":"string","description":"The public id in webhook_url that external senders post to."},"webhook_url":{"type":"string"},"created_by_user_id":{"type":"string","format":"uuid"},"enabled_at":{"type":["string","null"]},"disabled_at":{"type":["string","null"]},"disabled_reason":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","project_id","name","source","target","prompt_template","event_filter","status","runtime_target_kind","runtime_target_environment_id","runtime_target_branch_id","definition_source","source_trigger_id","source_path","source_hash","ingress_id","webhook_url","created_by_user_id","enabled_at","disabled_at","disabled_reason","created_at","updated_at"]},"webhook_secret":{"type":"string","description":"Secret for the X-Veryfront-Webhook-Secret header. Returned only once, on create; store it now."}},"required":["webhook","webhook_secret"]}}}},"400":{"description":"invalid_input: invalid body or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"unauthenticated","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"forbidden: a project member without the required capability","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"not_found: project or webhook not found or not visible","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"internal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Webhooks","x-canonical-documentation":{"domain":"execution","resource":"Triggers","subgroup":"Webhooks","name":"Create webhook","description":"Create a webhook when an external service must start an agent, task or workflow run, or when its deliveries must only be stored as webhook events; returns the webhook and its secret, which is shown only once. Requires project.agents.write.","operationId":"createWebhook"}}},"/projects/{project_reference}/source-webhooks":{"get":{"operationId":"listSourceWebhooks","tags":["execution/Triggers/Webhooks"],"summary":"List source webhooks","description":"List the webhooks declared in the source files of a project, a branch or an environment to see what a deployment creates; returns the declared webhooks, the discovery diagnostics and the source files that could not be read, without pagination. Requires project.agents.read.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":["string","null"],"enum":["main_branch","environment","preview_branch",null],"description":"Runtime target: main_branch, environment or preview_branch. Must match source_target_kind when both are sent."},"required":false,"description":"Runtime target: main_branch, environment or preview_branch. Must match source_target_kind when both are sent.","name":"runtime_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Environment id, for the environment source target."},"required":false,"description":"Environment id, for the environment source target.","name":"target_environment_id","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Branch id, for the preview_branch source target."},"required":false,"description":"Branch id, for the preview_branch source target.","name":"target_branch_id","in":"query"},{"schema":{"type":"string","enum":["project","main_branch","environment","preview_branch"],"description":"Source to read: project, main_branch, environment or preview_branch. Defaults to runtime_target_kind, then main_branch."},"required":false,"description":"Source to read: project, main_branch, environment or preview_branch. Defaults to runtime_target_kind, then main_branch.","name":"source_target_kind","in":"query"}],"responses":{"200":{"description":"Webhooks declared in project source","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"},"description":{"type":["string","null"]},"target":{"type":"object","properties":{"kind":{"type":"string","enum":["agent","task","workflow","event"],"description":"Target kind invoked or stored by the webhook."},"id":{"type":"string","minLength":1,"maxLength":128,"description":"Target identifier: agent id, task target, workflow id, or event for store-only webhooks."},"conversation_mode":{"type":"string","enum":["create_new","existing","none"],"description":"Conversation behaviour for an agent target. Defaults to none. Use create_new for an agent that delegates with invoke_agent - a run with no conversation cannot be paused for delegation. Agent targets run headlessly by default; create_new or existing creates or appends a conversation message. Agent targets with conversation mode create_new or existing also require project.conversations.write."},"conversation_id":{"type":["string","null"],"format":"uuid","description":"Existing conversation to continue. Only allowed when conversation_mode is existing, and required in that case."}},"required":["kind","id"],"additionalProperties":false},"prompt_template":{"type":["string","null"]},"event_filter":{},"definition_source":{"type":"string","enum":["source"]},"source_trigger_id":{"type":"string"},"source_path":{"type":"string"},"source_hash":{"type":"string"},"edit_mode":{"type":"string","enum":["structured","source_only"]}},"required":["id","name","description","target","prompt_template","definition_source","source_trigger_id","source_path","source_hash","edit_mode"]},"description":"Webhooks declared in project source files."},"diagnostics":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["source_file_diagnostic","source_agent_discovery_error","source_trigger_discovery_error"]},"source_kind":{"type":"string","enum":["agent","prompt","tool","task","workflow","resource","skill","eval","schedule","webhook"]},"source_path":{"type":"string","minLength":1},"source_id":{"type":"string","minLength":1},"code":{"type":"string","enum":["parse_error","invalid_definition","dynamic_definition","duplicate_source_id","unsupported_target","manual_conflict"]},"message":{"type":"string","minLength":1},"details":{"type":"object","additionalProperties":{}}},"required":["kind","source_kind","source_path","code","message"]},"description":"Source discovery diagnostics."},"errors":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["source_file_diagnostic","source_agent_discovery_error","source_trigger_discovery_error"]},"source_kind":{"type":"string","enum":["agent","prompt","tool","task","workflow","resource","skill","eval","schedule","webhook"]},"source_path":{"type":"string","minLength":1},"source_id":{"type":"string","minLength":1},"code":{"type":"string","enum":["parse_error","invalid_definition","dynamic_definition","duplicate_source_id","unsupported_target","manual_conflict"]},"message":{"type":"string","minLength":1},"details":{"type":"object","additionalProperties":{}}},"required":["kind","source_kind","source_path","code","message"]},"description":"Source files that could not be read or parsed."}},"required":["data","diagnostics","errors"]}}}},"400":{"description":"invalid_input: invalid source selection","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"unauthenticated","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"forbidden: a project member without project.agents.read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"not_found: project or source target not found or not visible","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"internal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Webhooks","x-canonical-documentation":{"domain":"execution","resource":"Triggers","subgroup":"Webhooks","name":"List source webhooks","description":"List the webhooks declared in the source files of a project, a branch or an environment to see what a deployment creates; returns the declared webhooks, the discovery diagnostics and the source files that could not be read, without pagination. Requires project.agents.read.","operationId":"listSourceWebhooks"}}},"/projects/{project_reference}/webhooks/{webhook_id}":{"get":{"operationId":"getWebhook","tags":["execution/Triggers/Webhooks"],"summary":"Get webhook","description":"Read one webhook by its ID to inspect its target, prompt template, event filter and status; returns the webhook with its public URL and never its secret. Requires project.agents.read.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The webhook id (`id` on the webhook, formerly `webhook_definition_id`). A missing webhook is not found."},"required":true,"description":"The webhook id (`id` on the webhook, formerly `webhook_definition_id`). A missing webhook is not found.","name":"webhook_id","in":"path"}],"responses":{"200":{"description":"Webhook","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The webhook id. Pass it as webhook_id to the other webhook operations."},"project_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"source":{"type":"string","enum":["webhook"]},"target":{"type":"object","properties":{"kind":{"type":"string","enum":["agent","task","workflow","event"],"description":"Target kind invoked or stored by the webhook."},"id":{"type":"string","minLength":1,"maxLength":128,"description":"Target identifier: agent id, task target, workflow id, or event for store-only webhooks."},"conversation_mode":{"type":"string","enum":["create_new","existing","none"],"description":"Conversation behaviour for an agent target. Defaults to none. Use create_new for an agent that delegates with invoke_agent - a run with no conversation cannot be paused for delegation. Agent targets run headlessly by default; create_new or existing creates or appends a conversation message. Agent targets with conversation mode create_new or existing also require project.conversations.write."},"conversation_id":{"type":["string","null"],"format":"uuid","description":"Existing conversation to continue. Only allowed when conversation_mode is existing, and required in that case."}},"required":["kind","id"],"additionalProperties":false},"prompt_template":{"type":["string","null"]},"event_filter":{"type":["object","null"],"properties":{"mode":{"type":"string","enum":["all","any"],"description":"Whether all or any filter conditions must match."},"conditions":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":255,"description":"Dot path in the incoming payload, for example action or pull_request.state."},"operator":{"type":"string","enum":["equals","not_equals","in","exists","contains"],"description":"Comparison operator."},"value":{"description":"Comparison value for operators that require one."}},"required":["path","operator"],"additionalProperties":false},"maxItems":50,"description":"Filter conditions applied before webhook work is created."}},"required":["mode","conditions"],"additionalProperties":false,"description":"Optional incoming event filter. Missing, null, or empty conditions accept every event."},"status":{"type":"string","enum":["draft","enabled","disabled"]},"runtime_target_kind":{"type":"string","enum":["main_branch","environment","preview_branch"]},"runtime_target_environment_id":{"type":["string","null"],"format":"uuid"},"runtime_target_branch_id":{"type":["string","null"],"format":"uuid"},"definition_source":{"type":"string","enum":["manual","source"]},"source_trigger_id":{"type":["string","null"]},"source_path":{"type":["string","null"]},"source_hash":{"type":["string","null"]},"ingress_id":{"type":"string","description":"The public id in webhook_url that external senders post to."},"webhook_url":{"type":"string"},"created_by_user_id":{"type":"string","format":"uuid"},"enabled_at":{"type":["string","null"]},"disabled_at":{"type":["string","null"]},"disabled_reason":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","project_id","name","source","target","prompt_template","event_filter","status","runtime_target_kind","runtime_target_environment_id","runtime_target_branch_id","definition_source","source_trigger_id","source_path","source_hash","ingress_id","webhook_url","created_by_user_id","enabled_at","disabled_at","disabled_reason","created_at","updated_at"]}}}},"400":{"description":"invalid_input: invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"unauthenticated","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"forbidden: a project member without project.agents.read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"not_found: project or webhook not found or not visible","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"internal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Webhooks","x-canonical-documentation":{"domain":"execution","resource":"Triggers","subgroup":"Webhooks","name":"Get webhook","description":"Read one webhook by its ID to inspect its target, prompt template, event filter and status; returns the webhook with its public URL and never its secret. Requires project.agents.read.","operationId":"getWebhook"}},"patch":{"operationId":"updateWebhook","tags":["execution/Triggers/Webhooks"],"summary":"Update webhook","description":"Change the name, target, prompt template, event filter or status of a webhook, for example to enable or disable deliveries; returns the updated webhook. Requires project.agents.write.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The webhook id. Updates require project.agents.write. When target is omitted, a stored conversation-backed target (create_new or existing conversation mode) still requires project.conversations.write."},"required":true,"description":"The webhook id. Updates require project.agents.write. When target is omitted, a stored conversation-backed target (create_new or existing conversation mode) still requires project.conversations.write.","name":"webhook_id","in":"path"}],"requestBody":{"description":"Updates require project.agents.write. When target is omitted, a stored conversation-backed target (create_new or existing conversation mode) still requires project.conversations.write.","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"New webhook name, 1-120 characters."},"target":{"type":"object","properties":{"kind":{"type":"string","enum":["agent","task","workflow","event"],"description":"Target kind invoked or stored by the webhook."},"id":{"type":"string","minLength":1,"maxLength":128,"description":"Target identifier: agent id, task target, workflow id, or event for store-only webhooks."},"conversation_mode":{"type":"string","enum":["create_new","existing","none"],"description":"Conversation behaviour for an agent target. Defaults to none. Use create_new for an agent that delegates with invoke_agent - a run with no conversation cannot be paused for delegation. Agent targets run headlessly by default; create_new or existing creates or appends a conversation message. Agent targets with conversation mode create_new or existing also require project.conversations.write."},"conversation_id":{"type":["string","null"],"format":"uuid","description":"Existing conversation to continue. Only allowed when conversation_mode is existing, and required in that case."}},"required":["kind","id"],"additionalProperties":false,"description":"Target invoked by a webhook definition."},"prompt_template":{"type":"string","minLength":1,"maxLength":20000,"description":"Prompt template for run targets. Not supported for event-only webhooks."},"event_filter":{"type":["object","null"],"properties":{"mode":{"type":"string","enum":["all","any"],"description":"Whether all or any filter conditions must match."},"conditions":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":255,"description":"Dot path in the incoming payload, for example action or pull_request.state."},"operator":{"type":"string","enum":["equals","not_equals","in","exists","contains"],"description":"Comparison operator."},"value":{"description":"Comparison value for operators that require one."}},"required":["path","operator"],"additionalProperties":false},"maxItems":50,"description":"Filter conditions applied before webhook work is created."}},"required":["mode","conditions"],"additionalProperties":false,"description":"Optional incoming event filter. Missing, null, or empty conditions accept every event."},"status":{"type":"string","enum":["draft","enabled","disabled"],"description":"draft, enabled or disabled."}},"additionalProperties":false}}}},"responses":{"200":{"description":"Updated webhook metadata or status.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The webhook id. Pass it as webhook_id to the other webhook operations."},"project_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"source":{"type":"string","enum":["webhook"]},"target":{"type":"object","properties":{"kind":{"type":"string","enum":["agent","task","workflow","event"],"description":"Target kind invoked or stored by the webhook."},"id":{"type":"string","minLength":1,"maxLength":128,"description":"Target identifier: agent id, task target, workflow id, or event for store-only webhooks."},"conversation_mode":{"type":"string","enum":["create_new","existing","none"],"description":"Conversation behaviour for an agent target. Defaults to none. Use create_new for an agent that delegates with invoke_agent - a run with no conversation cannot be paused for delegation. Agent targets run headlessly by default; create_new or existing creates or appends a conversation message. Agent targets with conversation mode create_new or existing also require project.conversations.write."},"conversation_id":{"type":["string","null"],"format":"uuid","description":"Existing conversation to continue. Only allowed when conversation_mode is existing, and required in that case."}},"required":["kind","id"],"additionalProperties":false},"prompt_template":{"type":["string","null"]},"event_filter":{"type":["object","null"],"properties":{"mode":{"type":"string","enum":["all","any"],"description":"Whether all or any filter conditions must match."},"conditions":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":255,"description":"Dot path in the incoming payload, for example action or pull_request.state."},"operator":{"type":"string","enum":["equals","not_equals","in","exists","contains"],"description":"Comparison operator."},"value":{"description":"Comparison value for operators that require one."}},"required":["path","operator"],"additionalProperties":false},"maxItems":50,"description":"Filter conditions applied before webhook work is created."}},"required":["mode","conditions"],"additionalProperties":false,"description":"Optional incoming event filter. Missing, null, or empty conditions accept every event."},"status":{"type":"string","enum":["draft","enabled","disabled"]},"runtime_target_kind":{"type":"string","enum":["main_branch","environment","preview_branch"]},"runtime_target_environment_id":{"type":["string","null"],"format":"uuid"},"runtime_target_branch_id":{"type":["string","null"],"format":"uuid"},"definition_source":{"type":"string","enum":["manual","source"]},"source_trigger_id":{"type":["string","null"]},"source_path":{"type":["string","null"]},"source_hash":{"type":["string","null"]},"ingress_id":{"type":"string","description":"The public id in webhook_url that external senders post to."},"webhook_url":{"type":"string"},"created_by_user_id":{"type":"string","format":"uuid"},"enabled_at":{"type":["string","null"]},"disabled_at":{"type":["string","null"]},"disabled_reason":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","project_id","name","source","target","prompt_template","event_filter","status","runtime_target_kind","runtime_target_environment_id","runtime_target_branch_id","definition_source","source_trigger_id","source_path","source_hash","ingress_id","webhook_url","created_by_user_id","enabled_at","disabled_at","disabled_reason","created_at","updated_at"]}}}},"400":{"description":"invalid_input: invalid body or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"unauthenticated","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"forbidden: a project member without the required capability","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"not_found: project or webhook not found or not visible","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"internal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Webhooks","x-canonical-documentation":{"domain":"execution","resource":"Triggers","subgroup":"Webhooks","name":"Update webhook","description":"Change the name, target, prompt template, event filter or status of a webhook, for example to enable or disable deliveries; returns the updated webhook. Requires project.agents.write.","operationId":"updateWebhook"}},"delete":{"operationId":"deleteWebhook","tags":["execution/Triggers/Webhooks"],"summary":"Delete webhook","description":"Delete a webhook that is no longer needed so that its URL refuses future deliveries; returns ok true once the webhook is deleted. Requires project.agents.write; API keys also need delete scope.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The webhook id (`id` on the webhook, formerly `webhook_definition_id`). A missing webhook is not found."},"required":true,"description":"The webhook id (`id` on the webhook, formerly `webhook_definition_id`). A missing webhook is not found.","name":"webhook_id","in":"path"}],"responses":{"200":{"description":"Deleted; future deliveries for this webhook are disabled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"invalid_input: invalid parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"unauthenticated","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"forbidden: a project member without project.agents.write. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"not_found: project or webhook not found or not visible","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"internal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Webhooks","x-canonical-documentation":{"domain":"execution","resource":"Triggers","subgroup":"Webhooks","name":"Delete webhook","description":"Delete a webhook that is no longer needed so that its URL refuses future deliveries; returns ok true once the webhook is deleted. Requires project.agents.write; API keys also need delete scope.","operationId":"deleteWebhook"}}},"/projects/{project_reference}/webhooks/{webhook_id}/events":{"get":{"operationId":"listWebhookEvents","tags":["execution/Triggers/Webhook events"],"summary":"List webhook events","description":"List the events a webhook received, newest first, to check deliveries, manual runs and replays; returns one page of webhook events, each with the run it started, if any, and an event that the filter stopped has the status ignored. Requires project.agents.read.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The webhook id (`id` on the webhook, formerly `webhook_definition_id`). A missing webhook is not found."},"required":true,"description":"The webhook id (`id` on the webhook, formerly `webhook_definition_id`). A missing webhook is not found.","name":"webhook_id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Maximum webhook events to return, from 1 to 100. Defaults to 50."},"required":false,"description":"Maximum webhook events to return, from 1 to 100. Defaults to 50.","name":"limit","in":"query"},{"schema":{"type":"string","format":"uuid","description":"The `page_info.next` of the previous page: the id of its last webhook event. Keep `sort_order` the same across pages."},"required":false,"description":"The `page_info.next` of the previous page: the id of its last webhook event. Keep `sort_order` the same across pages.","name":"cursor","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"description":"Creation order: desc (newest first, the default) or asc."},"required":false,"description":"Creation order: desc (newest first, the default) or asc.","name":"sort_order","in":"query"}],"responses":{"200":{"description":"A page of webhook events","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEventListResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Webhook events","x-canonical-documentation":{"domain":"execution","resource":"Triggers","subgroup":"Webhook events","name":"List webhook events","description":"List the events a webhook received, newest first, to check deliveries, manual runs and replays; returns one page of webhook events, each with the run it started, if any, and an event that the filter stopped has the status ignored. Requires project.agents.read.","operationId":"listWebhookEvents"}}},"/projects/{project_reference}/webhooks/{webhook_id}/events/{webhook_event_id}/replay":{"post":{"operationId":"replayWebhookEvent","tags":["execution/Triggers/Webhook events"],"summary":"Replay webhook event","description":"Send the stored payload of a webhook event to the current target of the webhook again, for example after a failed run; returns the new webhook event that the replay created.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The webhook id. Task and workflow targets accept a project-execution credential that carries native source authority from project.runs.write instead of project.agents.write. Agent targets require project.agents.write, plus project.conversations.write for conversation-backed targets."},"required":true,"description":"The webhook id. Task and workflow targets accept a project-execution credential that carries native source authority from project.runs.write instead of project.agents.write. Agent targets require project.agents.write, plus project.conversations.write for conversation-backed targets.","name":"webhook_id","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Stored delivery to replay: a new webhook event is created from its payload and run through the webhook target. Task and workflow targets accept a project-execution credential that carries native source authority from project.runs.write instead of project.agents.write. Agent targets require project.agents.write, plus project.conversations.write for conversation-backed targets."},"required":true,"description":"Stored delivery to replay: a new webhook event is created from its payload and run through the webhook target. Task and workflow targets accept a project-execution credential that carries native source authority from project.runs.write instead of project.agents.write. Agent targets require project.agents.write, plus project.conversations.write for conversation-backed targets.","name":"webhook_event_id","in":"path"}],"responses":{"202":{"description":"Replay accepted: a new webhook event created from the stored payload and run through the webhook target.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRun"}}}},"400":{"description":"invalid_input: invalid body or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"unauthenticated","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"forbidden: a project member without the required capability","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"not_found: project or webhook not found or not visible","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"conflict: project automation is on hold","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"internal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable, or run admission is fenced and no run was admitted; retry shortly, after the Retry-After delay when one is sent","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Webhook events","x-canonical-documentation":{"domain":"execution","resource":"Triggers","subgroup":"Webhook events","name":"Replay webhook event","description":"Send the stored payload of a webhook event to the current target of the webhook again, for example after a failed run; returns the new webhook event that the replay created.","operationId":"replayWebhookEvent"}}},"/webhooks/{ingress_id}":{"post":{"operationId":"receiveWebhook","tags":["execution/Triggers/Webhook ingress"],"summary":"Receive webhook","description":"Accept a delivery from an external sender at the public URL of a webhook, authenticated by the webhook secret and deduplicated by an idempotency key; returns the webhook event that stores the delivery.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"The public id in the webhook URL (`ingress_id` on the webhook). An unknown id is not found."},"required":true,"description":"The public id in the webhook URL (`ingress_id` on the webhook). An unknown id is not found.","name":"ingress_id","in":"path"},{"schema":{"type":"string","description":"Webhook secret for native GitHub repository webhooks, which cannot send custom headers."},"required":false,"description":"Webhook secret for native GitHub repository webhooks, which cannot send custom headers.","name":"secret","in":"query"},{"schema":{"type":"string","description":"Authenticate with the X-Veryfront-Webhook-Secret header: the secret returned when the webhook was created. Required unless `secret` is sent as a query parameter."},"required":false,"description":"Authenticate with the X-Veryfront-Webhook-Secret header: the secret returned when the webhook was created. Required unless `secret` is sent as a query parameter.","name":"x-veryfront-webhook-secret","in":"header"},{"schema":{"type":"string","description":"Optional Idempotency-Key header for duplicate delivery detection, 1-255 characters, scoped to the webhook (authenticate with the X-Veryfront-Webhook-Secret header). GitHub webhooks: when this header is absent, the X-GitHub-Delivery header GitHub sends is used as the idempotency key."},"required":false,"description":"Optional Idempotency-Key header for duplicate delivery detection, 1-255 characters, scoped to the webhook (authenticate with the X-Veryfront-Webhook-Secret header). GitHub webhooks: when this header is absent, the X-GitHub-Delivery header GitHub sends is used as the idempotency key.","name":"idempotency-key","in":"header"},{"schema":{"type":"string","description":"Optional X-Veryfront-Source-Event-Id header: the sender's own id for this event, 1-255 characters, scoped to the webhook. It detects duplicates independently of the idempotency key: a delivery matching a stored event on either one returns that event with status 200. GitHub webhooks: when this header is absent, the X-GitHub-Delivery header is used as the source event id."},"required":false,"description":"Optional X-Veryfront-Source-Event-Id header: the sender's own id for this event, 1-255 characters, scoped to the webhook. It detects duplicates independently of the idempotency key: a delivery matching a stored event on either one returns that event with status 200. GitHub webhooks: when this header is absent, the X-GitHub-Delivery header is used as the source event id.","name":"x-veryfront-source-event-id","in":"header"}],"requestBody":{"required":false,"description":"The delivery payload, at most 64 KiB of JSON. Sent as JSON, or as a form with the JSON in a `payload` field, as GitHub repository webhooks do. An empty or unparseable JSON body is received as `{}`.","content":{"application/json":{"schema":{"description":"Any JSON value. `null` is stored as `{}`."}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"payload":{"type":"string","description":"The delivery payload as a JSON string. An absent field is received as `{}`."}}}}}},"responses":{"200":{"description":"Duplicate webhook delivery accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRun"}}}},"202":{"description":"Webhook accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRun"}}}},"400":{"description":"invalid_input: missing secret, invalid body or headers, or the webhook is not enabled","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"not_found: unknown ingress_id or wrong secret","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"conflict: the idempotency key and source event id match different webhook events","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"conflict: project automation is on hold","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"limit_exceeded: payload over 64 KiB","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"limit_exceeded: too many requests from this IP address","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"internal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-audience":"component-internal","x-documentation-source-tag":"Webhook ingress","x-canonical-documentation":{"domain":"execution","resource":"Triggers","subgroup":"Webhook ingress","name":"Receive webhook","description":"Accept a delivery from an external sender at the public URL of a webhook, authenticated by the webhook secret and deduplicated by an idempotency key; returns the webhook event that stores the delivery.","operationId":"receiveWebhook"}}},"/runs/{run_id}/input-requests":{"get":{"operationId":"listRunInputRequests","tags":["execution/Runs/Run Input Requests"],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]},{"runExecutionAuth":[]}],"summary":"List run input requests","description":"List run input requests.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"example":"11111111-1111-4111-8111-111111111111","name":"run_id","in":"path"},{"schema":{"type":"string","enum":["open","submitted","cancelled","expired"],"description":"Lifecycle status for the target record."},"required":false,"description":"Lifecycle status for the target record.","name":"status","in":"query"},{"$ref":"#/components/parameters/PaginationCursor"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum number of records in a page, from 1 to 100. Defaults to 20.","format":"int32"},"required":false,"description":"Maximum number of records in a page, from 1 to 100. Defaults to 20.","name":"limit","in":"query"}],"responses":{"200":{"description":"Input request page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListInputRequestsResponse"},"examples":{"example":{"summary":"Example response","value":{"data":[{"input_request_id":"00000000-0000-4000-8000-000000000001","project_id":"00000000-0000-4000-8000-000000000001","run_id":"11111111-1111-4111-8111-111111111111","title":"Approve the result","fields":[{"name":"approved","type":"confirm","label":"Approve the result?","required":true}],"status":"open","requested_responder_type":"human","response":null,"created_at":"2026-10-02T10:00:00Z"}],"page_info":{"next":null}}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}}},"x-documentation-source-tag":"Run input request","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Run Input Requests","name":"List run input requests","description":"List run input requests.","operationId":"listRunInputRequests"}},"post":{"operationId":"createRunInputRequest","tags":["execution/Runs/Run Input Requests"],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]},{"runExecutionAuth":[]}],"summary":"Create input request","description":"Create an input request.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Run that owns the input request. A fresh creation request without a recorded waiting tool call or tool_call_id, or with a duplicate open run/tool-call request, returns 409. An authorized retry of the identical request with the same idempotency key returns its stored result."},"required":true,"description":"Run that owns the input request. A fresh creation request without a recorded waiting tool call or tool_call_id, or with a duplicate open run/tool-call request, returns 409. An authorized retry of the identical request with the same idempotency key returns its stored result.","example":"11111111-1111-4111-8111-111111111111","name":"run_id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInputRequestRequest"},"examples":{"minimal":{"summary":"Request a decision","value":{"title":"Approve the result","fields":[{"name":"approved","type":"confirm"}]}},"approval":{"summary":"Request approval","value":{"tool_call_id":"call_example","requested_responder_type":"human","title":"Approve the result","fields":[{"name":"approved","type":"confirm","label":"Approve the result?","required":true}]}}}}}},"responses":{"201":{"description":"Input request created or idempotently replayed","headers":{"Location":{"schema":{"type":"string","format":"uri-reference"},"description":"Canonical input request URL."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InputRequest"},"examples":{"minimal":{"summary":"Request a decision","value":{"input_request_id":"00000000-0000-4000-8000-000000000001","project_id":"00000000-0000-4000-8000-000000000001","run_id":"11111111-1111-4111-8111-111111111111","title":"Approve the result","fields":[{"required":false,"name":"approved","type":"confirm"}],"status":"open","requested_responder_type":"human","response":null,"created_at":"2026-10-02T10:00:00Z"}},"approval":{"summary":"Request approval","value":{"input_request_id":"00000000-0000-4000-8000-000000000001","project_id":"00000000-0000-4000-8000-000000000001","run_id":"11111111-1111-4111-8111-111111111111","title":"Approve the result","fields":[{"required":true,"name":"approved","type":"confirm","label":"Approve the result?"}],"status":"open","requested_responder_type":"human","response":null,"created_at":"2026-10-02T10:00:00Z","tool_call_id":"call_example"}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":409}}}]}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":413}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}}},"x-codeSamples":[{"lang":"json","label":"Request JSON","example":"minimal","contentType":"application/json","source":"{\n  \"title\": \"Approve the result\",\n  \"fields\": [\n    {\n      \"name\": \"approved\",\n      \"type\": \"confirm\"\n    }\n  ]\n}"},{"lang":"json","label":"Request JSON","example":"approval","contentType":"application/json","source":"{\n  \"tool_call_id\": \"call_example\",\n  \"requested_responder_type\": \"human\",\n  \"title\": \"Approve the result\",\n  \"fields\": [\n    {\n      \"name\": \"approved\",\n      \"type\": \"confirm\",\n      \"label\": \"Approve the result?\",\n      \"required\": true\n    }\n  ]\n}"}],"x-documentation-source-tag":"Run input request","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Run Input Requests","name":"Create input request","description":"Create an input request.","operationId":"createRunInputRequest"}}},"/input-requests/{input_request_id}/responses":{"post":{"operationId":"createInputResponse","tags":["execution/Runs/Run Input Requests"],"summary":"Respond to input request","description":"Respond to input request.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Input request to answer. Every caller must match the requested responder role. Unbound callers need editor access to the run owner and project.runs.write. A bound runtime credential instead must match the exact run and needs conversations:write, viewer access to the run owner, and project.runs.read. A linked conversation also requires editor access. A fresh response to an already-resolved request returns 409 (submission, cancellation and expiry compete atomically). An authorized retry of the identical request with the same idempotency key returns its stored result."},"required":true,"description":"Input request to answer. Every caller must match the requested responder role. Unbound callers need editor access to the run owner and project.runs.write. A bound runtime credential instead must match the exact run and needs conversations:write, viewer access to the run owner, and project.runs.read. A linked conversation also requires editor access. A fresh response to an already-resolved request returns 409 (submission, cancellation and expiry compete atomically). An authorized retry of the identical request with the same idempotency key returns its stored result.","example":"00000000-0000-4000-8000-000000000001","name":"input_request_id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RespondToInputRequestRequest"},"examples":{"approval":{"summary":"Submit approval","value":{"values":{"approved":true}}}}}}},"responses":{"200":{"description":"InputRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InputRequest"},"examples":{"approval":{"summary":"Submit approval","value":{"input_request_id":"00000000-0000-4000-8000-000000000001","project_id":"00000000-0000-4000-8000-000000000001","run_id":"11111111-1111-4111-8111-111111111111","title":"Approve the result","fields":[{"name":"approved","type":"confirm","label":"Approve the result?","required":true}],"status":"submitted","requested_responder_type":"human","response":{"response_id":"00000000-0000-4000-8000-000000000002","values":{"approved":true},"actor":{"type":"user","id":"user_example"},"created_at":"2026-10-02T10:00:00Z"},"created_at":"2026-10-02T10:00:00Z","resolved_at":"2026-10-02T10:00:00Z"}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":409}}}]}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":413}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":503}}}]}}}}},"x-codeSamples":[{"lang":"json","label":"Request JSON","example":"approval","contentType":"application/json","source":"{\n  \"values\": {\n    \"approved\": true\n  }\n}"}],"x-documentation-source-tag":"Input request","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Run Input Requests","name":"Respond to input request","description":"Respond to input request.","operationId":"createInputResponse"}}},"/conversations/{conversation_id}/input-requests":{"get":{"operationId":"listConversationInputRequests","tags":["execution/Runs/Run Input Requests"],"summary":"List conversation input requests","description":"List conversation input requests.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"example":"00000000-0000-4000-8000-000000000001","name":"conversation_id","in":"path"},{"schema":{"type":"string","enum":["open","submitted","cancelled","expired"],"description":"Lifecycle status for the target record."},"required":false,"description":"Lifecycle status for the target record.","name":"status","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"run_id","in":"query"},{"$ref":"#/components/parameters/PaginationCursor"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum number of records in a page, from 1 to 100. Defaults to 20.","format":"int32"},"required":false,"description":"Maximum number of records in a page, from 1 to 100. Defaults to 20.","name":"limit","in":"query"}],"responses":{"200":{"description":"Input request page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListInputRequestsResponse"},"examples":{"example":{"summary":"Example response","value":{"data":[{"input_request_id":"00000000-0000-4000-8000-000000000001","project_id":"00000000-0000-4000-8000-000000000001","run_id":"11111111-1111-4111-8111-111111111111","title":"Approve the result","fields":[{"name":"approved","type":"confirm","label":"Approve the result?","required":true}],"status":"open","requested_responder_type":"human","response":null,"created_at":"2026-10-02T10:00:00Z"}],"page_info":{"next":null}}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}}},"x-documentation-source-tag":"Conversation runs","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Run Input Requests","name":"List conversation input requests","description":"List conversation input requests.","operationId":"listConversationInputRequests"}}},"/input-requests/{input_request_id}":{"get":{"operationId":"getInputRequest","tags":["execution/Runs/Run Input Requests"],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]},{"runExecutionAuth":[]}],"summary":"Get input request","description":"Return an input request.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"example":"00000000-0000-4000-8000-000000000001","name":"input_request_id","in":"path"}],"responses":{"200":{"description":"Input request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InputRequest"},"examples":{"example":{"summary":"Example response","value":{"input_request_id":"00000000-0000-4000-8000-000000000001","project_id":"00000000-0000-4000-8000-000000000001","run_id":"11111111-1111-4111-8111-111111111111","title":"Approve the result","fields":[{"name":"approved","type":"confirm","label":"Approve the result?","required":true}],"status":"open","requested_responder_type":"human","response":null,"created_at":"2026-10-02T10:00:00Z"}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}}},"x-documentation-source-tag":"Input request","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Run Input Requests","name":"Get input request","description":"Return an input request.","operationId":"getInputRequest"}}},"/input-requests/{input_request_id}/cancel":{"post":{"operationId":"cancelInputRequest","tags":["execution/Runs/Run Input Requests"],"summary":"Cancel input request","description":"Cancel an input request.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Input request to cancel. A fresh cancellation of an already-resolved request returns 409; only an open request can be cancelled. Requires project.runs.write on the run’s project and, for a request in a conversation, editor access on that conversation. An authorized retry of the identical request with the same idempotency key returns its stored result."},"required":true,"description":"Input request to cancel. A fresh cancellation of an already-resolved request returns 409; only an open request can be cancelled. Requires project.runs.write on the run’s project and, for a request in a conversation, editor access on that conversation. An authorized retry of the identical request with the same idempotency key returns its stored result.","example":"00000000-0000-4000-8000-000000000001","name":"input_request_id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"Idempotency-Key","in":"header"}],"responses":{"200":{"description":"Cancelled input request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InputRequest"},"examples":{"example":{"summary":"Example response","value":{"input_request_id":"00000000-0000-4000-8000-000000000001","project_id":"00000000-0000-4000-8000-000000000001","run_id":"11111111-1111-4111-8111-111111111111","title":"Approve the result","fields":[{"name":"approved","type":"confirm","label":"Approve the result?","required":true}],"status":"cancelled","requested_responder_type":"human","response":null,"created_at":"2026-10-02T10:00:00Z","resolved_at":"2026-10-02T10:00:00Z"}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":409}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}}},"x-documentation-source-tag":"Input request","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Run Input Requests","name":"Cancel input request","description":"Cancel an input request.","operationId":"cancelInputRequest"}}},"/runs":{"get":{"operationId":"listRuns","tags":["execution/Runs/Runs"],"summary":"List runs","description":"List runs; bound runtimes need own project_id, trigger_type=[\"schedule\"] and trigger_id.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]*$","description":"Discover agent runs with this persisted task identity across conversations. Matches canonical task metadata or the first enqueue request; results are not task authorization evidence."},"required":false,"description":"Filter by the persisted orchestration task identity in task_id; this is distinct from the execution definition target.","name":"task_id","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum number of records in a page, from 1 to 100. Defaults to 20.","format":"int32"},"required":false,"description":"Maximum number of records in a page, from 1 to 100. Defaults to 20.","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Opaque cursor returned by the previous page. Reuse with unchanged filters and ordering."},"required":false,"description":"Opaque page_info.next cursor; reuse with unchanged filters and ordering.","name":"cursor","in":"query"},{"schema":{"type":"string","enum":["created_at","status","duration"],"default":"created_at","description":"Field used to order runs: created_at, status or duration. Defaults to created_at."},"required":false,"description":"Field used to order runs: created_at, status or duration. Defaults to created_at.","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort direction: asc or desc. Defaults to desc."},"required":false,"description":"Sort direction: asc or desc. Defaults to desc.","name":"sort_order","in":"query"},{"schema":{"type":"array","items":{"type":"string"},"maxItems":32,"description":"Run statuses to include. Values within this filter use OR; different filters use AND."},"required":false,"description":"Filter by status. Repeat the query parameter for multiple values; comma-separated values remain a compatibility alias. Values within this filter use OR; different filters use AND.","style":"form","explode":true,"name":"status","in":"query"},{"schema":{"type":"array","items":{"type":"string","enum":["agent","task","workflow","eval"]},"minItems":1,"maxItems":4,"description":"Execution definition types to include: agent, task, workflow or legacy eval."},"required":false,"description":"Filter by execution definition type.","style":"form","explode":true,"name":"target_type","in":"query"},{"schema":{"type":"array","items":{"type":"string","enum":["user","api_key","service_account","system","schedule","webhook","agent","task","workflow"]},"minItems":1,"maxItems":9,"description":"Trigger types to include: user, api_key, service_account, system, schedule, webhook, agent, task or workflow."},"required":false,"description":"Filter by trigger_type.","style":"form","explode":true,"name":"trigger_type","in":"query"},{"schema":{"type":"string","enum":["true","false"],"default":"false","description":"true lists only top-level runs (parent_run_id null). Defaults to false."},"required":false,"name":"root_only","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"parent_run_id","in":"query"},{"schema":{"type":"array","items":{"type":"string"},"maxItems":32},"required":false,"description":"Filter by execution definition ID.","style":"form","explode":true,"name":"target_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":false,"description":"Filter by trigger_id.","name":"trigger_id","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"description":"Restrict accessible runs to this project; filters intersect and never grant access.","name":"project_id","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"description":"Restrict accessible runs to this conversation; filters intersect and never grant access.","name":"conversation_id","in":"query"}],"responses":{"200":{"description":"Run page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunsPage"},"examples":{"example":{"summary":"Example response","value":{"data":[{"id":"11111111-1111-4111-8111-111111111111","run_id":"11111111-1111-4111-8111-111111111111","status":"completed","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"summarize"},"input":{"text":"A short document."},"output":{"summary":"A short summary."},"title":"Summarize text","created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"api_key","id":"key_example"},"started_at":"2026-10-02T10:00:00Z","finished_at":"2026-10-02T10:00:02Z"}],"page_info":{"next":null}}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}}},"x-documentation-source-tag":"Run resource","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Runs","name":"List runs","description":"List runs; bound runtimes need own project_id, trigger_type=[\"schedule\"] and trigger_id.","operationId":"listRuns"}},"post":{"operationId":"createRun","tags":["execution/Runs/Runs"],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]},{"runExecutionAuth":[]}],"summary":"Create run","description":"Create a run.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":false,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRunRequest"},"examples":{"minimal":{"summary":"Minimal request","value":{"project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"health-check"}}},"agent":{"summary":"API-started agent","value":{"project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"agent","id":"coordinator"},"input":{"message":"Research the topic and summarize it."}}},"task":{"summary":"Task run","value":{"project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"summarize"},"input":{"text":"A short document."}}},"workflow":{"summary":"Workflow run","value":{"project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"workflow","id":"review"},"input":{"document_id":"document_example"}}},"child":{"summary":"Child run","value":{"project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"agent","id":"research"},"input":{"question":"Find relevant sources."},"parent_run_id":"22222222-2222-4222-8222-222222222222","tool_call_id":"call_invoke_agent"}},"workflow_child":{"summary":"Workflow starts an agent","value":{"project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"agent","id":"coordinator"},"input":{"topic":"Energy storage"},"parent_run_id":"11111111-1111-4111-8111-111111111111","node_id":"research"}},"evaluation":{"summary":"Evaluation run","value":{"project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"eval"},"config":{"eval_id":"eval_example"}}},"relationships":{"summary":"Conversation and batch","value":{"project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"agent","id":"support"},"input":{"message":"Summarize this document."},"conversation_id":"00000000-0000-4000-8000-000000000002","batch_id":"00000000-0000-4000-8000-000000000003"}},"runtime":{"summary":"Registered runtime","value":{"project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"summarize"},"input":{"text":"A short document."},"execution":{"runtime":{"type":"registered","id":"runtime_example"}}}},"schedule":{"summary":"Saved schedule","value":{"project_id":"00000000-0000-4000-8000-000000000001","source":{"type":"schedule","id":"00000000-0000-4000-8000-000000000002"}}},"webhook":{"summary":"Webhook run","value":{"project_id":"00000000-0000-4000-8000-000000000001","input":{"event":"document_uploaded"},"source":{"type":"webhook","id":"webhook_example"}}},"agent_configuration":{"summary":"Agent with client tools and model configuration","value":{"project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"agent","id":"researcher"},"input":"Research the topic and summarize it.","config":{"conversation_mode":"create_new","tools":[{"name":"read_document","description":"Reads a document.","parameters":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}],"context":[{"type":"text","text":"Use the provided document."}],"forwarded_props":{"model":"provider/model"}}}}}}}},"responses":{"202":{"description":"Run admitted. Project-owned runs need project.runs.write; conversation-owned runs need editor access on the conversation.","headers":{"Location":{"schema":{"type":"string","format":"uri-reference"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRunResult"},"examples":{"minimal":{"summary":"Minimal request","value":{"id":"11111111-1111-4111-8111-111111111111","run_id":"11111111-1111-4111-8111-111111111111","status":"pending","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"health-check"},"input":null,"output":null,"created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"api_key","id":"key_example"}}},"agent":{"summary":"API-started agent","value":{"id":"22222222-2222-4222-8222-222222222222","run_id":"22222222-2222-4222-8222-222222222222","status":"pending","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"agent","id":"coordinator"},"input":{"message":"Research the topic and summarize it."},"output":null,"created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"api_key","id":"key_example"}}},"task":{"summary":"Task run","value":{"id":"11111111-1111-4111-8111-111111111111","run_id":"11111111-1111-4111-8111-111111111111","status":"pending","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"summarize"},"input":{"text":"A short document."},"output":null,"created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"api_key","id":"key_example"}}},"workflow":{"summary":"Workflow run","value":{"id":"11111111-1111-4111-8111-111111111111","run_id":"11111111-1111-4111-8111-111111111111","status":"pending","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"workflow","id":"review"},"input":{"document_id":"document_example"},"output":null,"created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"api_key","id":"key_example"}}},"child":{"summary":"Child run","value":{"id":"33333333-3333-4333-8333-333333333333","run_id":"33333333-3333-4333-8333-333333333333","status":"pending","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"agent","id":"research"},"input":{"question":"Find relevant sources."},"output":null,"parent_run_id":"22222222-2222-4222-8222-222222222222","root_run_id":"22222222-2222-4222-8222-222222222222","created_at":"2026-10-02T10:00:01Z","updated_at":"2026-10-02T10:00:01Z","trigger":{"type":"agent","id":"coordinator","tool_call_id":"call_invoke_agent"}}},"workflow_child":{"summary":"Workflow starts an agent","value":{"id":"33333333-3333-4333-8333-333333333333","run_id":"33333333-3333-4333-8333-333333333333","status":"pending","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"agent","id":"coordinator"},"input":{"topic":"Energy storage"},"output":null,"parent_run_id":"11111111-1111-4111-8111-111111111111","root_run_id":"11111111-1111-4111-8111-111111111111","created_at":"2026-10-02T10:00:01Z","updated_at":"2026-10-02T10:00:01Z","trigger":{"type":"workflow","id":"daily-brief","node_id":"research"}}},"evaluation":{"summary":"Evaluation run","value":{"id":"11111111-1111-4111-8111-111111111111","run_id":"11111111-1111-4111-8111-111111111111","status":"pending","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"eval"},"input":null,"output":null,"created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"api_key","id":"key_example"},"config":{"eval_id":"eval_example"}}},"relationships":{"summary":"Conversation and batch","value":{"id":"11111111-1111-4111-8111-111111111111","run_id":"11111111-1111-4111-8111-111111111111","status":"pending","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"agent","id":"support"},"input":{"message":"Summarize this document."},"output":null,"created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"api_key","id":"key_example"},"conversation_id":"00000000-0000-4000-8000-000000000002","batch_id":"00000000-0000-4000-8000-000000000003"}},"runtime":{"summary":"Registered runtime","value":{"id":"11111111-1111-4111-8111-111111111111","run_id":"11111111-1111-4111-8111-111111111111","status":"pending","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"summarize"},"input":{"text":"A short document."},"output":null,"created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"api_key","id":"key_example"},"execution":{"runtime":{"type":"registered","id":"runtime_example"}}}},"schedule":{"summary":"Saved schedule","value":{"id":"11111111-1111-4111-8111-111111111111","run_id":"11111111-1111-4111-8111-111111111111","status":"pending","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"summarize"},"input":null,"output":null,"created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"api_key","id":"key_example"}}},"webhook":{"summary":"Webhook run","value":{"id":"11111111-1111-4111-8111-111111111111","run_id":"11111111-1111-4111-8111-111111111111","status":"pending","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"summarize"},"input":{"event":"document_uploaded"},"output":null,"created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"api_key","id":"key_example"}}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":409}}}]}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":413}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}}},"x-codeSamples":[{"lang":"json","label":"Request JSON","example":"minimal","contentType":"application/json","source":"{\n  \"project_id\": \"00000000-0000-4000-8000-000000000001\",\n  \"target\": {\n    \"type\": \"task\",\n    \"id\": \"health-check\"\n  }\n}"},{"lang":"json","label":"Request JSON","example":"agent","contentType":"application/json","source":"{\n  \"project_id\": \"00000000-0000-4000-8000-000000000001\",\n  \"target\": {\n    \"type\": \"agent\",\n    \"id\": \"coordinator\"\n  },\n  \"input\": {\n    \"message\": \"Research the topic and summarize it.\"\n  }\n}"},{"lang":"json","label":"Request JSON","example":"task","contentType":"application/json","source":"{\n  \"project_id\": \"00000000-0000-4000-8000-000000000001\",\n  \"target\": {\n    \"type\": \"task\",\n    \"id\": \"summarize\"\n  },\n  \"input\": {\n    \"text\": \"A short document.\"\n  }\n}"},{"lang":"json","label":"Request JSON","example":"workflow","contentType":"application/json","source":"{\n  \"project_id\": \"00000000-0000-4000-8000-000000000001\",\n  \"target\": {\n    \"type\": \"workflow\",\n    \"id\": \"review\"\n  },\n  \"input\": {\n    \"document_id\": \"document_example\"\n  }\n}"},{"lang":"json","label":"Request JSON","example":"child","contentType":"application/json","source":"{\n  \"project_id\": \"00000000-0000-4000-8000-000000000001\",\n  \"target\": {\n    \"type\": \"agent\",\n    \"id\": \"research\"\n  },\n  \"input\": {\n    \"question\": \"Find relevant sources.\"\n  },\n  \"parent_run_id\": \"22222222-2222-4222-8222-222222222222\",\n  \"tool_call_id\": \"call_invoke_agent\"\n}"},{"lang":"json","label":"Request JSON","example":"workflow_child","contentType":"application/json","source":"{\n  \"project_id\": \"00000000-0000-4000-8000-000000000001\",\n  \"target\": {\n    \"type\": \"agent\",\n    \"id\": \"coordinator\"\n  },\n  \"input\": {\n    \"topic\": \"Energy storage\"\n  },\n  \"parent_run_id\": \"11111111-1111-4111-8111-111111111111\",\n  \"node_id\": \"research\"\n}"},{"lang":"json","label":"Request JSON","example":"evaluation","contentType":"application/json","source":"{\n  \"project_id\": \"00000000-0000-4000-8000-000000000001\",\n  \"target\": {\n    \"type\": \"task\",\n    \"id\": \"eval\"\n  },\n  \"config\": {\n    \"eval_id\": \"eval_example\"\n  }\n}"},{"lang":"json","label":"Request JSON","example":"relationships","contentType":"application/json","source":"{\n  \"project_id\": \"00000000-0000-4000-8000-000000000001\",\n  \"target\": {\n    \"type\": \"agent\",\n    \"id\": \"support\"\n  },\n  \"input\": {\n    \"message\": \"Summarize this document.\"\n  },\n  \"conversation_id\": \"00000000-0000-4000-8000-000000000002\",\n  \"batch_id\": \"00000000-0000-4000-8000-000000000003\"\n}"},{"lang":"json","label":"Request JSON","example":"runtime","contentType":"application/json","source":"{\n  \"project_id\": \"00000000-0000-4000-8000-000000000001\",\n  \"target\": {\n    \"type\": \"task\",\n    \"id\": \"summarize\"\n  },\n  \"input\": {\n    \"text\": \"A short document.\"\n  },\n  \"execution\": {\n    \"runtime\": {\n      \"type\": \"registered\",\n      \"id\": \"runtime_example\"\n    }\n  }\n}"},{"lang":"json","label":"Request JSON","example":"schedule","contentType":"application/json","source":"{\n  \"project_id\": \"00000000-0000-4000-8000-000000000001\",\n  \"source\": {\n    \"type\": \"schedule\",\n    \"id\": \"00000000-0000-4000-8000-000000000002\"\n  }\n}"},{"lang":"json","label":"Request JSON","example":"webhook","contentType":"application/json","source":"{\n  \"project_id\": \"00000000-0000-4000-8000-000000000001\",\n  \"input\": {\n    \"event\": \"document_uploaded\"\n  },\n  \"source\": {\n    \"type\": \"webhook\",\n    \"id\": \"webhook_example\"\n  }\n}"},{"lang":"json","label":"Request JSON","example":"agent_configuration","contentType":"application/json","source":"{\n  \"project_id\": \"00000000-0000-4000-8000-000000000001\",\n  \"target\": {\n    \"type\": \"agent\",\n    \"id\": \"researcher\"\n  },\n  \"input\": \"Research the topic and summarize it.\",\n  \"config\": {\n    \"conversation_mode\": \"create_new\",\n    \"tools\": [\n      {\n        \"name\": \"read_document\",\n        \"description\": \"Reads a document.\",\n        \"parameters\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"id\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"id\"\n          ]\n        }\n      }\n    ],\n    \"context\": [\n      {\n        \"type\": \"text\",\n        \"text\": \"Use the provided document.\"\n      }\n    ],\n    \"forwarded_props\": {\n      \"model\": \"provider/model\"\n    }\n  }\n}"}],"x-documentation-source-tag":"Run resource","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Runs","name":"Create run","description":"Create a run.","operationId":"createRun"}}},"/runs/{run_id}":{"get":{"operationId":"getRun","tags":["execution/Runs/Runs"],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]},{"runExecutionAuth":[]}],"summary":"Get run","description":"Get run details: status, errors, target, timing, token usage and cost, by run UUID or public id; usage is cumulative.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-zA-Z0-9_-]+$","description":"Run UUID, or any public run id (run_… or an older id) as legacy run reads, run events and usage records carry it. The response id is the run UUID that every other run operation takes."},"required":true,"description":"Run UUID, or any public run id (run_… or an older id) as legacy run reads, run events and usage records carry it. The response id is the run UUID that every other run operation takes.","example":"11111111-1111-4111-8111-111111111111","name":"run_id","in":"path"}],"responses":{"200":{"description":"Read a run by its UUID or public run id (run_…), including its labels and grouped execution, control, usage and schema metadata. The returned ETag guards metadata updates.","headers":{"ETag":{"schema":{"type":"string"},"description":"Metadata version for If-Match."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"},"examples":{"example":{"summary":"Example response","value":{"id":"11111111-1111-4111-8111-111111111111","run_id":"11111111-1111-4111-8111-111111111111","status":"completed","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"summarize"},"input":{"text":"A short document."},"output":{"summary":"A short summary."},"title":"Summarize text","created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"api_key","id":"key_example"},"started_at":"2026-10-02T10:00:00Z","finished_at":"2026-10-02T10:00:02Z"}},"usage":{"summary":"With usage and cost","value":{"id":"11111111-1111-4111-8111-111111111111","run_id":"11111111-1111-4111-8111-111111111111","status":"completed","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"summarize"},"input":{"text":"A short document."},"output":{"summary":"A short summary."},"title":"Summarize text","created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"api_key","id":"key_example"},"started_at":"2026-10-02T10:00:00Z","finished_at":"2026-10-02T10:00:02Z","usage":{"tokens":{"input":120,"output":30,"cache":{"read":50,"write":0},"total":200},"cost":{"currency":"EUR","status":"posted","provider":"0.002","platform":"0.001","total":"0.003","credits":"0.3"},"model_calls":1,"capture_status":"complete"}}},"api_parent":{"summary":"API-started parent","value":{"id":"22222222-2222-4222-8222-222222222222","run_id":"22222222-2222-4222-8222-222222222222","status":"completed","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"agent","id":"coordinator"},"input":{"message":"Research the topic and summarize it."},"output":{"summary":"Summary based on the research."},"trigger":{"type":"api_key","id":"key_example"},"created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:10Z","started_at":"2026-10-02T10:00:00Z","finished_at":"2026-10-02T10:00:10Z"}},"invoked_child":{"summary":"Child created by invoke_agent","value":{"id":"33333333-3333-4333-8333-333333333333","run_id":"33333333-3333-4333-8333-333333333333","status":"completed","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"agent","id":"research"},"input":{"question":"Find relevant sources."},"output":{"findings":["First finding","Second finding"]},"parent_run_id":"22222222-2222-4222-8222-222222222222","root_run_id":"22222222-2222-4222-8222-222222222222","trigger":{"type":"agent","id":"coordinator","tool_call_id":"call_invoke_agent"},"created_at":"2026-10-02T10:00:01Z","updated_at":"2026-10-02T10:00:08Z","started_at":"2026-10-02T10:00:01Z","finished_at":"2026-10-02T10:00:08Z"}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}}},"x-documentation-source-tag":"Run resource","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Runs","name":"Get run","description":"Get run details: status, errors, target, timing, token usage and cost, by run UUID or public id; usage is cumulative.","operationId":"getRun"}},"patch":{"operationId":"updateRun","tags":["execution/Runs/Runs"],"summary":"Update run","description":"Update a run. Requires project.runs.write.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Run to update. Conversation-owned runs also require editor access on the conversation. Run-scoped credentials cannot update runs."},"required":true,"description":"Run to update. Conversation-owned runs also require editor access on the conversation. Run-scoped credentials cannot update runs.","example":"11111111-1111-4111-8111-111111111111","name":"run_id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"If-Match","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRunRequest"},"examples":{"minimal":{"summary":"Update title","value":{"title":"Summarize text"}},"update":{"summary":"Update title and labels","value":{"title":"Summarize text","labels":{"team":"support"}}}}}}},"responses":{"200":{"description":"Updated run resource","headers":{"ETag":{"schema":{"type":"string"},"description":"Updated metadata version."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"},"examples":{"minimal":{"summary":"Update title","value":{"id":"11111111-1111-4111-8111-111111111111","run_id":"11111111-1111-4111-8111-111111111111","status":"completed","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"summarize"},"input":{"text":"A short document."},"output":{"summary":"A short summary."},"title":"Summarize text","created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"api_key","id":"key_example"},"started_at":"2026-10-02T10:00:00Z","finished_at":"2026-10-02T10:00:02Z"}},"update":{"summary":"Update title and labels","value":{"id":"11111111-1111-4111-8111-111111111111","run_id":"11111111-1111-4111-8111-111111111111","status":"completed","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"summarize"},"input":{"text":"A short document."},"output":{"summary":"A short summary."},"title":"Summarize text","created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"api_key","id":"key_example"},"started_at":"2026-10-02T10:00:00Z","finished_at":"2026-10-02T10:00:02Z","labels":{"team":"support"}}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":409}}}]}}}},"412":{"description":"Precondition failed","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":412}}}]}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":413}}}]}}}},"428":{"description":"Precondition required","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":428}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}}},"x-codeSamples":[{"lang":"json","label":"Request JSON","example":"minimal","contentType":"application/json","source":"{\n  \"title\": \"Summarize text\"\n}"},{"lang":"json","label":"Request JSON","example":"update","contentType":"application/json","source":"{\n  \"title\": \"Summarize text\",\n  \"labels\": {\n    \"team\": \"support\"\n  }\n}"}],"x-documentation-source-tag":"Run resource","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Runs","name":"Update run","description":"Update a run. Requires project.runs.write.","operationId":"updateRun"}},"delete":{"operationId":"deleteRun","tags":["execution/Runs/Runs"],"summary":"Delete run","description":"Delete a run. Requires project.runs.admin; API keys also need delete scope.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Run to delete. Must be completed, failed or cancelled, with execution stopped, no direct children, and no active parent; otherwise deletion returns 409. Conversation-owned runs also require admin access on the conversation. Run-scoped credentials cannot delete runs. Deleting a run also deletes its events and owned input requests; referenced artifact files are retained."},"required":true,"description":"Run to delete. Must be completed, failed or cancelled, with execution stopped, no direct children, and no active parent; otherwise deletion returns 409. Conversation-owned runs also require admin access on the conversation. Run-scoped credentials cannot delete runs. Deleting a run also deletes its events and owned input requests; referenced artifact files are retained.","example":"11111111-1111-4111-8111-111111111111","name":"run_id","in":"path"}],"responses":{"200":{"description":"Run, its events, and owned input requests deleted; referenced artifact files are retained.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"},"examples":{"deleted":{"value":{"ok":true}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":409}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}}},"x-documentation-source-tag":"Run resource","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Runs","name":"Delete run","description":"Delete a run. Requires project.runs.admin; API keys also need delete scope.","operationId":"deleteRun"}}},"/runs/{run_id}/event-tokens":{"post":{"operationId":"createRunEventToken","tags":["execution/Runs/Runtime"],"security":[{"runExecutionAuth":[]}],"summary":"Create run event token","description":"Issue a nondelegating event-writer credential for a direct child run.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Nonterminal direct child of the credential-bound run. Requires a runtime credential allowed to delegate under the current execution generation or executor lease. Unrelated runs are hidden as not found (404); a terminal parent or child, stale generation, authentication-parked child, or detached child generation returns 409. The resulting event-writer token is bound to this child run. Modern tokens cannot mint event tokens. Tokens issued under an execution or worker generation retain that generation. For executor-lease-only parent credentials, the lease is checked at issuance; the child token does not retain executorLeaseOwner. Only the retained legacy route preserves nested delegation for delegating generation-bound credentials. It cannot read events, finalize, heartbeat or create children."},"required":true,"description":"Nonterminal direct child of the credential-bound run. Requires a runtime credential allowed to delegate under the current execution generation or executor lease. Unrelated runs are hidden as not found (404); a terminal parent or child, stale generation, authentication-parked child, or detached child generation returns 409. The resulting event-writer token is bound to this child run. Modern tokens cannot mint event tokens. Tokens issued under an execution or worker generation retain that generation. For executor-lease-only parent credentials, the lease is checked at issuance; the child token does not retain executorLeaseOwner. Only the retained legacy route preserves nested delegation for delegating generation-bound credentials. It cannot read events, finalize, heartbeat or create children.","example":"11111111-1111-4111-8111-111111111111","name":"run_id","in":"path"}],"responses":{"201":{"description":"Scoped event token created. A signed event writer token must be bound to the addressed run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEventToken"},"examples":{"example":{"summary":"Example response","value":{"token":"example-token","token_type":"Bearer","expires_at":"2026-10-02T10:05:00Z","run_id":"11111111-1111-4111-8111-111111111111","permissions":["run.events.append"]}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":409}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}}},"x-documentation-source-tag":"Runtime","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Runtime","name":"Create run event token","description":"Issue a nondelegating event-writer credential for a direct child run.","operationId":"createRunEventToken"}}},"/runs/{run_id}/heartbeats":{"post":{"operationId":"createRunHeartbeat","tags":["execution/Runs/Runtime"],"security":[{"runExecutionAuth":[]}],"summary":"Send run heartbeat","description":"Renew the execution lease of the current run generation.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"example":"11111111-1111-4111-8111-111111111111","name":"run_id","in":"path"},{"schema":{"type":"string","enum":["v2"]},"required":false,"description":"Opt in to atomic replacement of all five exact-child credentials on successful inherited heartbeat.","name":"x-veryfront-run-credential-rotation","in":"header"},{"schema":{"type":"string","enum":["true"]},"required":false,"description":"Atomically accept this detached dispatch before starting execution. A duplicate returns 409.","name":"x-veryfront-run-dispatch-acceptance","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRunHeartbeatRequest"},"examples":{"minimal":{"summary":"Renew with default duration","value":{}},"renew":{"summary":"Renew execution authority","value":{"lease_duration_seconds":60}}}}}},"responses":{"200":{"description":"Execution lease renewed","headers":{"X-Veryfront-Run-Credential-Rotation":{"description":"Present with all five replacement credentials after negotiated inherited v2 rotation.","schema":{"type":"string","enum":["v2"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunHeartbeat"},"examples":{"minimal":{"summary":"Renew with default duration","value":{"run_id":"11111111-1111-4111-8111-111111111111","expires_at":"2026-10-02T10:01:00Z"}},"renew":{"summary":"Renew execution authority","value":{"run_id":"11111111-1111-4111-8111-111111111111","expires_at":"2026-10-02T10:01:00Z"}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":409}}}]}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":413}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}}},"x-codeSamples":[{"lang":"json","label":"Request JSON","example":"minimal","contentType":"application/json","source":"{}"},{"lang":"json","label":"Request JSON","example":"renew","contentType":"application/json","source":"{\n  \"lease_duration_seconds\": 60\n}"}],"x-documentation-source-tag":"Runtime","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Runtime","name":"Send run heartbeat","description":"Renew the execution lease of the current run generation.","operationId":"createRunHeartbeat"}}},"/runs/{run_id}/runtime/ownership":{"get":{"operationId":"getRunRuntimeOwnership","tags":["execution/Runs/Runtime"],"security":[{"bearerAuth":[]}],"summary":"Read live runtime ownership","description":"Read the current managed generation and live lease budget without renewing authority.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"run_id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":16384,"description":"Required current-generation terminal credential, paired with the signed run invocation Bearer credential."},"required":true,"description":"Required current-generation terminal credential, paired with the signed run invocation Bearer credential.","name":"x-veryfront-run-terminal-token","in":"header"}],"responses":{"200":{"description":"Current live managed execution ownership; no credential is issued or renewed","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"identity":{"type":"object","properties":{"project_id":{"type":"string","format":"uuid"},"canonical_run_id":{"type":"string","format":"uuid"},"public_run_id":{"type":"string","minLength":1,"maxLength":256}},"required":["project_id","canonical_run_id","public_run_id"],"additionalProperties":false},"generation":{"type":"object","properties":{"worker_id":{"type":"string","minLength":1,"maxLength":256},"dispatch_nonce":{"type":"string","format":"uuid"},"transport_recovery_attempt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["worker_id","dispatch_nonce","transport_recovery_attempt"],"additionalProperties":false},"lease_remaining_ms":{"type":"integer","minimum":1,"maximum":300000},"acknowledged_external_sequence":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["version","identity","generation","lease_remaining_ms","acknowledged_external_sequence"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Runtime","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Runtime","name":"Read live runtime ownership","description":"Read the current managed generation and live lease budget without renewing authority.","operationId":"getRunRuntimeOwnership"}}},"/runs/{run_id}/runtime/recovery-ownership":{"get":{"operationId":"getRunRuntimeRecoveryOwnership","tags":["execution/Runs/Runtime"],"security":[{"bearerAuth":[]}],"summary":"Read managed recovery ownership","description":"Read the current paired runtime generation and its committed recovery cursor.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"run_id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":16384,"description":"Required current-generation terminal credential, paired with the signed run invocation Bearer credential."},"required":true,"description":"Required current-generation terminal credential, paired with the signed run invocation Bearer credential.","name":"x-veryfront-run-terminal-token","in":"header"}],"responses":{"200":{"description":"Current live managed execution ownership; no credential is issued or renewed","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"identity":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid"},"canonicalRunId":{"type":"string","format":"uuid"},"publicRunId":{"type":"string","minLength":1,"maxLength":256},"agentId":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-zA-Z0-9_-]+$"},"threadId":{"type":"string","format":"uuid"}},"required":["projectId","canonicalRunId","publicRunId","agentId","threadId"],"additionalProperties":false},"generation":{"type":"object","properties":{"workerId":{"type":"string","minLength":1,"maxLength":256},"dispatchNonce":{"type":"string","format":"uuid"},"transportRecoveryAttempt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workerId","dispatchNonce","transportRecoveryAttempt"],"additionalProperties":false},"leaseRemainingMs":{"type":"integer","minimum":1,"maximum":300000},"acknowledgedEventId":{"type":"integer","minimum":0,"maximum":9007199254740991},"acknowledgedExternalSequence":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["version","identity","generation","leaseRemainingMs","acknowledgedEventId","acknowledgedExternalSequence"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Runtime","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Runtime","name":"Read managed recovery ownership","description":"Read the current paired runtime generation and its committed recovery cursor.","operationId":"getRunRuntimeRecoveryOwnership"}}},"/runs/{run_id}/runtime/recovery-events":{"get":{"operationId":"getRunRuntimeRecoveryEvents","tags":["execution/Runs/Runtime"],"security":[{"bearerAuth":[]}],"summary":"Read authenticated recovery events","description":"Read a bounded immutable-source event suffix under paired live generation authority.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"run_id","in":"path"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991},"required":false,"name":"after_event_id","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991},"required":false,"name":"through_event_id","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991},"required":false,"name":"through_external_sequence","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":16384,"description":"Required current-generation terminal credential, paired with the signed run invocation Bearer credential."},"required":true,"description":"Required current-generation terminal credential, paired with the signed run invocation Bearer credential.","name":"x-veryfront-run-terminal-token","in":"header"}],"responses":{"200":{"description":"Current live managed execution ownership; no credential is issued or renewed","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"identity":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid"},"canonicalRunId":{"type":"string","format":"uuid"},"publicRunId":{"type":"string","minLength":1,"maxLength":256},"agentId":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-zA-Z0-9_-]+$"},"threadId":{"type":"string","format":"uuid"}},"required":["projectId","canonicalRunId","publicRunId","agentId","threadId"],"additionalProperties":false},"generation":{"type":"object","properties":{"workerId":{"type":"string","minLength":1,"maxLength":256},"dispatchNonce":{"type":"string","format":"uuid"},"transportRecoveryAttempt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workerId","dispatchNonce","transportRecoveryAttempt"],"additionalProperties":false},"leaseRemainingMs":{"type":"integer","minimum":1,"maximum":300000},"source":{"type":"object","properties":{"sourceHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"sourceBinding":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid"},"environmentId":{"type":"string","format":"uuid"},"releaseId":{"type":"string","format":"uuid"}},"required":["projectId","environmentId","releaseId"],"additionalProperties":false}},"required":["sourceHash","sourceBinding"],"additionalProperties":false},"target":{"type":"object","properties":{"acknowledgedEventId":{"type":"integer","minimum":0,"maximum":9007199254740991},"acknowledgedExternalSequence":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["acknowledgedEventId","acknowledgedExternalSequence"],"additionalProperties":false},"events":{"type":"array","items":{"type":"object","properties":{"eventId":{"type":"integer","minimum":1,"maximum":9007199254740991},"externalSequence":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991},"eventType":{"type":"string","minLength":1,"maxLength":256},"payloadHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"payload":{},"appendGeneration":{"type":"object","properties":{"workerId":{"type":"string","minLength":1,"maxLength":256},"dispatchNonce":{"type":"string","format":"uuid"},"transportRecoveryAttempt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workerId","dispatchNonce","transportRecoveryAttempt"],"additionalProperties":false},"dispatchFactEventId":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["eventId","externalSequence","eventType","payloadHash","appendGeneration","dispatchFactEventId"],"additionalProperties":false},"maxItems":100},"nextAfterEventId":{"type":["integer","null"],"minimum":0,"maximum":9007199254740991},"continuations":{"type":"array","items":{"type":"object","properties":{"checkpointEventId":{"type":"integer","minimum":1,"maximum":9007199254740991},"payloadHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"fact":{"type":"object","properties":{"type":{"type":"string","enum":["AGENT_RUN_MANAGED_RECOVERY_CONTINUATION_SEALED"]},"version":{"type":"number","enum":[1]},"dispatchFactEventId":{"type":"integer","minimum":1,"maximum":9007199254740991},"generation":{"type":"object","properties":{"workerId":{"type":"string","minLength":1,"maxLength":256},"dispatchNonce":{"type":"string","format":"uuid"},"transportRecoveryAttempt":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["workerId","dispatchNonce","transportRecoveryAttempt"],"additionalProperties":false},"source":{"type":"object","properties":{"sourceHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"sourceBinding":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid"},"environmentId":{"type":"string","format":"uuid"},"releaseId":{"type":"string","format":"uuid"}},"required":["projectId","environmentId","releaseId"],"additionalProperties":false}},"required":["sourceHash","sourceBinding"],"additionalProperties":false},"snapshotEventId":{"type":"integer","minimum":1,"maximum":9007199254740991},"snapshotExternalSequence":{"type":"integer","minimum":1,"maximum":9007199254740991},"snapshot":{}},"required":["type","version","dispatchFactEventId","generation","source","snapshotEventId","snapshotExternalSequence","snapshot"],"additionalProperties":false}},"required":["checkpointEventId","payloadHash","fact"],"additionalProperties":false},"maxItems":100}},"required":["version","identity","generation","leaseRemainingMs","source","target","events","nextAfterEventId","continuations"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Runtime","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Runtime","name":"Read authenticated recovery events","description":"Read a bounded immutable-source event suffix under paired live generation authority.","operationId":"getRunRuntimeRecoveryEvents"}}},"/runs/{run_id}/pause-checkpoint":{"get":{"operationId":"getRunPauseCheckpoint","tags":["execution/Runs/Runtime"],"security":[{"projectRunStopAuth":[]}],"summary":"Get dispatch continuation","description":"Return the dispatch continuation.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"run_id","in":"path"},{"schema":{"type":"string","enum":["true"]},"required":false,"name":"boundary","in":"query"}],"responses":{"200":{"description":"Private continuation for the current dispatch","content":{"application/json":{"schema":{"type":"object","properties":{"stop":{"type":"boolean","description":"True for a superseded dispatch, which also receives no checkpoint."},"pauseRequested":{"type":"boolean"},"checkpoint":{"type":["object","null"],"additionalProperties":{}}},"required":["stop","checkpoint"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Runtime","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Runtime","name":"Get dispatch continuation","description":"Return the dispatch continuation.","operationId":"getRunPauseCheckpoint"}}},"/runs/{run_id}/cancellation-status":{"get":{"operationId":"getRunCancellationStatus","tags":["execution/Runs/Runtime"],"security":[{"projectRunStopAuth":[]}],"summary":"Read run cancellation status","description":"Read the cancellation request for this authenticated task or workflow attempt without acknowledging a stop.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-zA-Z0-9_-]+$"},"required":true,"name":"run_id","in":"path"}],"responses":{"200":{"description":"Attempt-bound cancellation request status","content":{"application/json":{"schema":{"type":"object","properties":{"stop_requested":{"type":"boolean","description":"A cancellation request is committed for this exact project run and execution attempt. This does not acknowledge stopped execution."}},"required":["stop_requested"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Runtime","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Runtime","name":"Read run cancellation status","description":"Read the cancellation request for this authenticated task or workflow attempt without acknowledging a stop.","operationId":"getRunCancellationStatus"}}},"/runs/{run_id}/cancellation-ack":{"post":{"operationId":"createRunCancellationAcknowledgement","tags":["execution/Runs/Runtime"],"security":[{"projectRunStopAuth":[]}],"summary":"Acknowledge run cancellation","description":"Acknowledge a cancellation stop.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"run_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Runtime stop acknowledgement result","content":{"application/json":{"schema":{"type":"object","properties":{"acknowledged":{"type":"boolean","description":"Whether the API-owned task or workflow is confirmed stopped after cancellation."}},"required":["acknowledged"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Runtime","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Runtime","name":"Acknowledge run cancellation","description":"Acknowledge a cancellation stop.","operationId":"createRunCancellationAcknowledgement"}}},"/runs/{run_id}/pause-ack":{"post":{"operationId":"createRunPauseAcknowledgement","tags":["execution/Runs/Runtime"],"security":[{"projectRunStopAuth":[]}],"summary":"Acknowledge run pause","description":"Acknowledge a run pause.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"run_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"checkpoint":{"type":["object","null"],"additionalProperties":{},"description":"An agent’s settled model/tool step, retained privately at the pause boundary. A workflow stops between nodes; a task continues through its atomic invocation and its executor retains the settled response until manual resume."},"settlement_required":{"type":"boolean","enum":[true]}},"additionalProperties":false},{"type":"object","properties":{"settled":{"type":"boolean","enum":[true],"description":"Sent by the original dispatch, with the same capability, once output flush, cleanup and execution have positively ended; it holds the lease until then."}},"required":["settled"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"Called by the runtime executing an API-owned agent, task or workflow at a safe boundary: whether it stops there.","content":{"application/json":{"schema":{"type":"object","properties":{"stop":{"type":"boolean","description":"True when a requested pause was confirmed for this attempt, or the attempt no longer holds the run: stop at this safe boundary. False: continue. Repeating the call after a lost reply returns the same answer."}},"required":["stop"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Runtime","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Runtime","name":"Acknowledge run pause","description":"Acknowledge a run pause.","operationId":"createRunPauseAcknowledgement"}}},"/runs/{run_id}/child-runs":{"get":{"operationId":"listRunChildRuns","tags":["execution/Runs/Child Runs"],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]},{"runExecutionAuth":[]}],"summary":"List child runs","description":"List direct child runs by canonical parent UUID; follow page_info.next for further children.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"example":"11111111-1111-4111-8111-111111111111","name":"run_id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"format":"int32"},"required":false,"description":"Maximum number of results to return.","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"The `page_info.next` of the previous page: the `run_id` of its last child. A cursor that is not a child of this run returns a 400."},"required":false,"description":"Opaque `page_info.next` cursor. Reuse it with the same filters, sort order and descendant scope.","name":"cursor","in":"query"}],"responses":{"200":{"description":"Child run page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunsPage"},"examples":{"example":{"summary":"Example response","value":{"data":[{"id":"44444444-4444-4444-8444-444444444444","run_id":"44444444-4444-4444-8444-444444444444","status":"completed","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"summarize"},"input":{"text":"A short document."},"output":{"summary":"A short summary."},"title":"Summarize text","parent_run_id":"11111111-1111-4111-8111-111111111111","root_run_id":"11111111-1111-4111-8111-111111111111","created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"api_key","id":"key_example"},"started_at":"2026-10-02T10:00:00Z","finished_at":"2026-10-02T10:00:02Z"}],"page_info":{"next":null}}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}}},"x-documentation-source-tag":"Child runs","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Child Runs","name":"List child runs","description":"List direct child runs by canonical parent UUID; follow page_info.next for further children.","operationId":"listRunChildRuns"}}},"/conversations/{conversation_id}/child-runs":{"get":{"operationId":"listConversationChildRuns","tags":["execution/Runs/Conversation Runs"],"summary":"List conversation child runs","description":"List conversation child runs. Requires project.runs.read.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"example":"00000000-0000-4000-8000-000000000001","name":"conversation_id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":false,"description":"Filter by tool_call_id.","name":"tool_call_id","in":"query"},{"$ref":"#/components/parameters/PaginationCursor"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum number of records in a page, from 1 to 100. Defaults to 20.","format":"int32"},"required":false,"description":"Maximum number of records in a page, from 1 to 100. Defaults to 20.","name":"limit","in":"query"}],"responses":{"200":{"description":"Child run page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunsPage"},"examples":{"example":{"summary":"Example response","value":{"data":[{"id":"44444444-4444-4444-8444-444444444444","run_id":"44444444-4444-4444-8444-444444444444","status":"completed","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"summarize"},"input":{"text":"A short document."},"output":{"summary":"A short summary."},"title":"Summarize text","parent_run_id":"11111111-1111-4111-8111-111111111111","root_run_id":"11111111-1111-4111-8111-111111111111","created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"api_key","id":"key_example"},"started_at":"2026-10-02T10:00:00Z","finished_at":"2026-10-02T10:00:02Z"}],"page_info":{"next":null}}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}}},"x-documentation-source-tag":"Conversation runs","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Conversation Runs","name":"List conversation child runs","description":"List conversation child runs. Requires project.runs.read.","operationId":"listConversationChildRuns"}}},"/conversations/{conversation_id}/runs":{"get":{"operationId":"listConversationRuns","tags":["execution/Runs/Conversation Runs"],"summary":"List conversation runs","description":"List conversation runs. Requires project.runs.read.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"example":"00000000-0000-4000-8000-000000000001","name":"conversation_id","in":"path"},{"$ref":"#/components/parameters/PaginationCursor"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum number of records in a page, from 1 to 100. Defaults to 20.","format":"int32"},"required":false,"description":"Maximum number of records in a page, from 1 to 100. Defaults to 20.","name":"limit","in":"query"},{"schema":{"type":"array","items":{"type":"string"},"maxItems":32,"description":"Run statuses to include. Values within this filter use OR; different filters use AND."},"required":false,"description":"Filter by status. Repeat the query parameter for multiple values; comma-separated values remain a compatibility alias. Values within this filter use OR; different filters use AND.","style":"form","explode":true,"name":"status","in":"query"}],"responses":{"200":{"description":"Run page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunsPage"},"examples":{"example":{"summary":"Example response","value":{"data":[{"id":"11111111-1111-4111-8111-111111111111","run_id":"11111111-1111-4111-8111-111111111111","status":"completed","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"summarize"},"input":{"text":"A short document."},"output":{"summary":"A short summary."},"title":"Summarize text","created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"api_key","id":"key_example"},"started_at":"2026-10-02T10:00:00Z","finished_at":"2026-10-02T10:00:02Z"}],"page_info":{"next":null}}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}}},"x-documentation-source-tag":"Conversation runs","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Conversation Runs","name":"List conversation runs","description":"List conversation runs. Requires project.runs.read.","operationId":"listConversationRuns"}}},"/projects/{project_reference}/runs":{"get":{"operationId":"listProjectRuns","tags":["execution/Runs/Project Runs"],"summary":"List project runs","description":"List project runs. Requires project.runs.read.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"example":"example","name":"project_reference","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]*$","description":"Discover agent runs with this persisted task identity across conversations. Matches canonical task metadata or the first enqueue request; results are not task authorization evidence."},"required":false,"description":"Filter by the persisted orchestration task identity in task_id; this is distinct from the execution definition target.","name":"task_id","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum number of records in a page, from 1 to 100. Defaults to 20.","format":"int32"},"required":false,"description":"Maximum number of records in a page, from 1 to 100. Defaults to 20.","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Opaque cursor returned by the previous page. Reuse with unchanged filters and ordering."},"required":false,"description":"Opaque page_info.next cursor; reuse with unchanged filters and ordering.","name":"cursor","in":"query"},{"schema":{"type":"string","enum":["created_at","status","duration"],"default":"created_at","description":"Field used to order runs: created_at, status or duration. Defaults to created_at."},"required":false,"description":"Field used to order runs: created_at, status or duration. Defaults to created_at.","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort direction: asc or desc. Defaults to desc."},"required":false,"description":"Sort direction: asc or desc. Defaults to desc.","name":"sort_order","in":"query"},{"schema":{"type":"array","items":{"type":"string"},"maxItems":32,"description":"Run statuses to include. Values within this filter use OR; different filters use AND."},"required":false,"description":"Filter by status. Repeat the query parameter for multiple values; comma-separated values remain a compatibility alias. Values within this filter use OR; different filters use AND.","style":"form","explode":true,"name":"status","in":"query"},{"schema":{"type":"array","items":{"type":"string","enum":["agent","task","workflow","eval"]},"minItems":1,"maxItems":4,"description":"Execution definition types to include: agent, task, workflow or legacy eval."},"required":false,"description":"Filter by execution definition type.","style":"form","explode":true,"name":"target_type","in":"query"},{"schema":{"type":"array","items":{"type":"string","enum":["user","api_key","service_account","system","schedule","webhook","agent","task","workflow"]},"minItems":1,"maxItems":9,"description":"Trigger types to include: user, api_key, service_account, system, schedule, webhook, agent, task or workflow."},"required":false,"description":"Filter by trigger_type.","style":"form","explode":true,"name":"trigger_type","in":"query"},{"schema":{"type":"string","enum":["true","false"],"default":"false","description":"true lists only top-level runs (parent_run_id null). Defaults to false."},"required":false,"name":"root_only","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"parent_run_id","in":"query"},{"schema":{"type":"array","items":{"type":"string"},"maxItems":32},"required":false,"description":"Filter by execution definition ID.","style":"form","explode":true,"name":"target_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":false,"description":"Filter by trigger_id.","name":"trigger_id","in":"query"}],"responses":{"200":{"description":"Run page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunsPage"},"examples":{"example":{"summary":"Example response","value":{"data":[{"id":"11111111-1111-4111-8111-111111111111","run_id":"11111111-1111-4111-8111-111111111111","status":"completed","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"summarize"},"input":{"text":"A short document."},"output":{"summary":"A short summary."},"title":"Summarize text","created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"api_key","id":"key_example"},"started_at":"2026-10-02T10:00:00Z","finished_at":"2026-10-02T10:00:02Z"}],"page_info":{"next":null}}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}}},"x-documentation-source-tag":"Project runs","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Project Runs","name":"List project runs","description":"List project runs. Requires project.runs.read.","operationId":"listProjectRuns"}}},"/projects/{project_reference}/public-inference-runs/{run_id}":{"get":{"operationId":"getProjectPublicInferenceRun","tags":["execution/Runs/Project Runs"],"security":[{"bearerAuth":[]}],"summary":"Get project public inference run status","description":"Return a public inference run status. Requires project.runs.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"run_id","in":"path"}],"responses":{"200":{"description":"Redacted status of a published application inference run: only run identity, project identity, status and terminal time.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicInferenceRunStatus"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project runs","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Project Runs","name":"Get project public inference run status","description":"Return a public inference run status. Requires project.runs.read.","operationId":"getProjectPublicInferenceRun"}}},"/projects/{project_reference}/webhooks/{webhook_definition_id}/runs":{"get":{"operationId":"listProjectWebhookRuns","tags":["execution/Runs/Webhook Runs"],"summary":"List project webhook runs","description":"List webhook runs. Requires project.runs.read.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"example":"example","name":"project_reference","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"example":"00000000-0000-4000-8000-000000000001","name":"webhook_definition_id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum number of records in a page, from 1 to 100. Defaults to 20.","format":"int32"},"required":false,"description":"Maximum number of records in a page, from 1 to 100. Defaults to 20.","name":"limit","in":"query"},{"schema":{"type":"string","format":"uuid","description":"The `page_info.next` of the previous page: the `webhook_event_id` of its last run. Keep `sort_order` the same across pages."},"required":false,"description":"Opaque `page_info.next` cursor. Reuse it with the same filters, sort order and descendant scope.","name":"cursor","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"description":"Creation order: desc (newest first, the default) or asc."},"required":false,"name":"sort_order","in":"query"}],"responses":{"200":{"description":"Run page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunsPage"},"examples":{"example":{"summary":"Example response","value":{"data":[{"id":"11111111-1111-4111-8111-111111111111","run_id":"11111111-1111-4111-8111-111111111111","status":"completed","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"summarize"},"input":{"text":"A short document."},"output":{"summary":"A short summary."},"title":"Summarize text","created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"webhook","id":"webhook_definition_example"},"started_at":"2026-10-02T10:00:00Z","finished_at":"2026-10-02T10:00:02Z"}],"page_info":{"next":null}}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}}},"x-documentation-source-tag":"Webhook runs","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Webhook Runs","name":"List project webhook runs","description":"List webhook runs. Requires project.runs.read.","operationId":"listProjectWebhookRuns"}}},"/runs/event-types":{"get":{"operationId":"listRunEventTypes","tags":["execution/Runs/Run Events"],"summary":"List run event types","description":"List run event types.","parameters":[{"schema":{"type":"string","enum":["canonical-v1"]},"required":false,"name":"event_representation","in":"query"}],"responses":{"200":{"description":"Lists the available run event types.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ListRunEventTypesResponse"},{"type":"object","properties":{"version":{"type":"string","enum":["1"]},"revision":{"type":"string","minLength":1},"events":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"meaning":{"type":"string"},"profile":{"type":"string","enum":["stored","live"]},"schemas":{"type":"object","properties":{"public":{"type":"string"},"diagnostic":{"type":["string","null"]}},"required":["public","diagnostic"],"additionalProperties":false}},"required":["type","meaning","profile","schemas"],"additionalProperties":false}}},"required":["version","revision","events"],"additionalProperties":false}]},"examples":{"example":{"summary":"Example response","value":{"data":[{"type":"MODEL_CALL_COMPLETED","name":"Model call completed","group":"Model","scope":"ag-ui","event_class":"fact","status":"active","viewer_visibility":"full","description":"Records model usage after a completed call.","fields":["provider","model","inputTokens","outputTokens","cacheCreationTokens","cacheReadTokens","totalTokens","costCredits","latencyMs","usageCaptureStatus","providerRequestId","modelCallContextEventId"]}]}}}}}},"400":{"description":"Canonical Events v1 refusal","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}},"application/json":{"schema":{"$ref":"#/components/schemas/CanonicalV1Error"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Canonical Events v1 refusal","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}},"application/json":{"schema":{"$ref":"#/components/schemas/CanonicalV1Error"}}}},"409":{"description":"Canonical Events v1 refusal","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":409}}}]}},"application/json":{"schema":{"$ref":"#/components/schemas/CanonicalV1Error"}}}},"422":{"description":"Canonical Events v1 refusal","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":422}}}]}},"application/json":{"schema":{"$ref":"#/components/schemas/CanonicalV1Error"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}},"500":{"description":"Canonical Events v1 refusal","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":500}}}]}},"application/json":{"schema":{"$ref":"#/components/schemas/CanonicalV1Error"}}}}},"x-documentation-source-tag":"Run events","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Run Events","name":"List run event types","description":"List run event types.","operationId":"listRunEventTypes"}}},"/runs/{run_id}/events":{"get":{"operationId":"listRunEvents","security":[{"bearerAuth":[]},{"apiKeyAuth":[]},{"runExecutionAuth":[]}],"tags":["execution/Runs/Run Events"],"summary":"List run events","description":"Read run event details: errors, steps, model calls and tool results, paginated by canonical UUID; MODEL_CALL_COMPLETED reports per-call usage.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Canonical run UUID. Normal callers need access to the run owner and project.runs.read. A bound eval runtime may instead read its authorized direct agent child."},"required":true,"description":"Canonical run UUID. Normal callers need access to the run owner and project.runs.read. A bound eval runtime may instead read its authorized direct agent child.","name":"run_id","in":"path"},{"schema":{"anyOf":[{"type":"string","enum":["run-events-v1"],"description":"Use `run-events-v1` to receive Agent Events Protocol CloudEvents with opaque page cursors. Omit it to keep the released run-event row contract."},{"type":"string","enum":["canonical-v1"]}],"description":"Use `run-events-v1` to receive Agent Events Protocol CloudEvents with opaque page cursors. Omit it to keep the released run-event row contract."},"required":false,"description":"Use `run-events-v1` to receive Agent Events Protocol CloudEvents with opaque page cursors. Omit it to keep the released run-event row contract.","name":"event_representation","in":"query"},{"schema":{"type":"string","description":"The previous page’s continuation cursor. Released row reads use a positive event_id. With event_representation=run-events-v1, this is the opaque `page_info.next_cursor` token from the previous target page."},"required":false,"description":"Opaque `page_info.next` cursor. Reuse it with the same filters, sort order and descendant scope.","name":"cursor","in":"query"},{"schema":{"anyOf":[{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum number of records in a page, from 1 to 100. Defaults to 20.","format":"int32"},{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}]}],"default":20,"description":"Maximum number of records in a page, from 1 to 100. Defaults to 20.","format":"int32"},"required":false,"description":"Maximum number of records in a page, from 1 to 100. Defaults to 20.","name":"limit","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["asc","desc"],"default":"asc","description":"Event order by durable event id. `asc` returns older events first; `desc` returns newer events first. Defaults to `asc`."},{"type":"string","enum":["asc","desc"]}],"default":"asc","description":"Event order by durable event id. `asc` returns older events first; `desc` returns newer events first. Defaults to `asc`."},"required":false,"description":"Event order by durable event id. `asc` returns older events first; `desc` returns newer events first. Defaults to `asc`.","name":"sort_order","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["fact","delta"],"description":"Event class to include: `fact` for state changes or `delta` for streaming fragments. If omitted, returns both."},{"type":"string","enum":["fact","delta"]}],"description":"Event class to include: `fact` for state changes or `delta` for streaming fragments. If omitted, returns both."},"required":false,"description":"The event class associated with this record.","name":"event_class","in":"query"},{"schema":{"anyOf":[{"type":"array","items":{"type":"string"},"maxItems":32},{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}]},"required":false,"description":"Filter by event_type. Repeat the query parameter for multiple values; comma-separated values remain a compatibility alias. Values within this filter use OR; different filters use AND.","style":"form","explode":true,"name":"event_type","in":"query"},{"schema":{"anyOf":[{"type":"string","description":"If true, returns only events with `is_error: true`. If false, returns other events. If omitted, returns both.","enum":["true","false"]},{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}],"description":"If true, returns only events with `is_error: true`. If false, returns other events. If omitted, returns both."},"required":false,"description":"If true, returns only events with `is_error: true`. If false, returns other events. If omitted, returns both.","name":"is_error","in":"query"},{"schema":{"anyOf":[{"type":"string","format":"date-time","description":"Only events created at or after this instant (ISO 8601 with a UTC offset, inclusive). A summary bucket start can be sent as is."},{"type":"string"}],"description":"Only events created at or after this instant (ISO 8601 with a UTC offset, inclusive). A summary bucket start can be sent as is."},"required":false,"description":"Only events created at or after this instant (ISO 8601 with a UTC offset, inclusive). A summary bucket start can be sent as is.","name":"start","in":"query"},{"schema":{"anyOf":[{"type":"string","format":"date-time","description":"Only events created before this instant (ISO 8601 with a UTC offset, exclusive). Must be later than start. A summary bucket end can be sent as is."},{"type":"string"}],"description":"Only events created before this instant (ISO 8601 with a UTC offset, exclusive). Must be later than start. A summary bucket end can be sent as is."},"required":false,"description":"Only events created before this instant (ISO 8601 with a UTC offset, exclusive). Must be later than start. A summary bucket end can be sent as is.","name":"end","in":"query"},{"schema":{"anyOf":[{"type":"string","minLength":1,"description":"Only events whose envelope span_id, as served to the caller, is exactly this value (tool:<id>, message:<id>, step:<id>, input_request:<id>, run:<id>, with a non-empty <id>)."},{"type":"string"}],"description":"Only events whose envelope span_id, as served to the caller, is exactly this value (tool:<id>, message:<id>, step:<id>, input_request:<id>, run:<id>, with a non-empty <id>)."},"required":false,"description":"Only events whose envelope span_id, as served to the caller, is exactly this value (tool:<id>, message:<id>, step:<id>, input_request:<id>, run:<id>, with a non-empty <id>).","name":"span_id","in":"query"},{"schema":{"anyOf":[{"type":"string","minLength":1,"description":"Only events whose envelope turn_id, as served to the caller, is exactly this value (message:<id>, with a non-empty <id>)."},{"type":"string"}],"description":"Only events whose envelope turn_id, as served to the caller, is exactly this value (message:<id>, with a non-empty <id>)."},"required":false,"description":"Only events whose envelope turn_id, as served to the caller, is exactly this value (message:<id>, with a non-empty <id>).","name":"turn_id","in":"query"},{"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":200,"description":"Case-insensitive substring of the event payload JSON as served to the caller (1-200 characters after trimming, matched literally)."},{"type":"string"}],"description":"Case-insensitive substring of the event payload JSON as served to the caller (1-200 characters after trimming, matched literally)."},"required":false,"description":"Case-insensitive substring of the event payload JSON as served to the caller (1-200 characters after trimming, matched literally).","name":"search","in":"query"},{"schema":{"anyOf":[{"type":"string","description":"If true, includes events from readable descendant runs, up to 16 generations. Results share one `event_id` order and cursor. Each event retains its `run_id` and the payload visibility permitted for that run. Runs the caller cannot read are excluded. Defaults to false.\n\nIf at least one descendant is included, task or workflow runs without stored events do not contribute synthetic lifecycle events. Event IDs are allocated before commit. During active writes, ascending pagination can pass an ID that another run commits later.","enum":["true","false"],"default":"false"},{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}],"default":"false","description":"If true, includes events from readable descendant runs, up to 16 generations. Results share one `event_id` order and cursor. Each event retains its `run_id` and the payload visibility permitted for that run. Runs the caller cannot read are excluded. Defaults to false.\n\nIf at least one descendant is included, task or workflow runs without stored events do not contribute synthetic lifecycle events. Event IDs are allocated before commit. During active writes, ascending pagination can pass an ID that another run commits later."},"required":false,"description":"If true, includes events from readable descendant runs, up to 16 generations. Results share one `event_id` order and cursor. Each event retains its `run_id` and the payload visibility permitted for that run. Runs the caller cannot read are excluded. Defaults to false.\n\nIf at least one descendant is included, task or workflow runs without stored events do not contribute synthetic lifecycle events. Event IDs are allocated before commit. During active writes, ascending pagination can pass an ID that another run commits later.","name":"include_descendants","in":"query"},{"schema":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"},{"type":"null"}]},"required":false,"name":"after_event_id","in":"query"},{"schema":{"type":"string","enum":["run-events-descendants-v1"]},"required":false,"name":"cursor_profile","in":"query"}],"responses":{"200":{"description":"Run events. Editors read diagnostic payloads; viewers read public ones.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ListRunEventsResponse"},{"$ref":"#/components/schemas/TargetRunEventsResponse"},{"type":"object","properties":{"entries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["canonical"]},"event":{"type":"object","properties":{"specversion":{"type":"string","enum":["1.0"]},"vfversion":{"type":"string","enum":["1"]},"id":{"type":"string"},"source":{"type":"string"},"subject":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"datacontenttype":{"type":"string","enum":["application/json"]},"dataschema":{"type":"string"},"data":{"type":"object","additionalProperties":{}},"runid":{"type":"string","minLength":1},"recordedat":{"type":"string","format":"date-time"}},"required":["specversion","vfversion","id","source","subject","type","datacontenttype","dataschema","data","runid","recordedat"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"event_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"run_id":{"type":"string","minLength":1},"storage":{"type":"string","enum":["persisted"]},"view":{"type":"string","enum":["public","diagnostic"]},"recorded_at":{"type":"string","format":"date-time"},"event_class":{"type":["string","null"],"enum":["fact","delta",null]},"is_error":{"type":["boolean","null"]},"span_id":{"type":["string","null"],"minLength":1},"turn_id":{"type":["string","null"],"minLength":1},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1}},"origin":{}},"required":["event_id","run_id","storage","view","recorded_at","event_class","is_error","span_id","turn_id","unrecoverable_fields"],"additionalProperties":false}},"required":["kind","event","metadata"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["legacy"]},"reason":{"type":"string","enum":["unknown_type","reserved_type","blocked_type","unclassified_outcome","unclassified_request","unclassified_dispatch","malformed_payload","discriminator_conflict","unavailable_converter","derived_history","unprojectable_view"]},"legacy":{"type":"object","properties":{"event_type":{"type":"string","minLength":1},"payload":{}},"required":["event_type","payload"],"additionalProperties":false},"metadata":{"type":"object","properties":{"event_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"run_id":{"type":"string","minLength":1},"storage":{"type":"string","enum":["persisted","derived"]},"view":{"type":"string","enum":["public","diagnostic"]},"recorded_at":{"type":["string","null"],"format":"date-time"},"event_class":{"type":["string","null"],"enum":["fact","delta",null]},"is_error":{"type":["boolean","null"]},"span_id":{"type":["string","null"],"minLength":1},"turn_id":{"type":["string","null"],"minLength":1},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1}},"origin":{}},"required":["event_id","run_id","storage","view","recorded_at","event_class","is_error","span_id","turn_id","unrecoverable_fields"],"additionalProperties":false}},"required":["kind","reason","legacy","metadata"],"additionalProperties":false}]},"maxItems":100},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["entries","next_cursor","has_more"],"additionalProperties":false},{"type":"object","properties":{"cursor_profile":{"type":"string","enum":["run-events-descendants-v1"]},"entries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["canonical"]},"event":{"type":"object","properties":{"specversion":{"type":"string","enum":["1.0"]},"vfversion":{"type":"string","enum":["1"]},"id":{"type":"string"},"source":{"type":"string"},"subject":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"datacontenttype":{"type":"string","enum":["application/json"]},"dataschema":{"type":"string"},"data":{"type":"object","additionalProperties":{}},"runid":{"type":"string","minLength":1},"recordedat":{"type":"string","format":"date-time"}},"required":["specversion","vfversion","id","source","subject","type","datacontenttype","dataschema","data","runid","recordedat"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"event_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"run_id":{"type":"string","minLength":1},"storage":{"type":"string","enum":["persisted"]},"view":{"type":"string","enum":["public","diagnostic"]},"recorded_at":{"type":"string","format":"date-time"},"event_class":{"type":["string","null"],"enum":["fact","delta",null]},"is_error":{"type":["boolean","null"]},"span_id":{"type":["string","null"],"minLength":1},"turn_id":{"type":["string","null"],"minLength":1},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1}},"origin":{}},"required":["event_id","run_id","storage","view","recorded_at","event_class","is_error","span_id","turn_id","unrecoverable_fields"],"additionalProperties":false}},"required":["kind","event","metadata"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["legacy"]},"reason":{"type":"string","enum":["unknown_type","reserved_type","blocked_type","unclassified_outcome","unclassified_request","unclassified_dispatch","malformed_payload","discriminator_conflict","unavailable_converter","derived_history","unprojectable_view"]},"legacy":{"type":"object","properties":{"event_type":{"type":"string","minLength":1},"payload":{}},"required":["event_type","payload"],"additionalProperties":false},"metadata":{"type":"object","properties":{"event_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"run_id":{"type":"string","minLength":1},"storage":{"type":"string","enum":["persisted","derived"]},"view":{"type":"string","enum":["public","diagnostic"]},"recorded_at":{"type":["string","null"],"format":"date-time"},"event_class":{"type":["string","null"],"enum":["fact","delta",null]},"is_error":{"type":["boolean","null"]},"span_id":{"type":["string","null"],"minLength":1},"turn_id":{"type":["string","null"],"minLength":1},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1}},"origin":{}},"required":["event_id","run_id","storage","view","recorded_at","event_class","is_error","span_id","turn_id","unrecoverable_fields"],"additionalProperties":false}},"required":["kind","reason","legacy","metadata"],"additionalProperties":false}]},"maxItems":100},"next_cursor":{"type":["string","null"],"maxLength":2048},"has_more":{"type":"boolean"}},"required":["cursor_profile","entries","next_cursor","has_more"],"additionalProperties":false}]},"examples":{"example":{"summary":"Example response","value":{"data":[{"event_id":42,"event_type":"MODEL_CALL_COMPLETED","payload":{"type":"MODEL_CALL_COMPLETED","provider":"example-provider","model":"example-model","inputTokens":120,"outputTokens":30,"cacheCreationTokens":0,"cacheReadTokens":0,"totalTokens":150,"costCredits":"0.001","latencyMs":800,"usageCaptureStatus":"complete","providerRequestId":"request_example","modelCallContextEventId":null},"is_error":false,"created_at":"2026-10-02T10:00:00Z","run_id":"11111111-1111-4111-8111-111111111111","event_class":"fact","span_id":"span_example","parent_span_id":null,"turn_id":null,"origin_event_type":"MODEL_CALL_COMPLETED","origin_custom_name":null,"unrecoverable_fields":[]}],"page_info":{"next":null}}}}}}},"400":{"description":"Canonical Events v1 refusal","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}},"application/json":{"schema":{"$ref":"#/components/schemas/CanonicalV1Error"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Canonical Events v1 refusal","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}},"application/json":{"schema":{"$ref":"#/components/schemas/CanonicalV1Error"}}}},"409":{"description":"Canonical Events v1 refusal","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":409}}}]}},"application/json":{"schema":{"$ref":"#/components/schemas/CanonicalV1Error"}}}},"422":{"description":"Canonical Events v1 refusal","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":422}}}]}},"application/json":{"schema":{"$ref":"#/components/schemas/CanonicalV1Error"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}},"500":{"description":"Canonical Events v1 refusal","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":500}}}]}},"application/json":{"schema":{"$ref":"#/components/schemas/CanonicalV1Error"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":503}}}]}}}}},"x-documentation-source-tag":"Run events","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Run Events","name":"List run events","description":"Read run event details: errors, steps, model calls and tool results, paginated by canonical UUID; MODEL_CALL_COMPLETED reports per-call usage.","operationId":"listRunEvents"}},"post":{"operationId":"appendRunEvents","tags":["execution/Runs/Run Events"],"security":[{"runEventWriterAuth":[]}],"summary":"Append run events","description":"Append run events.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"example":"11111111-1111-4111-8111-111111111111","name":"run_id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Stable retry key required for Task and Workflow appends; optional for Agent appends."},"required":false,"description":"Stable retry key required for Task and Workflow appends; optional for Agent appends.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppendRunEventsRequest"},"examples":{"text_message":{"summary":"Start an assistant message","value":{"events":[{"type":"TEXT_MESSAGE_START","messageId":"message_example","contentId":"content_example","role":"assistant"}]}}}}}},"responses":{"200":{"description":"Persisted event cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppendRunEventsResponse"},"examples":{"model_call":{"summary":"Record completed model call","value":{"run_id":"11111111-1111-4111-8111-111111111111","latest_event_id":42,"appended_count":1}}}}}},"400":{"description":"Bad request","headers":{"X-Run-Latest-Event-Id":{"schema":{"type":"integer","minimum":0,"description":"Current durable cursor after an authenticated append mismatch."},"required":true},"X-Run-Latest-External-Sequence":{"schema":{"type":"integer","minimum":0,"description":"Current external sequence after an authenticated append mismatch."},"required":true}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":409}}}]}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":413}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":503}}}]}}}}},"x-codeSamples":[{"lang":"json","label":"Request JSON","example":"text_message","contentType":"application/json","source":"{\n  \"events\": [\n    {\n      \"type\": \"TEXT_MESSAGE_START\",\n      \"messageId\": \"message_example\",\n      \"contentId\": \"content_example\",\n      \"role\": \"assistant\"\n    }\n  ]\n}"}],"x-documentation-source-tag":"Run events","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Run Events","name":"Append run events","description":"Append run events.","operationId":"appendRunEvents"}}},"/runs/{run_id}/model-call-inputs":{"get":{"operationId":"listRunModelCallInputs","security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"tags":["execution/Runs/Run Events"],"summary":"List model-call input references","description":"List model-call input event references.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"example":"11111111-1111-4111-8111-111111111111","name":"run_id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":1024},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Model-call input references","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelCallInputReferencesPage"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}}},"x-documentation-source-tag":"Run events","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Run Events","name":"List model-call input references","description":"List model-call input event references.","operationId":"listRunModelCallInputs"}}},"/runs/{run_id}/model-call-usage":{"get":{"operationId":"listRunModelCallUsage","security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"tags":["execution/Runs/Run Events"],"summary":"List model-call usage references","description":"List model-call usage event references.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"example":"11111111-1111-4111-8111-111111111111","name":"run_id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":1024},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Model-call usage references","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelCallUsageReferencesPage"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}}},"x-documentation-source-tag":"Run events","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Run Events","name":"List model-call usage references","description":"List model-call usage event references.","operationId":"listRunModelCallUsage"}}},"/events/{event_id}":{"get":{"operationId":"getCanonicalEvent","security":[{"bearerAuth":[]},{"apiKeyAuth":[]},{"runExecutionAuth":[]}],"tags":["execution/Runs/Run Events"],"summary":"Get canonical event","description":"Read a CloudEvent by exact source and event id.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"example":"1","name":"event_id","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"description":"Exact Agent Events Protocol source. Run sources use durable row ids. Model-call UUID ids read usage evidence; durable row ids read captured input for authorized human run editors.","name":"source","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Exact event id query selector. Requires the by-id path placeholder; supports dot-only ids without URL path normalization."},"required":false,"example":"1","name":"id","in":"query"}],"responses":{"200":{"description":"Target event","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TargetRunEvent"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}}},"x-documentation-source-tag":"Run events","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Run Events","name":"Get canonical event","description":"Read a CloudEvent by exact source and event id.","operationId":"getCanonicalEvent"}}},"/runs/{run_id}/events/{event_id}":{"get":{"operationId":"getRunEvent","security":[{"bearerAuth":[]},{"apiKeyAuth":[]},{"runExecutionAuth":[]}],"tags":["execution/Runs/Run Events"],"summary":"Get run event","description":"Read one recorded event by canonical run UUID and numeric event_id.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"run_id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"event_id","in":"path"},{"schema":{"type":"string","enum":["canonical-v1"]},"required":false,"name":"event_representation","in":"query"}],"responses":{"200":{"description":"Run event","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RunEvent"},{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["canonical"]},"event":{"type":"object","properties":{"specversion":{"type":"string","enum":["1.0"]},"vfversion":{"type":"string","enum":["1"]},"id":{"type":"string"},"source":{"type":"string"},"subject":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"datacontenttype":{"type":"string","enum":["application/json"]},"dataschema":{"type":"string"},"data":{"type":"object","additionalProperties":{}},"runid":{"type":"string","minLength":1},"recordedat":{"type":"string","format":"date-time"}},"required":["specversion","vfversion","id","source","subject","type","datacontenttype","dataschema","data","runid","recordedat"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"event_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"run_id":{"type":"string","minLength":1},"storage":{"type":"string","enum":["persisted"]},"view":{"type":"string","enum":["public","diagnostic"]},"recorded_at":{"type":"string","format":"date-time"},"event_class":{"type":["string","null"],"enum":["fact","delta",null]},"is_error":{"type":["boolean","null"]},"span_id":{"type":["string","null"],"minLength":1},"turn_id":{"type":["string","null"],"minLength":1},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1}},"origin":{}},"required":["event_id","run_id","storage","view","recorded_at","event_class","is_error","span_id","turn_id","unrecoverable_fields"],"additionalProperties":false}},"required":["kind","event","metadata"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["legacy"]},"reason":{"type":"string","enum":["unknown_type","reserved_type","blocked_type","unclassified_outcome","unclassified_request","unclassified_dispatch","malformed_payload","discriminator_conflict","unavailable_converter","derived_history","unprojectable_view"]},"legacy":{"type":"object","properties":{"event_type":{"type":"string","minLength":1},"payload":{}},"required":["event_type","payload"],"additionalProperties":false},"metadata":{"type":"object","properties":{"event_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"run_id":{"type":"string","minLength":1},"storage":{"type":"string","enum":["persisted","derived"]},"view":{"type":"string","enum":["public","diagnostic"]},"recorded_at":{"type":["string","null"],"format":"date-time"},"event_class":{"type":["string","null"],"enum":["fact","delta",null]},"is_error":{"type":["boolean","null"]},"span_id":{"type":["string","null"],"minLength":1},"turn_id":{"type":["string","null"],"minLength":1},"unrecoverable_fields":{"type":"array","items":{"type":"string","minLength":1}},"origin":{}},"required":["event_id","run_id","storage","view","recorded_at","event_class","is_error","span_id","turn_id","unrecoverable_fields"],"additionalProperties":false}},"required":["kind","reason","legacy","metadata"],"additionalProperties":false}]}]},"examples":{"example":{"summary":"Example response","value":{"event_id":42,"event_type":"MODEL_CALL_COMPLETED","payload":{"type":"MODEL_CALL_COMPLETED","provider":"example-provider","model":"example-model","inputTokens":120,"outputTokens":30,"cacheCreationTokens":0,"cacheReadTokens":0,"totalTokens":150,"costCredits":"0.001","latencyMs":800,"usageCaptureStatus":"complete","providerRequestId":"request_example","modelCallContextEventId":null},"is_error":false,"created_at":"2026-10-02T10:00:00Z","run_id":"11111111-1111-4111-8111-111111111111","event_class":"fact","span_id":"span_example","parent_span_id":null,"turn_id":null,"origin_event_type":"MODEL_CALL_COMPLETED","origin_custom_name":null,"unrecoverable_fields":[]}}}}}},"400":{"description":"Canonical Events v1 refusal","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}},"application/json":{"schema":{"$ref":"#/components/schemas/CanonicalV1Error"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Canonical Events v1 refusal","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}},"application/json":{"schema":{"$ref":"#/components/schemas/CanonicalV1Error"}}}},"409":{"description":"Canonical Events v1 refusal","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":409}}}]}},"application/json":{"schema":{"$ref":"#/components/schemas/CanonicalV1Error"}}}},"422":{"description":"Canonical Events v1 refusal","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":422}}}]}},"application/json":{"schema":{"$ref":"#/components/schemas/CanonicalV1Error"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}},"500":{"description":"Canonical Events v1 refusal","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":500}}}]}},"application/json":{"schema":{"$ref":"#/components/schemas/CanonicalV1Error"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":503}}}]}}}}},"x-documentation-source-tag":"Run events","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Run Events","name":"Get run event","description":"Read one recorded event by canonical run UUID and numeric event_id.","operationId":"getRunEvent"}}},"/schemas/run-events/{schema_file}":{"get":{"operationId":"getRunEventDataSchema","tags":["execution/Runs/Run Events"],"summary":"Get run event data schema","description":"Return a run event schema.","parameters":[{"schema":{"type":"string","maxLength":133,"pattern":"^[A-Z][A-Z0-9_]*\\.json$"},"required":true,"name":"schema_file","in":"path"}],"responses":{"200":{"description":"Run event data JSON Schema","content":{"application/json":{"schema":{"type":"object","properties":{"$schema":{"type":"string","format":"uri"},"$id":{"type":"string","format":"uri"}},"required":["$schema","$id"]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Run events","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Run Events","name":"Get run event data schema","description":"Return a run event schema.","operationId":"getRunEventDataSchema"}}},"/runs/{run_id}/events/summary":{"get":{"operationId":"getRunEventsSummary","security":[{"bearerAuth":[]},{"apiKeyAuth":[]},{"runExecutionAuth":[]}],"tags":["execution/Runs/Run Events"],"summary":"Get run event summary","description":"Count run events by type and time bucket without event bodies or usage metrics.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"example":"11111111-1111-4111-8111-111111111111","name":"run_id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":500,"default":60,"description":"Number of time buckets spanning first_event_at up to 1 ms past last_event_at (1-500, default 60). Bucket boundaries are whole milliseconds and every bucket is at least 1 ms wide, so the response holds at most as many buckets as the span has milliseconds and may return fewer than requested (a 10 ms span returns at most 10)."},"required":false,"name":"buckets","in":"query"},{"schema":{"type":"string","enum":["fact","delta"],"description":"Event class to include: `fact` for state changes or `delta` for streaming fragments. If omitted, returns both."},"required":false,"description":"The event class associated with this record.","name":"event_class","in":"query"},{"schema":{"type":"array","items":{"type":"string"},"maxItems":32},"required":false,"description":"Filter by event_type. Repeat the query parameter for multiple values; comma-separated values remain a compatibility alias. Values within this filter use OR; different filters use AND.","style":"form","explode":true,"name":"event_type","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"If true, returns only events with `is_error: true`. If false, returns other events. If omitted, returns both."},"required":false,"name":"is_error","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Only events created at or after this instant (ISO 8601 with a UTC offset, inclusive). A summary bucket start can be sent as is."},"required":false,"name":"start","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Only events created before this instant (ISO 8601 with a UTC offset, exclusive). Must be later than start. A summary bucket end can be sent as is."},"required":false,"name":"end","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Only events whose envelope span_id, as served to the caller, is exactly this value (tool:<id>, message:<id>, step:<id>, input_request:<id>, run:<id>, with a non-empty <id>)."},"required":false,"name":"span_id","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Only events whose envelope turn_id, as served to the caller, is exactly this value (message:<id>, with a non-empty <id>)."},"required":false,"name":"turn_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Case-insensitive substring of the event payload JSON as served to the caller (1-200 characters after trimming, matched literally)."},"required":false,"name":"search","in":"query"},{"schema":{"type":"string","enum":["true","false"],"default":"false","description":"If true, includes events from readable descendant runs, up to 16 generations. Results share one `event_id` order and cursor. Each event retains its `run_id` and the payload visibility permitted for that run. Runs the caller cannot read are excluded. Defaults to false.\n\nIf at least one descendant is included, task or workflow runs without stored events do not contribute synthetic lifecycle events. Event IDs are allocated before commit. During active writes, ascending pagination can pass an ID that another run commits later."},"required":false,"name":"include_descendants","in":"query"}],"responses":{"200":{"description":"Returns a summary of recorded run events.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEventSummary"},"examples":{"example":{"summary":"Example response","value":{"run_id":"11111111-1111-4111-8111-111111111111","total":0,"error_count":0,"first_event_id":null,"last_event_id":null,"first_event_at":null,"last_event_at":null,"by_event_class":{"fact":0,"delta":0},"by_event_type":[],"buckets":[]}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":500}}}]}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":503}}}]}}}}},"x-documentation-source-tag":"Run events","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Run Events","name":"Get run event summary","description":"Count run events by type and time bucket without event bodies or usage metrics.","operationId":"getRunEventsSummary"}}},"/runs/{run_id}/snapshot":{"get":{"operationId":"getRunSnapshot","security":[{"bearerAuth":[]},{"apiKeyAuth":[]},{"runExecutionAuth":[]}],"tags":["execution/Runs/Run Events"],"summary":"Get run snapshot","description":"Read a run replay snapshot by canonical UUID; use event readers for targeted failure analysis.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"example":"11111111-1111-4111-8111-111111111111","name":"run_id","in":"path"}],"responses":{"200":{"description":"Returns a snapshot of a run and its recorded events. Task and workflow snapshots capture a fixed event cutoff and allow up to 5000 events or 10 MiB. Larger histories return 400 RUN_SNAPSHOT_LIMIT_EXCEEDED; use paginated run events.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEventSnapshot"},"examples":{"example":{"summary":"Example response","value":{"after_event_id":42,"events":[{"event_id":42,"event_type":"MODEL_CALL_COMPLETED","payload":{"type":"MODEL_CALL_COMPLETED","provider":"example-provider","model":"example-model","inputTokens":120,"outputTokens":30,"cacheCreationTokens":0,"cacheReadTokens":0,"totalTokens":150,"costCredits":"0.001","latencyMs":800,"usageCaptureStatus":"complete","providerRequestId":"request_example","modelCallContextEventId":null},"is_error":false,"created_at":"2026-10-02T10:00:00Z","run_id":"11111111-1111-4111-8111-111111111111","event_class":"fact","span_id":"span_example","parent_span_id":null,"turn_id":null,"origin_event_type":"MODEL_CALL_COMPLETED","origin_custom_name":null,"unrecoverable_fields":[]}]}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":503}}}]}}}}},"x-documentation-source-tag":"Run events","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Run Events","name":"Get run snapshot","description":"Read a run replay snapshot by canonical UUID; use event readers for targeted failure analysis.","operationId":"getRunSnapshot"}}},"/conversations/{conversation_id}/runs/{run_id}/stream":{"get":{"operationId":"streamConversationAgentRun","tags":["execution/Runs/Run Events"],"summary":"Stream conversation run events (compatibility)","description":"Stream conversation run events.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"run_id","in":"path"},{"schema":{"type":"string","minLength":1},"required":true,"name":"conversation_id","in":"path"}],"responses":{"200":{"description":"Streams events for a legacy conversation-bound agent run as event frames.","content":{"text/event-stream":{"schema":{"type":"string","description":"Legacy PascalCase SSE event names with typed run event rows, including span and origin metadata.","x-event-schema":{"$ref":"#/components/schemas/ConversationRunStreamFrame"}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Runtime compatibility","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Run Events","name":"Stream conversation run events (compatibility)","description":"Stream conversation run events.","operationId":"streamConversationAgentRun"}}},"/runs/{run_id}/stream":{"get":{"operationId":"streamRunEvents","security":[{"bearerAuth":[]},{"apiKeyAuth":[]},{"runExecutionAuth":[]}],"tags":["execution/Runs/Run Events"],"summary":"Stream run events","description":"Stream run events.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Canonical run UUID. Normal callers need access to the run owner and project.runs.read. A bound eval runtime may instead read its authorized direct agent child."},"required":true,"description":"Canonical run UUID. Normal callers need access to the run owner and project.runs.read. A bound eval runtime may instead read its authorized direct agent child.","name":"run_id","in":"path"},{"schema":{"anyOf":[{"type":"string","enum":["run-events-v1","ag-ui"],"description":"Use `run-events-v1` to receive Agent Events Protocol CloudEvents, or `ag-ui` for receipt-backed AG-UI events from Agent runs. Omit it to keep the released run-event row stream contract."},{"type":"string","enum":["canonical-v1"]}],"description":"Omit for released run frames. Use run-events-v1 for target CloudEvents, canonical-v1 for canonical read members, or ag-ui for public Agent events and native Task/Workflow lifecycle frames."},"required":false,"name":"event_representation","in":"query"},{"schema":{"type":"string"},"required":false,"name":"last-event-id","in":"header"}],"responses":{"200":{"description":"Run event stream","content":{"text/event-stream":{"schema":{"type":"string","description":"Server-sent event frames. Without event_representation, each data field contains a JSON RunStreamFrame. With run-events-v1, each data field contains one target CloudEvent. With ag-ui, Agent runs expose one receipt-backed public AG-UI event per frame; Task and Workflow runs expose native AG-UI lifecycle frames. With canonical-v1, each data field contains a complete validated canonical, legacy or transient stream member.","x-event-schema":{"oneOf":[{"$ref":"#/components/schemas/RunStreamFrame"},{"$ref":"#/components/schemas/TargetRunEvent"},{"$ref":"#/components/schemas/AgUiRunEvent"},{"$ref":"#/components/schemas/CanonicalStreamMember"}]}},"examples":{"stream":{"summary":"Illustrative event frame","value":"id: 42\ndata: {\"type\":\"MODEL_CALL_COMPLETED\",\"provider\":\"example-provider\",\"model\":\"example-model\",\"inputTokens\":120,\"outputTokens\":30,\"cacheCreationTokens\":0,\"cacheReadTokens\":0,\"totalTokens\":150,\"costCredits\":\"0.001\",\"latencyMs\":800,\"usageCaptureStatus\":\"complete\",\"providerRequestId\":\"request_example\",\"modelCallContextEventId\":null}\n\n"}}}}},"400":{"description":"Canonical Events v1 refusal","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}},"application/json":{"schema":{"$ref":"#/components/schemas/CanonicalV1Error"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Canonical Events v1 refusal","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}},"application/json":{"schema":{"$ref":"#/components/schemas/CanonicalV1Error"}}}},"409":{"description":"Canonical Events v1 refusal","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":409}}}]}},"application/json":{"schema":{"$ref":"#/components/schemas/CanonicalV1Error"}}}},"422":{"description":"Canonical Events v1 refusal","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":422}}}]}},"application/json":{"schema":{"$ref":"#/components/schemas/CanonicalV1Error"}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}},"500":{"description":"Canonical Events v1 refusal","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":500}}}]}},"application/json":{"schema":{"$ref":"#/components/schemas/CanonicalV1Error"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":503}}}]}}}}},"x-documentation-source-tag":"Run events","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Run Events","name":"Stream run events","description":"Stream run events.","operationId":"streamRunEvents"}}},"/runs/{run_id}/cancel":{"post":{"operationId":"cancelRun","tags":["execution/Runs/Run Actions"],"summary":"Cancel run","description":"Cancel a run.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"example":"11111111-1111-4111-8111-111111111111","name":"run_id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"Idempotency-Key","in":"header"}],"responses":{"202":{"description":"Cancellation requested for the run and its whole active descendant subtree.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"},"examples":{"example":{"summary":"Example response","value":{"id":"11111111-1111-4111-8111-111111111111","run_id":"11111111-1111-4111-8111-111111111111","status":"running","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"summarize"},"input":{"text":"A short document."},"output":null,"title":"Summarize text","created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"api_key","id":"key_example"},"started_at":"2026-10-02T10:00:00Z","control":{"cancellation":{"requested_at":"2026-10-02T10:00:00Z","stopped_at":null}}}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":409}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}}},"x-documentation-source-tag":"Run actions","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Run Actions","name":"Cancel run","description":"Cancel a run.","operationId":"cancelRun"}}},"/runs/{run_id}/fail":{"post":{"operationId":"failRun","tags":["execution/Runs/Run Actions"],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]},{"runExecutionAuth":[]}],"parameters":[{"name":"X-Veryfront-Run-Terminal-Token","in":"header","required":false,"schema":{"type":"string","minLength":1},"description":"Required for execution credentials."},{"schema":{"type":"string","format":"uuid","description":"Run for a terminal action. A fresh or different terminal request against an already-terminal run or stale execution generation returns 409. Retrying the identical request with the same idempotency key returns its stored result after replay authorization."},"required":true,"description":"Run for a terminal action. A fresh or different terminal request against an already-terminal run or stale execution generation returns 409. Retrying the identical request with the same idempotency key returns its stored result after replay authorization.","example":"11111111-1111-4111-8111-111111111111","name":"run_id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"Idempotency-Key","in":"header"}],"summary":"Fail run","description":"Fail a run.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FailRunRequest"},"examples":{"failed":{"value":{"error":{"code":"TASK_FAILED","message":"The task could not be completed."}}}}}}},"responses":{"200":{"description":"Terminal run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"},"examples":{"failed":{"summary":"Fail run","value":{"id":"11111111-1111-4111-8111-111111111111","run_id":"11111111-1111-4111-8111-111111111111","status":"failed","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"summarize"},"input":{"text":"A short document."},"output":null,"error":{"code":"TASK_FAILED","message":"The task could not be completed."},"title":"Summarize text","created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"api_key","id":"key_example"},"started_at":"2026-10-02T10:00:00Z","finished_at":"2026-10-02T10:00:02Z"}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":409}}}]}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":413}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}}},"x-codeSamples":[{"lang":"json","label":"Request JSON","example":"failed","contentType":"application/json","source":"{\n  \"error\": {\n    \"code\": \"TASK_FAILED\",\n    \"message\": \"The task could not be completed.\"\n  }\n}"}],"x-documentation-source-tag":"Run actions","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Run Actions","name":"Fail run","description":"Fail a run.","operationId":"failRun"}}},"/runs/{run_id}/finalize":{"post":{"operationId":"finalizeRun","tags":["execution/Runs/Run Actions"],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]},{"runExecutionAuth":[]}],"parameters":[{"name":"X-Veryfront-Run-Terminal-Token","in":"header","required":false,"schema":{"type":"string","minLength":1},"description":"Required for execution credentials."},{"schema":{"type":"string","format":"uuid","description":"Run for a terminal action. A fresh or different terminal request against an already-terminal run or stale execution generation returns 409. Retrying the identical request with the same idempotency key returns its stored result after replay authorization."},"required":true,"description":"Run for a terminal action. A fresh or different terminal request against an already-terminal run or stale execution generation returns 409. Retrying the identical request with the same idempotency key returns its stored result after replay authorization.","example":"11111111-1111-4111-8111-111111111111","name":"run_id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"Idempotency-Key","in":"header"}],"summary":"Finalize run","description":"Finalize a run.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeRunRequest"},"examples":{"completed":{"summary":"Complete run","value":{"status":"completed","output":{"summary":"A short summary."}}},"failed":{"summary":"Fail run","value":{"status":"failed","error":{"code":"TASK_FAILED","message":"The task could not be completed."}}}}}}},"responses":{"200":{"description":"Terminal run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"},"examples":{"completed":{"summary":"Complete run","value":{"id":"11111111-1111-4111-8111-111111111111","run_id":"11111111-1111-4111-8111-111111111111","status":"completed","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"summarize"},"input":{"text":"A short document."},"output":{"summary":"A short summary."},"title":"Summarize text","created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"api_key","id":"key_example"},"started_at":"2026-10-02T10:00:00Z","finished_at":"2026-10-02T10:00:02Z"}},"failed":{"summary":"Fail run","value":{"id":"11111111-1111-4111-8111-111111111111","run_id":"11111111-1111-4111-8111-111111111111","status":"failed","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"summarize"},"input":{"text":"A short document."},"output":null,"error":{"code":"TASK_FAILED","message":"The task could not be completed."},"title":"Summarize text","created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"api_key","id":"key_example"},"started_at":"2026-10-02T10:00:00Z","finished_at":"2026-10-02T10:00:02Z"}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":409}}}]}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":413}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}}},"x-codeSamples":[{"lang":"json","label":"Request JSON","example":"completed","contentType":"application/json","source":"{\n  \"status\": \"completed\",\n  \"output\": {\n    \"summary\": \"A short summary.\"\n  }\n}"},{"lang":"json","label":"Request JSON","example":"failed","contentType":"application/json","source":"{\n  \"status\": \"failed\",\n  \"error\": {\n    \"code\": \"TASK_FAILED\",\n    \"message\": \"The task could not be completed.\"\n  }\n}"}],"x-documentation-source-tag":"Run actions","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Run Actions","name":"Finalize run","description":"Finalize a run.","operationId":"finalizeRun"}}},"/runs/{run_id}/pause":{"post":{"operationId":"pauseRun","tags":["execution/Runs/Run Actions"],"summary":"Pause run","description":"Pause a run. Requires project.runs.write.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Run to pause. Conversation-owned runs also require editor access on the conversation. Requests a safe-boundary pause. A fresh pause request for a running agent without project-bound dispatch stop authority returns 409 RUN_NOT_PAUSABLE. An authorized retry of the identical request with the same idempotency key returns its stored result."},"required":true,"description":"Run to pause. Conversation-owned runs also require editor access on the conversation. Requests a safe-boundary pause. A fresh pause request for a running agent without project-bound dispatch stop authority returns 409 RUN_NOT_PAUSABLE. An authorized retry of the identical request with the same idempotency key returns its stored result.","example":"11111111-1111-4111-8111-111111111111","name":"run_id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"Idempotency-Key","in":"header"}],"responses":{"202":{"description":"Requests a safe-boundary pause; the run pauses at its next safe boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"},"examples":{"example":{"summary":"Example response","value":{"id":"11111111-1111-4111-8111-111111111111","run_id":"11111111-1111-4111-8111-111111111111","status":"running","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"summarize"},"input":{"text":"A short document."},"output":null,"title":"Summarize text","created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"api_key","id":"key_example"},"started_at":"2026-10-02T10:00:00Z","control":{"pause":{"requested_at":"2026-10-02T10:00:00Z"}}}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":409}}}]}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":413}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}}},"x-documentation-source-tag":"Run actions","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Run Actions","name":"Pause run","description":"Pause a run. Requires project.runs.write.","operationId":"pauseRun"}}},"/runs/{run_id}/resume":{"post":{"operationId":"resumeRun","tags":["execution/Runs/Run Actions"],"summary":"Resume run","description":"Resume a run. Requires project.runs.write.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Run to resume. Conversation-owned runs also require editor access on the conversation. A fresh resume signal must match the current wait; a mismatch returns 409. An authorized retry of the identical request with the same idempotency key returns its stored result."},"required":true,"description":"Run to resume. Conversation-owned runs also require editor access on the conversation. A fresh resume signal must match the current wait; a mismatch returns 409. An authorized retry of the identical request with the same idempotency key returns its stored result.","example":"11111111-1111-4111-8111-111111111111","name":"run_id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumeRunRequest"},"examples":{"manual":{"summary":"Resume paused run","value":{"type":"manual"}},"tool_result":{"summary":"Return tool result","value":{"type":"tool_result","tool_call_id":"call_example","result":{"approved":true}}},"approval":{"summary":"Approve workflow step","value":{"type":"approval","wait_id":"wait_example","node_id":"review","approved":true}},"event":{"summary":"Deliver awaited event","value":{"type":"event","wait_id":"wait_example","name":"payment_received","payload":{"invoice_id":"invoice_example"}}},"integration":{"summary":"Integration connected","value":{"type":"integration_connected","integration":"example-integration"}}}}}},"responses":{"202":{"description":"Run resumed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"},"examples":{"manual":{"summary":"Resume paused run","value":{"id":"11111111-1111-4111-8111-111111111111","run_id":"11111111-1111-4111-8111-111111111111","status":"pending","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"summarize"},"input":{"text":"A short document."},"output":null,"title":"Summarize text","created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"api_key","id":"key_example"}}},"tool_result":{"summary":"Return tool result","value":{"id":"11111111-1111-4111-8111-111111111111","run_id":"11111111-1111-4111-8111-111111111111","status":"pending","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"summarize"},"input":{"text":"A short document."},"output":null,"title":"Summarize text","created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"api_key","id":"key_example"}}},"approval":{"summary":"Approve workflow step","value":{"id":"11111111-1111-4111-8111-111111111111","run_id":"11111111-1111-4111-8111-111111111111","status":"pending","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"summarize"},"input":{"text":"A short document."},"output":null,"title":"Summarize text","created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"api_key","id":"key_example"}}},"event":{"summary":"Deliver awaited event","value":{"id":"11111111-1111-4111-8111-111111111111","run_id":"11111111-1111-4111-8111-111111111111","status":"pending","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"summarize"},"input":{"text":"A short document."},"output":null,"title":"Summarize text","created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"api_key","id":"key_example"}}},"integration":{"summary":"Integration connected","value":{"id":"11111111-1111-4111-8111-111111111111","run_id":"11111111-1111-4111-8111-111111111111","status":"pending","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"summarize"},"input":{"text":"A short document."},"output":null,"title":"Summarize text","created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"api_key","id":"key_example"}}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":409}}}]}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":413}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}}},"x-codeSamples":[{"lang":"json","label":"Request JSON","example":"manual","contentType":"application/json","source":"{\n  \"type\": \"manual\"\n}"},{"lang":"json","label":"Request JSON","example":"tool_result","contentType":"application/json","source":"{\n  \"type\": \"tool_result\",\n  \"tool_call_id\": \"call_example\",\n  \"result\": {\n    \"approved\": true\n  }\n}"},{"lang":"json","label":"Request JSON","example":"approval","contentType":"application/json","source":"{\n  \"type\": \"approval\",\n  \"wait_id\": \"wait_example\",\n  \"node_id\": \"review\",\n  \"approved\": true\n}"},{"lang":"json","label":"Request JSON","example":"event","contentType":"application/json","source":"{\n  \"type\": \"event\",\n  \"wait_id\": \"wait_example\",\n  \"name\": \"payment_received\",\n  \"payload\": {\n    \"invoice_id\": \"invoice_example\"\n  }\n}"},{"lang":"json","label":"Request JSON","example":"integration","contentType":"application/json","source":"{\n  \"type\": \"integration_connected\",\n  \"integration\": \"example-integration\"\n}"}],"x-documentation-source-tag":"Run actions","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Run Actions","name":"Resume run","description":"Resume a run. Requires project.runs.write.","operationId":"resumeRun"}}},"/runs/{run_id}/succeed":{"post":{"operationId":"succeedRun","tags":["execution/Runs/Run Actions"],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]},{"runExecutionAuth":[]}],"parameters":[{"name":"X-Veryfront-Run-Terminal-Token","in":"header","required":false,"schema":{"type":"string","minLength":1},"description":"Required for execution credentials."},{"schema":{"type":"string","format":"uuid","description":"Run for a terminal action. A fresh or different terminal request against an already-terminal run or stale execution generation returns 409. Retrying the identical request with the same idempotency key returns its stored result after replay authorization."},"required":true,"description":"Run for a terminal action. A fresh or different terminal request against an already-terminal run or stale execution generation returns 409. Retrying the identical request with the same idempotency key returns its stored result after replay authorization.","example":"11111111-1111-4111-8111-111111111111","name":"run_id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"Idempotency-Key","in":"header"}],"summary":"Succeed run","description":"Succeed a run.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SucceedRunRequest"},"examples":{"completed":{"value":{"output":{"summary":"A short summary."}}}}}}},"responses":{"200":{"description":"Terminal run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"},"examples":{"completed":{"summary":"Complete run","value":{"id":"11111111-1111-4111-8111-111111111111","run_id":"11111111-1111-4111-8111-111111111111","status":"completed","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"summarize"},"input":{"text":"A short document."},"output":{"summary":"A short summary."},"title":"Summarize text","created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"api_key","id":"key_example"},"started_at":"2026-10-02T10:00:00Z","finished_at":"2026-10-02T10:00:02Z"}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":409}}}]}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":413}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}}},"x-codeSamples":[{"lang":"json","label":"Request JSON","example":"completed","contentType":"application/json","source":"{\n  \"output\": {\n    \"summary\": \"A short summary.\"\n  }\n}"}],"x-documentation-source-tag":"Run actions","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Run Actions","name":"Succeed run","description":"Succeed a run.","operationId":"succeedRun"}}},"/runs/{run_id}/artifacts/{artifact_id}":{"get":{"operationId":"readRunArtifact","tags":["execution/Runs/Run Artifacts"],"summary":"Download run artifact","description":"Download a run artifact.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"example":"11111111-1111-4111-8111-111111111111","name":"run_id","in":"path"},{"schema":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"Immutable artifact identifier, as recorded in RunArtifact.artifact_id and named by RunArtifact.href. It is not RunArtifact.sha256."},"required":true,"description":"Immutable artifact identifier, as recorded in RunArtifact.artifact_id and named by RunArtifact.href. It is not RunArtifact.sha256.","name":"artifact_id","in":"path"}],"responses":{"200":{"description":"The exact bytes of the run artifact. Requires read access to the owning run.","content":{"*/*":{"schema":{"type":"string","description":"The exact bytes of the run artifact. Requires read access to the owning run.","format":"binary"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Run resource","x-canonical-documentation":{"domain":"execution","resource":"Runs","subgroup":"Run Artifacts","name":"Download run artifact","description":"Download a run artifact.","operationId":"readRunArtifact"}}},"/projects/{project_reference}/connected-agents":{"get":{"operationId":"listConnectedAgents","tags":["execution/Executors/Connected agents"],"summary":"List connected agents","description":"List a project's connected agents: every push runtime service first, then at most the 50 most recently updated pull workers, with no continuation for the rest. Requires project.runtime.manage.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"project_reference","in":"path"}],"responses":{"200":{"description":"Project push runtime services and pull workers in one list: every push runtime service first, then at most the 50 most recently updated pull workers, with no continuation for the rest.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"service_name":{"type":"string","minLength":1,"maxLength":128},"service_key":{"type":"string","minLength":1,"maxLength":128},"scope_kind":{"type":"string","enum":["global","project"]},"scope_key":{"type":"string","minLength":1},"project_id":{"type":["string","null"],"format":"uuid"},"agent_id":{"type":["string","null"]},"base_url":{"type":"string","format":"uri"},"invoke_url":{"type":"string","format":"uri"},"status":{"type":"string","enum":["active","disabled"]},"capabilities":{},"metadata":{},"managed_source":{"type":["object","null"],"properties":{"project_id":{"type":"string","format":"uuid"},"environment_id":{"type":"string","format":"uuid"},"release_id":{"type":"string","format":"uuid"}},"required":["project_id","environment_id","release_id"],"additionalProperties":false},"version":{"type":["string","null"]},"runtime":{"type":["string","null"]},"region":{"type":["string","null"]},"last_heartbeat_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"kind":{"type":"string","enum":["registered_push_service"]},"mode":{"type":"string","enum":["push"]},"source":{"type":"string","enum":["runtime_service_registry"]},"connection_status":{"type":"string","enum":["online","offline","disabled"]}},"required":["id","service_name","service_key","scope_kind","scope_key","project_id","agent_id","base_url","invoke_url","status","managed_source","version","runtime","region","last_heartbeat_at","created_at","updated_at","kind","mode","source","connection_status"],"title":"RegisteredPushServiceTarget"},{"type":"object","properties":{"kind":{"type":"string","enum":["pull_worker"]},"mode":{"type":"string","enum":["pull"]},"source":{"type":"string","enum":["agent_worker_registry"]},"id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"implementation_kind":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"worker_key":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-zA-Z0-9_.:-]+$"},"display_name":{"type":["string","null"]},"status":{"type":"string","enum":["active","disabled"]},"connection_status":{"type":"string","enum":["online","offline","disabled"]},"metadata":{},"last_heartbeat_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["kind","mode","source","id","project_id","implementation_kind","worker_key","display_name","status","connection_status","last_heartbeat_at","created_at","updated_at"],"title":"PullWorkerTarget"}]},"description":"The project's connected agents: every push runtime service first, then at most the 50 most recently updated pull workers, with no continuation for the rest."}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Connected agents","x-canonical-documentation":{"domain":"execution","resource":"Executors","subgroup":"Connected agents","name":"List connected agents","description":"List a project's connected agents: every push runtime service first, then at most the 50 most recently updated pull workers, with no continuation for the rest. Requires project.runtime.manage.","operationId":"listConnectedAgents"}}},"/agent-runtimes/push-services":{"get":{"operationId":"listGlobalAgentPushRuntimeServices","tags":["execution/Executors/Agent runtime registration"],"summary":"List runtime services","description":"List runtime services.","responses":{"200":{"description":"Globally registered push runtime services, for operational visibility. Requires platform administrator access.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"service_name":{"type":"string","minLength":1,"maxLength":128},"service_key":{"type":"string","minLength":1,"maxLength":128},"scope_kind":{"type":"string","enum":["global","project"]},"scope_key":{"type":"string","minLength":1},"project_id":{"type":["string","null"],"format":"uuid"},"agent_id":{"type":["string","null"]},"base_url":{"type":"string","format":"uri"},"invoke_url":{"type":"string","format":"uri"},"status":{"type":"string","enum":["active","disabled"]},"capabilities":{},"metadata":{},"managed_source":{"type":["object","null"],"properties":{"project_id":{"type":"string","format":"uuid"},"environment_id":{"type":"string","format":"uuid"},"release_id":{"type":"string","format":"uuid"}},"required":["project_id","environment_id","release_id"],"additionalProperties":false},"version":{"type":["string","null"]},"runtime":{"type":["string","null"]},"region":{"type":["string","null"]},"last_heartbeat_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"kind":{"type":"string","enum":["registered_push_service"]},"mode":{"type":"string","enum":["push"]},"source":{"type":"string","enum":["runtime_service_registry"]},"connection_status":{"type":"string","enum":["online","offline","disabled"]}},"required":["id","service_name","service_key","scope_kind","scope_key","project_id","agent_id","base_url","invoke_url","status","managed_source","version","runtime","region","last_heartbeat_at","created_at","updated_at","kind","mode","source","connection_status"],"title":"RegisteredPushServiceTarget"},{"type":"object","properties":{"kind":{"type":"string","enum":["pull_worker"]},"mode":{"type":"string","enum":["pull"]},"source":{"type":"string","enum":["agent_worker_registry"]},"id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"implementation_kind":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"worker_key":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-zA-Z0-9_.:-]+$"},"display_name":{"type":["string","null"]},"status":{"type":"string","enum":["active","disabled"]},"connection_status":{"type":"string","enum":["online","offline","disabled"]},"metadata":{},"last_heartbeat_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["kind","mode","source","id","project_id","implementation_kind","worker_key","display_name","status","connection_status","last_heartbeat_at","created_at","updated_at"],"title":"PullWorkerTarget"}]}}},"required":["data"]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-audience":"component-internal","x-documentation-source-tag":"Agent runtime registration","x-canonical-documentation":{"domain":"execution","resource":"Executors","subgroup":"Agent runtime registration","name":"List runtime services","description":"List runtime services.","operationId":"listGlobalAgentPushRuntimeServices"}},"post":{"operationId":"createAgentPushRuntimeService","tags":["execution/Executors/Agent runtime registration"],"summary":"Register runtime service","description":"Register a runtime service.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"service_name":{"type":"string","minLength":1,"maxLength":128},"service_key":{"type":"string","minLength":1,"maxLength":128},"scope_kind":{"type":"string","enum":["global","project"],"default":"global","description":"Project-scoped registrations require project.runtime.manage; global registrations require platform administrator access."},"project_reference":{"type":["string","null"]},"agent_id":{"type":["string","null"],"minLength":1,"maxLength":128},"base_url":{"type":"string","format":"uri"},"managed_source":{"type":"object","properties":{"project_id":{"type":"string","format":"uuid"},"environment_id":{"type":"string","format":"uuid"},"release_id":{"type":"string","format":"uuid"}},"required":["project_id","environment_id","release_id"],"additionalProperties":false},"invoke_url":{"type":"string","format":"uri"},"capabilities":{"type":["object","null"],"additionalProperties":{}},"metadata":{"type":["object","null"],"additionalProperties":{}},"version":{"type":["string","null"],"minLength":1,"maxLength":128},"runtime":{"type":["string","null"],"minLength":1,"maxLength":128},"region":{"type":["string","null"],"minLength":1,"maxLength":128}},"required":["service_name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Registers or refreshes a push-based agent runtime service endpoint. Project-scoped registrations require project.runtime.manage; global registrations require platform administrator access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPushRuntimeServiceResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Global registration without platform administrator access, or project registration without project.runtime.manage.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-audience":"component-internal","x-documentation-source-tag":"Agent runtime registration","x-canonical-documentation":{"domain":"execution","resource":"Executors","subgroup":"Agent runtime registration","name":"Register runtime service","description":"Register a runtime service.","operationId":"createAgentPushRuntimeService"}}},"/agent-runtimes/push-services/{service_id}":{"patch":{"operationId":"updateAgentPushRuntimeService","tags":["execution/Executors/Agent runtime registration"],"summary":"Update runtime service","description":"Drain or resume a runtime service.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Runtime service identifier."},"required":true,"description":"Runtime service identifier.","name":"service_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"availability":{"type":"string","enum":["active","drained"],"description":"active makes the runtime service available for selection; drained stops selecting it for new work. For a managed source connection, drained also revokes queued and child dispatch."}},"required":["availability"],"additionalProperties":false}}}},"responses":{"200":{"description":"The runtime service after the change. service is the registration envelope: its status is active for availability active and disabled for availability drained.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"service_name":{"type":"string"},"service_key":{"type":"string"},"scope_kind":{"type":"string","enum":["global","project"]},"project_id":{"type":["string","null"],"format":"uuid"},"availability":{"type":"string","enum":["active","drained"]},"connection_status":{"type":"string","enum":["online","offline","disabled"]},"runtime":{"type":["string","null"]},"region":{"type":["string","null"]},"last_seen_at":{"type":["string","null"],"description":"Time of the last heartbeat, or null before the first one."},"service":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"service_name":{"type":"string","minLength":1,"maxLength":128},"service_key":{"type":"string","minLength":1,"maxLength":128},"scope_kind":{"type":"string","enum":["global","project"]},"scope_key":{"type":"string","minLength":1},"project_id":{"type":["string","null"],"format":"uuid"},"agent_id":{"type":["string","null"]},"base_url":{"type":"string","format":"uri"},"invoke_url":{"type":"string","format":"uri"},"status":{"type":"string","enum":["active","disabled"]},"capabilities":{},"metadata":{},"managed_source":{"type":["object","null"],"properties":{"project_id":{"type":"string","format":"uuid"},"environment_id":{"type":"string","format":"uuid"},"release_id":{"type":"string","format":"uuid"}},"required":["project_id","environment_id","release_id"],"additionalProperties":false},"version":{"type":["string","null"]},"runtime":{"type":["string","null"]},"region":{"type":["string","null"]},"last_heartbeat_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","service_name","service_key","scope_kind","scope_key","project_id","agent_id","base_url","invoke_url","status","managed_source","version","runtime","region","last_heartbeat_at","created_at","updated_at"]}},"required":["id","service_name","service_key","scope_kind","project_id","availability","connection_status","runtime","region","last_seen_at","service"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The caller cannot manage the service’s scope. Setting active on a managed source connection needs project.runtime.manage in both the destination and the source project.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-audience":"component-internal","x-documentation-source-tag":"Agent runtime registration","x-canonical-documentation":{"domain":"execution","resource":"Executors","subgroup":"Agent runtime registration","name":"Update runtime service","description":"Drain or resume a runtime service.","operationId":"updateAgentPushRuntimeService"}}},"/agent-runtimes/push-services/{service_id}/heartbeat":{"post":{"operationId":"heartbeatAgentPushRuntimeService","tags":["execution/Executors/Agent runtime registration"],"summary":"Heartbeat runtime service","description":"Heartbeat a runtime service.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Runtime service identifier."},"required":true,"description":"Runtime service identifier.","name":"service_id","in":"path"}],"requestBody":{"description":"A required, strictly empty JSON object -- heartbeats carry no fields.","required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false}}}},"responses":{"200":{"description":"Refreshes the liveness timestamp for an existing push runtime service after verifying access to its global or project scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPushRuntimeServiceResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-audience":"component-internal","x-documentation-source-tag":"Agent runtime registration","x-canonical-documentation":{"domain":"execution","resource":"Executors","subgroup":"Agent runtime registration","name":"Heartbeat runtime service","description":"Heartbeat a runtime service.","operationId":"heartbeatAgentPushRuntimeService"}}},"/agent-workers/workers/{worker_id}/claim":{"post":{"operationId":"claimAgentWorkerRun","security":[{"agentWorkerAuth":[]},{"bearerAuth":[]},{"apiKeyAuth":[]}],"tags":["execution/Executors/Agent workers"],"summary":"Claim run","description":"Claim the next available run, or only the selected canonical run when canonical_run_id is provided.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"worker_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"lease_duration_seconds":{"type":"integer","minimum":5,"maximum":300},"canonical_run_id":{"type":"string","format":"uuid","description":"Claim only this canonical run; omit to claim the next available run."}},"additionalProperties":false}}}},"responses":{"200":{"description":"Claim result, with lease metadata when a runnable agent run was available.","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":["object","null"],"properties":{"execution_id":{"type":"string","format":"uuid","description":"Current execution assignment identity; grants no authority."},"run_id":{"type":"string","minLength":1},"canonical_run_id":{"type":["string","null"],"format":"uuid","description":"Canonical Run identifier for Runs event and lifecycle operations; null when no canonical run exists."},"conversation_id":{"type":"string","format":"uuid"},"message_id":{"type":"string","format":"uuid"},"project_id":{"type":["string","null"],"format":"uuid"},"agent_id":{"type":"string","minLength":1},"status":{"type":"string","enum":["pending","running","waiting_for_tool","completed","failed","cancelled"]},"source_target_kind":{"type":["string","null"],"enum":["project","main_branch","environment","preview_branch","release",null]},"source_target_environment_id":{"type":["string","null"],"format":"uuid"},"source_target_branch_id":{"type":["string","null"],"format":"uuid"},"source_target_release_version":{"type":["string","null"],"minLength":1,"maxLength":128},"request_snapshot":{"type":["object","null"],"properties":{"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"role":{"type":"string","minLength":1},"parts":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1}},"required":["type"]},"default":[]},"metadata":{"type":"object","additionalProperties":{}},"createdAt":{"type":"string"}},"required":["id","role"]}},"taskId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]*$"},"taskInput":{},"agentServiceId":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]*$"},"agentSource":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["branch"]},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["type","branch"]},{"type":"object","properties":{"type":{"type":"string","enum":["environment"]},"environmentName":{"type":"string","minLength":1,"maxLength":255},"releaseId":{"type":"string","minLength":1,"maxLength":255}},"required":["type","environmentName","releaseId"]},{"type":"object","properties":{"type":{"type":"string","enum":["release"]},"releaseId":{"type":"string","minLength":1,"maxLength":255}},"required":["type","releaseId"]}]},"managedRuntimeSource":{"type":"object","properties":{"serviceId":{"type":"string","format":"uuid"},"sourceBinding":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid"},"environmentId":{"type":"string","format":"uuid"},"releaseId":{"type":"string","format":"uuid"}},"required":["projectId","environmentId","releaseId"],"additionalProperties":false},"sourceProject":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid"},"projectSlug":{"type":"string","minLength":1,"maxLength":255},"runtimeTargetKind":{"type":["string","null"],"enum":["main_branch","environment","preview_branch",null]},"runtimeTargetEnvironmentId":{"type":["string","null"],"format":"uuid"},"runtimeTargetEnvironmentName":{"type":"string","minLength":1,"maxLength":255},"runtimeTargetBranchName":{"type":"string","minLength":1,"maxLength":255},"executionEnvironmentId":{"type":"string","format":"uuid"},"sourceTargetEnvironmentId":{"type":["string","null"],"format":"uuid"},"sourceTargetBranchId":{"type":["string","null"],"format":"uuid"},"runtimeTargetBranchId":{"type":["string","null"],"format":"uuid"}},"required":["projectId","projectSlug"]},"agentSource":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["branch"]},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["type","branch"]},{"type":"object","properties":{"type":{"type":"string","enum":["environment"]},"environmentName":{"type":"string","minLength":1,"maxLength":255},"releaseId":{"type":"string","minLength":1,"maxLength":255}},"required":["type","environmentName","releaseId"]},{"type":"object","properties":{"type":{"type":"string","enum":["release"]},"releaseId":{"type":"string","minLength":1,"maxLength":255}},"required":["type","releaseId"]}]}},"required":["serviceId","sourceBinding","sourceProject","agentSource"],"additionalProperties":false},"tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-zA-Z][a-zA-Z0-9._:-]*$"},"description":{"type":"string","maxLength":1024},"parameters":{"type":"object","additionalProperties":{}},"inputSchema":{"type":"object","additionalProperties":{}},"outputSchema":{"type":"object","additionalProperties":{}}},"required":["name"]},"default":[]},"context":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"title":{"type":"string","maxLength":256},"text":{"type":"string","maxLength":16384}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["json"]},"title":{"type":"string","maxLength":256},"data":{"type":"object","additionalProperties":{}}},"required":["type","data"]},{"type":"object","properties":{"type":{"type":"string","enum":["resource"]},"title":{"type":"string","maxLength":256},"uri":{"type":"string","maxLength":2048},"mimeType":{"type":"string","maxLength":256},"text":{"type":"string","maxLength":16384}},"required":["type","uri"]}]},"default":[]},"allowDelegation":{"type":"boolean"},"agentConfig":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"name":{"type":"string","minLength":1,"maxLength":256},"description":{"type":"string","maxLength":1024,"default":""},"instructions":{"type":"string","minLength":1,"maxLength":64000},"thinking":{"type":"object","properties":{"enabled":{"type":"boolean"},"budgetTokens":{"type":"number","exclusiveMinimum":0}},"required":["enabled"],"additionalProperties":false},"model":{"type":"string","minLength":1,"maxLength":256},"temperature":{"type":"number","minimum":0,"maximum":2},"maxSteps":{"type":"integer","exclusiveMinimum":0},"providerTools":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":500},"skills":{"anyOf":[{"type":"boolean"},{"type":"string","minLength":1,"maxLength":128},{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":500},{"type":"object","additionalProperties":{"type":"boolean"}}]},"knowledge":{"anyOf":[{"type":"boolean"},{"type":"string","minLength":1,"maxLength":4096},{"type":"array","items":{"type":"string","minLength":1,"maxLength":4096},"maxItems":1024},{"type":"object","additionalProperties":{"type":"boolean"}}]},"knowledgeSelector":{"anyOf":[{"type":"boolean"},{"type":"string","minLength":1,"maxLength":4096},{"type":"array","items":{"type":"string","minLength":1,"maxLength":4096},"maxItems":1024},{"type":"object","additionalProperties":{"type":"boolean"}}]},"tools":{"anyOf":[{"type":"boolean"},{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":500},{"type":"object","additionalProperties":{"type":"boolean"}},{"type":"array","items":{"type":"string","minLength":1,"maxLength":512},"maxItems":2048}]},"toolLoading":{"type":"string","enum":["eager","deferred"]},"toolResultContext":{"anyOf":[{"type":"boolean"},{"type":"object","properties":{"maxInlineBytes":{"type":"integer","exclusiveMinimum":0,"maximum":1048576},"previewBytes":{"type":"integer","exclusiveMinimum":0,"maximum":1048576},"maxSectionBytes":{"type":"integer","minimum":4,"maximum":1048576},"maxStoredResults":{"type":"integer","exclusiveMinimum":0,"maximum":1024}},"additionalProperties":false}]},"deniedTools":{"type":"array","items":{"type":"string","minLength":1,"maxLength":512},"maxItems":2048},"delegates":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":500}},"required":["id","name","instructions"]},"agentIdentity":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"name":{"type":"string","minLength":1,"maxLength":256},"kind":{"type":"string","enum":["project"]}},"required":["id","name"]},"serverResolvedPlatformTools":{"type":"array","items":{"type":"string"}},"serverResolvedClientToolCatalog":{"type":"array","items":{"type":"string"}},"localNonchargeAdmission":{"type":"object","properties":{"canonicalModelId":{"type":"string"},"upstreamModelId":{"type":"string","minLength":1},"servedHostId":{"type":"string","enum":["deployment-owned-local"]},"veryfrontChargeUsd":{"type":"string","enum":["0"]}},"required":["canonicalModelId","upstreamModelId","servedHostId","veryfrontChargeUsd"],"additionalProperties":false},"forwardedProps":{"type":"object","additionalProperties":{}},"integrationConnectionBindings":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"integration":{"type":"string","minLength":1},"kind":{"type":"string","enum":["oauth"]},"source":{"type":"string","enum":["project_policy","user_config"]},"connectionId":{"type":"string","format":"uuid"},"connectionGenerationId":{"type":"string","format":"uuid"},"policyGenerationId":{"type":["string","null"],"format":"uuid"},"ownerId":{"type":"string","format":"uuid"},"scope":{"type":"string","enum":["user"]},"ownerKind":{"type":"string","enum":["user"]}},"required":["integration","connectionId","connectionGenerationId","ownerId","scope","ownerKind"]},{"type":"object","properties":{"integration":{"type":"string","minLength":1},"kind":{"type":"string","enum":["oauth"]},"source":{"type":"string","enum":["project_policy","user_config"]},"connectionId":{"type":"string","format":"uuid"},"connectionGenerationId":{"type":"string","format":"uuid"},"policyGenerationId":{"type":["string","null"],"format":"uuid"},"ownerId":{"type":"string","format":"uuid"},"scope":{"type":"string","enum":["project"]},"ownerKind":{"type":"string","enum":["project"]}},"required":["integration","connectionId","connectionGenerationId","ownerId","scope","ownerKind"]}]},{"type":"object","properties":{"kind":{"type":"string","enum":["service_identity"]},"integration":{"type":"string","enum":["github","jira","salesforce","outlook","onedrive","sharepoint","confluence","servicenow","box"]},"ownerKind":{"type":"string","enum":["project"]},"ownerId":{"type":"string","format":"uuid"},"targetEnvironmentId":{"type":["string","null"],"minLength":1},"policyGenerationId":{"type":["string","null"],"format":"uuid"}},"required":["kind","integration","ownerKind","ownerId","targetEnvironmentId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["mock"]},"integration":{"type":"string","minLength":1},"scope":{"type":"string","enum":["project"]},"ownerKind":{"type":"string","enum":["project"]},"ownerId":{"type":"string","format":"uuid"},"policyGenerationId":{"type":"string","format":"uuid"}},"required":["kind","integration","scope","ownerKind","ownerId","policyGenerationId"],"additionalProperties":false}]},"maxItems":128,"default":[]},"traceContext":{"type":"object","properties":{"traceId":{"type":"string","pattern":"^[0-9a-f]{32}$"},"spanId":{"type":"string","pattern":"^[0-9a-f]{16}$"},"traceFlags":{"type":"integer","minimum":0,"maximum":255}},"required":["traceId","spanId","traceFlags"]},"triggerPrincipal":{"type":"object","properties":{"type":{"type":"string","enum":["system","user","api_key","service_account"]},"id":{"type":"string","minLength":1,"maxLength":255}},"required":["type","id"],"additionalProperties":false},"authorization":{"type":"object","additionalProperties":{}}},"required":["messages","agentSource"]},"latest_event_id":{"type":"integer","minimum":0},"latest_external_event_sequence":{"type":"integer","minimum":0},"lease_owner":{"type":["string","null"]},"lease_expires_at":{"type":["string","null"]},"effective_deadline_at":{"type":"string","format":"date-time"},"worker_session":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"run_id":{"type":"string","minLength":1},"implementation_kind":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"worker_id":{"type":["string","null"],"format":"uuid"},"session_key":{"type":"string","minLength":1},"status":{"type":"string","enum":["active","completed","failed","cancelled"]},"metadata":{},"created_at":{"type":"string"},"updated_at":{"type":"string"},"ended_at":{"type":["string","null"]}},"required":["id","run_id","implementation_kind","worker_id","session_key","status","created_at","updated_at","ended_at"]}},"required":["run_id","conversation_id","message_id","project_id","agent_id","status","request_snapshot","latest_event_id","latest_external_event_sequence","lease_owner","lease_expires_at","worker_session"]},"credentials":{"type":"object","properties":{"inference_token":{"type":"string","minLength":1,"description":"Send as Authorization: Bearer only to the AI gateway for inference attributed to the claimed project and run. Expires no later than the current worker lease."},"auth_token":{"type":"string","minLength":1,"description":"Send as Authorization: Bearer for runtime operations on the claimed run, including finalize, succeed, fail and cancel."},"run_event_token":{"type":"string","minLength":1,"description":"Send as Authorization: Bearer to append events for the claimed run with REST POST /runs/{run_id}/events, GraphQL appendRunEvents or MCP append_run_events."},"run_terminal_token":{"type":"string","minLength":1,"description":"Send in the X-Veryfront-Run-Terminal-Token header, never as Bearer, beside auth_token on finalize, succeed, fail, cancel (REST, GraphQL cancelRun or MCP cancel_run) and inherited child creation (POST /runs with X-Veryfront-Run-Execution-Mode: inherited)."}},"required":["auth_token","run_event_token","run_terminal_token"]}},"required":["run"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Agent workers","x-canonical-documentation":{"domain":"execution","resource":"Executors","subgroup":"Agent workers","name":"Claim run","description":"Claim the next available run, or only the selected canonical run when canonical_run_id is provided.","operationId":"claimAgentWorkerRun"}}},"/agent-workers/workers/{worker_id}":{"delete":{"operationId":"deleteAgentWorker","tags":["execution/Executors/Agent workers"],"summary":"Delete worker","description":"Delete a worker. Requires project.runtime.manage.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"worker_id","in":"path"}],"responses":{"200":{"description":"Worker disabled; it stops claiming additional runs for its project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Agent workers","x-canonical-documentation":{"domain":"execution","resource":"Executors","subgroup":"Agent workers","name":"Delete worker","description":"Delete a worker. Requires project.runtime.manage.","operationId":"deleteAgentWorker"}}},"/agent-workers/workers/{worker_id}/heartbeat":{"post":{"operationId":"heartbeatAgentWorker","security":[{"agentWorkerAuth":[]},{"bearerAuth":[]},{"apiKeyAuth":[]}],"tags":["execution/Executors/Agent workers"],"summary":"Heartbeat worker","description":"Heartbeat a worker.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"worker_id","in":"path"}],"responses":{"200":{"description":"Refreshes the liveness timestamp for an existing agent worker after verifying project access.","content":{"application/json":{"schema":{"type":"object","properties":{"worker":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"implementation_kind":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"worker_key":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-zA-Z0-9_.:-]+$"},"display_name":{"type":["string","null"]},"status":{"type":"string","enum":["active","disabled"]},"connection_status":{"type":"string","enum":["online","offline","disabled"]},"metadata":{},"last_heartbeat_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","project_id","implementation_kind","worker_key","display_name","status","connection_status","last_heartbeat_at","created_at","updated_at"]},"token":{"type":["string","null"],"description":"Worker credential (`vfaw_...`), returned once on registration and null or absent otherwise. Store it as a secret and send it as Authorization: Bearer (agentWorkerAuth) on this worker's heartbeat, claim, lease renewal and session operations."}},"required":["worker"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Agent workers","x-canonical-documentation":{"domain":"execution","resource":"Executors","subgroup":"Agent workers","name":"Heartbeat worker","description":"Heartbeat a worker.","operationId":"heartbeatAgentWorker"}}},"/agent-workers/workers/{worker_id}/runs/{run_id}/session":{"put":{"operationId":"updateAgentWorkerRunSession","security":[{"agentWorkerAuth":[]},{"bearerAuth":[]},{"apiKeyAuth":[]}],"tags":["execution/Executors/Agent workers"],"summary":"Update worker run session","description":"Record worker session state.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"worker_id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"run_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"session_key":{"type":"string","minLength":1,"maxLength":512},"status":{"type":"string","enum":["active","completed","failed","cancelled"]},"metadata":{"type":["object","null"],"additionalProperties":{}}},"required":["session_key"],"additionalProperties":false}}}},"responses":{"200":{"description":"Worker session metadata created or updated for the worker-owned run.","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"run_id":{"type":"string","minLength":1},"implementation_kind":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"worker_id":{"type":["string","null"],"format":"uuid"},"session_key":{"type":"string","minLength":1},"status":{"type":"string","enum":["active","completed","failed","cancelled"]},"metadata":{},"created_at":{"type":"string"},"updated_at":{"type":"string"},"ended_at":{"type":["string","null"]}},"required":["id","run_id","implementation_kind","worker_id","session_key","status","created_at","updated_at","ended_at"]}},"required":["session"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Agent workers","x-canonical-documentation":{"domain":"execution","resource":"Executors","subgroup":"Agent workers","name":"Update worker run session","description":"Record worker session state.","operationId":"updateAgentWorkerRunSession"}}},"/agent-workers/projects/{project_reference}/workers":{"post":{"operationId":"createAgentWorker","tags":["execution/Executors/Agent workers"],"summary":"Register worker","description":"Register a worker. Requires project.runtime.manage.","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"project_reference","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"implementation_kind":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"implementation_display_name":{"type":"string","minLength":1,"maxLength":128},"worker_key":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-zA-Z0-9_.:-]+$"},"display_name":{"type":["string","null"],"minLength":1,"maxLength":128},"metadata":{"type":["object","null"],"additionalProperties":{}}},"required":["implementation_kind","worker_key"],"additionalProperties":false}}}},"responses":{"201":{"description":"Worker registered; it can claim and execute runs for the project.","content":{"application/json":{"schema":{"type":"object","properties":{"worker":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"implementation_kind":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"worker_key":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-zA-Z0-9_.:-]+$"},"display_name":{"type":["string","null"]},"status":{"type":"string","enum":["active","disabled"]},"connection_status":{"type":"string","enum":["online","offline","disabled"]},"metadata":{},"last_heartbeat_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","project_id","implementation_kind","worker_key","display_name","status","connection_status","last_heartbeat_at","created_at","updated_at"]},"token":{"type":["string","null"],"description":"Worker credential (`vfaw_...`), returned once on registration and null or absent otherwise. Store it as a secret and send it as Authorization: Bearer (agentWorkerAuth) on this worker's heartbeat, claim, lease renewal and session operations."}},"required":["worker"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Agent workers","x-canonical-documentation":{"domain":"execution","resource":"Executors","subgroup":"Agent workers","name":"Register worker","description":"Register a worker. Requires project.runtime.manage.","operationId":"createAgentWorker"}}},"/agent-workers/workers/{worker_id}/runs/{run_id}/lease":{"post":{"operationId":"renewAgentWorkerRunLease","security":[{"agentWorkerAuth":[]},{"bearerAuth":[]},{"apiKeyAuth":[]}],"tags":["execution/Executors/Agent workers"],"summary":"Renew run lease","description":"Renew a run lease.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"worker_id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"run_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"lease_duration_seconds":{"type":"integer","minimum":5,"maximum":300}},"additionalProperties":false}}}},"responses":{"200":{"description":"Lease renewal result: the active lease is extended while the worker continues processing the run.","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":["object","null"],"properties":{"execution_id":{"type":"string","format":"uuid","description":"Current execution assignment identity; grants no authority."},"run_id":{"type":"string","minLength":1},"canonical_run_id":{"type":["string","null"],"format":"uuid","description":"Canonical Run identifier for Runs event and lifecycle operations; null when no canonical run exists."},"conversation_id":{"type":"string","format":"uuid"},"message_id":{"type":"string","format":"uuid"},"project_id":{"type":["string","null"],"format":"uuid"},"agent_id":{"type":"string","minLength":1},"status":{"type":"string","enum":["pending","running","waiting_for_tool","completed","failed","cancelled"]},"source_target_kind":{"type":["string","null"],"enum":["project","main_branch","environment","preview_branch","release",null]},"source_target_environment_id":{"type":["string","null"],"format":"uuid"},"source_target_branch_id":{"type":["string","null"],"format":"uuid"},"source_target_release_version":{"type":["string","null"],"minLength":1,"maxLength":128},"request_snapshot":{"type":["object","null"],"properties":{"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"role":{"type":"string","minLength":1},"parts":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1}},"required":["type"]},"default":[]},"metadata":{"type":"object","additionalProperties":{}},"createdAt":{"type":"string"}},"required":["id","role"]}},"taskId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]*$"},"taskInput":{},"agentServiceId":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-zA-Z0-9][a-zA-Z0-9._:-]*$"},"agentSource":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["branch"]},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["type","branch"]},{"type":"object","properties":{"type":{"type":"string","enum":["environment"]},"environmentName":{"type":"string","minLength":1,"maxLength":255},"releaseId":{"type":"string","minLength":1,"maxLength":255}},"required":["type","environmentName","releaseId"]},{"type":"object","properties":{"type":{"type":"string","enum":["release"]},"releaseId":{"type":"string","minLength":1,"maxLength":255}},"required":["type","releaseId"]}]},"managedRuntimeSource":{"type":"object","properties":{"serviceId":{"type":"string","format":"uuid"},"sourceBinding":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid"},"environmentId":{"type":"string","format":"uuid"},"releaseId":{"type":"string","format":"uuid"}},"required":["projectId","environmentId","releaseId"],"additionalProperties":false},"sourceProject":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid"},"projectSlug":{"type":"string","minLength":1,"maxLength":255},"runtimeTargetKind":{"type":["string","null"],"enum":["main_branch","environment","preview_branch",null]},"runtimeTargetEnvironmentId":{"type":["string","null"],"format":"uuid"},"runtimeTargetEnvironmentName":{"type":"string","minLength":1,"maxLength":255},"runtimeTargetBranchName":{"type":"string","minLength":1,"maxLength":255},"executionEnvironmentId":{"type":"string","format":"uuid"},"sourceTargetEnvironmentId":{"type":["string","null"],"format":"uuid"},"sourceTargetBranchId":{"type":["string","null"],"format":"uuid"},"runtimeTargetBranchId":{"type":["string","null"],"format":"uuid"}},"required":["projectId","projectSlug"]},"agentSource":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["branch"]},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["type","branch"]},{"type":"object","properties":{"type":{"type":"string","enum":["environment"]},"environmentName":{"type":"string","minLength":1,"maxLength":255},"releaseId":{"type":"string","minLength":1,"maxLength":255}},"required":["type","environmentName","releaseId"]},{"type":"object","properties":{"type":{"type":"string","enum":["release"]},"releaseId":{"type":"string","minLength":1,"maxLength":255}},"required":["type","releaseId"]}]}},"required":["serviceId","sourceBinding","sourceProject","agentSource"],"additionalProperties":false},"tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-zA-Z][a-zA-Z0-9._:-]*$"},"description":{"type":"string","maxLength":1024},"parameters":{"type":"object","additionalProperties":{}},"inputSchema":{"type":"object","additionalProperties":{}},"outputSchema":{"type":"object","additionalProperties":{}}},"required":["name"]},"default":[]},"context":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"title":{"type":"string","maxLength":256},"text":{"type":"string","maxLength":16384}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["json"]},"title":{"type":"string","maxLength":256},"data":{"type":"object","additionalProperties":{}}},"required":["type","data"]},{"type":"object","properties":{"type":{"type":"string","enum":["resource"]},"title":{"type":"string","maxLength":256},"uri":{"type":"string","maxLength":2048},"mimeType":{"type":"string","maxLength":256},"text":{"type":"string","maxLength":16384}},"required":["type","uri"]}]},"default":[]},"allowDelegation":{"type":"boolean"},"agentConfig":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"name":{"type":"string","minLength":1,"maxLength":256},"description":{"type":"string","maxLength":1024,"default":""},"instructions":{"type":"string","minLength":1,"maxLength":64000},"thinking":{"type":"object","properties":{"enabled":{"type":"boolean"},"budgetTokens":{"type":"number","exclusiveMinimum":0}},"required":["enabled"],"additionalProperties":false},"model":{"type":"string","minLength":1,"maxLength":256},"temperature":{"type":"number","minimum":0,"maximum":2},"maxSteps":{"type":"integer","exclusiveMinimum":0},"providerTools":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":500},"skills":{"anyOf":[{"type":"boolean"},{"type":"string","minLength":1,"maxLength":128},{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":500},{"type":"object","additionalProperties":{"type":"boolean"}}]},"knowledge":{"anyOf":[{"type":"boolean"},{"type":"string","minLength":1,"maxLength":4096},{"type":"array","items":{"type":"string","minLength":1,"maxLength":4096},"maxItems":1024},{"type":"object","additionalProperties":{"type":"boolean"}}]},"knowledgeSelector":{"anyOf":[{"type":"boolean"},{"type":"string","minLength":1,"maxLength":4096},{"type":"array","items":{"type":"string","minLength":1,"maxLength":4096},"maxItems":1024},{"type":"object","additionalProperties":{"type":"boolean"}}]},"tools":{"anyOf":[{"type":"boolean"},{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":500},{"type":"object","additionalProperties":{"type":"boolean"}},{"type":"array","items":{"type":"string","minLength":1,"maxLength":512},"maxItems":2048}]},"toolLoading":{"type":"string","enum":["eager","deferred"]},"toolResultContext":{"anyOf":[{"type":"boolean"},{"type":"object","properties":{"maxInlineBytes":{"type":"integer","exclusiveMinimum":0,"maximum":1048576},"previewBytes":{"type":"integer","exclusiveMinimum":0,"maximum":1048576},"maxSectionBytes":{"type":"integer","minimum":4,"maximum":1048576},"maxStoredResults":{"type":"integer","exclusiveMinimum":0,"maximum":1024}},"additionalProperties":false}]},"deniedTools":{"type":"array","items":{"type":"string","minLength":1,"maxLength":512},"maxItems":2048},"delegates":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":500}},"required":["id","name","instructions"]},"agentIdentity":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"name":{"type":"string","minLength":1,"maxLength":256},"kind":{"type":"string","enum":["project"]}},"required":["id","name"]},"serverResolvedPlatformTools":{"type":"array","items":{"type":"string"}},"serverResolvedClientToolCatalog":{"type":"array","items":{"type":"string"}},"localNonchargeAdmission":{"type":"object","properties":{"canonicalModelId":{"type":"string"},"upstreamModelId":{"type":"string","minLength":1},"servedHostId":{"type":"string","enum":["deployment-owned-local"]},"veryfrontChargeUsd":{"type":"string","enum":["0"]}},"required":["canonicalModelId","upstreamModelId","servedHostId","veryfrontChargeUsd"],"additionalProperties":false},"forwardedProps":{"type":"object","additionalProperties":{}},"integrationConnectionBindings":{"type":"array","items":{"anyOf":[{"oneOf":[{"type":"object","properties":{"integration":{"type":"string","minLength":1},"kind":{"type":"string","enum":["oauth"]},"source":{"type":"string","enum":["project_policy","user_config"]},"connectionId":{"type":"string","format":"uuid"},"connectionGenerationId":{"type":"string","format":"uuid"},"policyGenerationId":{"type":["string","null"],"format":"uuid"},"ownerId":{"type":"string","format":"uuid"},"scope":{"type":"string","enum":["user"]},"ownerKind":{"type":"string","enum":["user"]}},"required":["integration","connectionId","connectionGenerationId","ownerId","scope","ownerKind"]},{"type":"object","properties":{"integration":{"type":"string","minLength":1},"kind":{"type":"string","enum":["oauth"]},"source":{"type":"string","enum":["project_policy","user_config"]},"connectionId":{"type":"string","format":"uuid"},"connectionGenerationId":{"type":"string","format":"uuid"},"policyGenerationId":{"type":["string","null"],"format":"uuid"},"ownerId":{"type":"string","format":"uuid"},"scope":{"type":"string","enum":["project"]},"ownerKind":{"type":"string","enum":["project"]}},"required":["integration","connectionId","connectionGenerationId","ownerId","scope","ownerKind"]}]},{"type":"object","properties":{"kind":{"type":"string","enum":["service_identity"]},"integration":{"type":"string","enum":["github","jira","salesforce","outlook","onedrive","sharepoint","confluence","servicenow","box"]},"ownerKind":{"type":"string","enum":["project"]},"ownerId":{"type":"string","format":"uuid"},"targetEnvironmentId":{"type":["string","null"],"minLength":1},"policyGenerationId":{"type":["string","null"],"format":"uuid"}},"required":["kind","integration","ownerKind","ownerId","targetEnvironmentId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["mock"]},"integration":{"type":"string","minLength":1},"scope":{"type":"string","enum":["project"]},"ownerKind":{"type":"string","enum":["project"]},"ownerId":{"type":"string","format":"uuid"},"policyGenerationId":{"type":"string","format":"uuid"}},"required":["kind","integration","scope","ownerKind","ownerId","policyGenerationId"],"additionalProperties":false}]},"maxItems":128,"default":[]},"traceContext":{"type":"object","properties":{"traceId":{"type":"string","pattern":"^[0-9a-f]{32}$"},"spanId":{"type":"string","pattern":"^[0-9a-f]{16}$"},"traceFlags":{"type":"integer","minimum":0,"maximum":255}},"required":["traceId","spanId","traceFlags"]},"triggerPrincipal":{"type":"object","properties":{"type":{"type":"string","enum":["system","user","api_key","service_account"]},"id":{"type":"string","minLength":1,"maxLength":255}},"required":["type","id"],"additionalProperties":false},"authorization":{"type":"object","additionalProperties":{}}},"required":["messages","agentSource"]},"latest_event_id":{"type":"integer","minimum":0},"latest_external_event_sequence":{"type":"integer","minimum":0},"lease_owner":{"type":["string","null"]},"lease_expires_at":{"type":["string","null"]},"effective_deadline_at":{"type":"string","format":"date-time"},"worker_session":{"type":["object","null"],"properties":{"id":{"type":"string","format":"uuid"},"run_id":{"type":"string","minLength":1},"implementation_kind":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"worker_id":{"type":["string","null"],"format":"uuid"},"session_key":{"type":"string","minLength":1},"status":{"type":"string","enum":["active","completed","failed","cancelled"]},"metadata":{},"created_at":{"type":"string"},"updated_at":{"type":"string"},"ended_at":{"type":["string","null"]}},"required":["id","run_id","implementation_kind","worker_id","session_key","status","created_at","updated_at","ended_at"]}},"required":["run_id","conversation_id","message_id","project_id","agent_id","status","request_snapshot","latest_event_id","latest_external_event_sequence","lease_owner","lease_expires_at","worker_session"]},"credentials":{"type":"object","properties":{"inference_token":{"type":"string","minLength":1,"description":"Send as Authorization: Bearer only to the AI gateway for inference attributed to the claimed project and run. Expires no later than the current worker lease."},"auth_token":{"type":"string","minLength":1,"description":"Send as Authorization: Bearer for runtime operations on the claimed run, including finalize, succeed, fail and cancel."},"run_event_token":{"type":"string","minLength":1,"description":"Send as Authorization: Bearer to append events for the claimed run with REST POST /runs/{run_id}/events, GraphQL appendRunEvents or MCP append_run_events."},"run_terminal_token":{"type":"string","minLength":1,"description":"Send in the X-Veryfront-Run-Terminal-Token header, never as Bearer, beside auth_token on finalize, succeed, fail, cancel (REST, GraphQL cancelRun or MCP cancel_run) and inherited child creation (POST /runs with X-Veryfront-Run-Execution-Mode: inherited)."}},"required":["auth_token","run_event_token","run_terminal_token"]}},"required":["run"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Agent workers","x-canonical-documentation":{"domain":"execution","resource":"Executors","subgroup":"Agent workers","name":"Renew run lease","description":"Renew a run lease.","operationId":"renewAgentWorkerRunLease"}}},"/projects/{project_reference}/evals/{eval_id}":{"get":{"operationId":"getEval","tags":["evaluations/Evaluations/Evaluations"],"summary":"Get eval","description":"Read one eval definition by its ID to inspect its target, dataset, metrics and the fields that can be edited; returns the eval. Requires project.evals.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","minLength":1},"required":true,"name":"eval_id","in":"path"},{"schema":{"type":"string","enum":["project","main_branch","environment","preview_branch"],"description":"Source to read: project, main_branch, environment or preview_branch. Overrides runtime_target_kind."},"required":false,"description":"Source to read: project, main_branch, environment or preview_branch. Overrides runtime_target_kind.","name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"enum":["main_branch","environment","preview_branch",null],"description":"Runtime target to read from: main_branch, environment or preview_branch."},"required":false,"description":"Runtime target to read from: main_branch, environment or preview_branch.","name":"runtime_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Environment to read from when the target kind is environment."},"required":false,"description":"Environment to read from when the target kind is environment.","name":"target_environment_id","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Preview branch to use when the target kind is preview_branch."},"required":false,"description":"Preview branch to use when the target kind is preview_branch.","name":"target_branch_id","in":"query"}],"responses":{"200":{"description":"The eval definition from the selected source target.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Eval identifier."},"name":{"type":"string","description":"Human-readable eval name."},"description":{"type":["string","null"],"description":"Short description of what the eval checks, or null."},"target_kind":{"type":"string","enum":["agent"],"description":"What the eval runs against: always agent."},"target":{"type":"string","description":"Identifier of the agent the eval runs against."},"source_path":{"type":"string","description":"Source file path where the eval definition lives."},"export_name":{"type":"string","description":"Name of the export that declares the eval in its source file."},"dataset":{"type":"object","properties":{"kind":{"type":"string","enum":["inline","json","jsonl","dynamic"]},"path":{"type":"string"},"examples":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"input":{},"reference":{},"metadata":{"type":"object","additionalProperties":{}}},"required":["id"]}},"editable":{"type":"boolean"},"dynamic":{"type":"boolean"}},"required":["kind","editable","dynamic"],"description":"The examples the eval runs."},"metrics":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"family":{"type":"string","enum":["answer","agent","ops","judge","knowledge","check"]},"severity":{"type":"string","enum":["gate","soft","budget"]},"threshold":{"type":"object","properties":{"min":{"type":"number"},"max":{"type":"number"}}},"config":{"type":"object","additionalProperties":{}},"editable":{"type":"boolean"},"dynamic":{"type":"boolean"}},"required":["name","family","severity","editable","dynamic"]},"description":"The metrics that score each example."},"repetitions":{"type":"integer","exclusiveMinimum":0,"description":"How often each example runs."},"tags":{"type":"array","items":{"type":"string"},"description":"Labels of the eval."},"metadata":{"type":"object","additionalProperties":{},"description":"Free-form JSON object stored with the eval."},"editable_fields":{"type":"array","items":{"type":"string","enum":["name","description","target","dataset","repetitions","tags","metadata","metrics","check"]},"description":"Fields that update_eval can change."},"dynamic_fields":{"type":"array","items":{"type":"string","enum":["name","description","target","dataset","repetitions","tags","metadata","metrics","check"]},"description":"Fields computed in source, which update_eval cannot change."},"capabilities":{"type":"array","items":{"type":"string"},"description":"Eval capabilities the caller holds on the project."}},"required":["id","name","description","target_kind","target","source_path","export_name","dataset","metrics","repetitions","tags","metadata","editable_fields","dynamic_fields","capabilities"],"description":"Eval definition."}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AutomationProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AutomationProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AutomationProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AutomationProblem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AutomationProblem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Evaluation Definitions","x-canonical-documentation":{"domain":"evaluations","resource":"Evaluations","subgroup":"Evaluations","name":"Get eval","description":"Read one eval definition by its ID to inspect its target, dataset, metrics and the fields that can be edited; returns the eval. Requires project.evals.read.","operationId":"getEval"}},"patch":{"operationId":"updateEval","tags":["evaluations/Evaluations/Evaluations"],"summary":"Update eval","description":"Change fields of a structured eval, such as its name, target, dataset or metrics, where an omitted field keeps its value; returns the updated eval source document. Requires project.evals.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","minLength":1},"required":true,"name":"eval_id","in":"path"},{"schema":{"type":"string","description":"Source to use: project or preview_branch. Defaults to project."},"required":false,"description":"Source to use: project or preview_branch. Defaults to project.","name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Preview branch to use when the target kind is preview_branch."},"required":false,"description":"Preview branch to use when the target kind is preview_branch.","name":"target_branch_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Updated eval name. Omit it to keep the name."},"description":{"type":"string","description":"Updated description. Omit it to keep the description."},"target":{"type":"string","minLength":1,"description":"Updated agent identifier. Omit it to keep the target."},"dataset":{"type":"object","properties":{"kind":{"type":"string","enum":["inline","json","jsonl","dynamic"]},"path":{"type":"string"},"examples":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"input":{},"reference":{},"metadata":{"type":"object","additionalProperties":{}}},"required":["id"]}},"editable":{"type":"boolean"},"dynamic":{"type":"boolean"}},"required":["kind","editable","dynamic"],"description":"Updated dataset. Omit it to keep the dataset."},"metrics":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"family":{"type":"string","enum":["answer","agent","ops","judge","knowledge","check"]},"severity":{"type":"string","enum":["gate","soft","budget"]},"threshold":{"type":"object","properties":{"min":{"type":"number"},"max":{"type":"number"}}},"config":{"type":"object","additionalProperties":{}},"editable":{"type":"boolean"},"dynamic":{"type":"boolean"}},"required":["name","family","severity","editable","dynamic"]},"description":"Updated metrics. Omit them to keep the metrics."},"repetitions":{"type":"integer","exclusiveMinimum":0,"description":"Updated repetitions. Omit them to keep the value."},"tags":{"type":"array","items":{"type":"string"},"description":"Updated tags. Omit them to keep the tags."},"metadata":{"type":"object","additionalProperties":{},"description":"Updated metadata object. Omit it to keep the metadata."}},"additionalProperties":false}}}},"responses":{"200":{"description":"The updated eval source document.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Eval identifier."},"name":{"type":"string","description":"Human-readable eval name."},"description":{"type":["string","null"],"description":"Short description of what the eval checks, or null."},"target_kind":{"type":"string","enum":["agent"],"description":"What the eval runs against: always agent."},"target":{"type":"string","description":"Identifier of the agent the eval runs against."},"source_path":{"type":"string","description":"Source file path where the eval definition lives."},"export_name":{"type":"string","description":"Name of the export that declares the eval in its source file."},"dataset":{"type":"object","properties":{"kind":{"type":"string","enum":["inline","json","jsonl","dynamic"]},"path":{"type":"string"},"examples":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"input":{},"reference":{},"metadata":{"type":"object","additionalProperties":{}}},"required":["id"]}},"editable":{"type":"boolean"},"dynamic":{"type":"boolean"}},"required":["kind","editable","dynamic"],"description":"The examples the eval runs."},"metrics":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"family":{"type":"string","enum":["answer","agent","ops","judge","knowledge","check"]},"severity":{"type":"string","enum":["gate","soft","budget"]},"threshold":{"type":"object","properties":{"min":{"type":"number"},"max":{"type":"number"}}},"config":{"type":"object","additionalProperties":{}},"editable":{"type":"boolean"},"dynamic":{"type":"boolean"}},"required":["name","family","severity","editable","dynamic"]},"description":"The metrics that score each example."},"repetitions":{"type":"integer","exclusiveMinimum":0,"description":"How often each example runs."},"tags":{"type":"array","items":{"type":"string"},"description":"Labels of the eval."},"metadata":{"type":"object","additionalProperties":{},"description":"Free-form JSON object stored with the eval."},"editable_fields":{"type":"array","items":{"type":"string","enum":["name","description","target","dataset","repetitions","tags","metadata","metrics","check"]},"description":"Fields that update_eval can change."},"dynamic_fields":{"type":"array","items":{"type":"string","enum":["name","description","target","dataset","repetitions","tags","metadata","metrics","check"]},"description":"Fields computed in source, which update_eval cannot change."},"capabilities":{"type":"array","items":{"type":"string"},"description":"Eval capabilities the caller holds on the project."},"source":{"type":"string","description":"Source text of the eval file."},"edit_mode":{"type":"string","enum":["structured","source_only"],"description":"Editing mode of the eval: structured for field updates, source_only for source edits."},"source_only_reasons":{"type":"array","items":{"type":"string"},"description":"Reasons why the eval can only be edited as source; empty for a structured eval."}},"required":["id","name","description","target_kind","target","source_path","export_name","dataset","metrics","repetitions","tags","metadata","editable_fields","dynamic_fields","capabilities","source","edit_mode","source_only_reasons"],"description":"Eval definition including editable source content."}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AutomationProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AutomationProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AutomationProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AutomationProblem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AutomationProblem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/AutomationProblem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Evaluation Definitions","x-canonical-documentation":{"domain":"evaluations","resource":"Evaluations","subgroup":"Evaluations","name":"Update eval","description":"Change fields of a structured eval, such as its name, target, dataset or metrics, where an omitted field keeps its value; returns the updated eval source document. Requires project.evals.write.","operationId":"updateEval"}}},"/projects/{project_reference}/evals":{"get":{"operationId":"listEvals","tags":["evaluations/Evaluations/Evaluations"],"summary":"List evals","description":"List the evals defined in the source of a project, a branch or an environment to find an eval to run or edit; returns every eval as one page with the source files that could not be read as evals. Requires project.evals.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","enum":["project","main_branch","environment","preview_branch"],"description":"Source to read: project, main_branch, environment or preview_branch. Overrides runtime_target_kind."},"required":false,"description":"Source to read: project, main_branch, environment or preview_branch. Overrides runtime_target_kind.","name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"enum":["main_branch","environment","preview_branch",null],"description":"Runtime target to read from: main_branch, environment or preview_branch."},"required":false,"description":"Runtime target to read from: main_branch, environment or preview_branch.","name":"runtime_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Environment to read from when the target kind is environment."},"required":false,"description":"Environment to read from when the target kind is environment.","name":"target_environment_id","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Preview branch to use when the target kind is preview_branch."},"required":false,"description":"Preview branch to use when the target kind is preview_branch.","name":"target_branch_id","in":"query"}],"responses":{"200":{"description":"Source-backed evaluation definitions from the selected source target: evaluations from the selected project source.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EvalSourceDocument"}},"page_info":{"$ref":"#/components/schemas/PageInfo"},"errors":{"type":"array","items":{"type":"object","properties":{"filePath":{"type":"string"},"error":{"type":"string"}},"required":["filePath","error"]}},"diagnostics":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["source_file_diagnostic","source_agent_discovery_error","source_trigger_discovery_error"]},"source_kind":{"type":"string","enum":["agent","prompt","tool","task","workflow","resource","skill","eval","schedule","webhook"]},"source_path":{"type":"string","minLength":1},"source_id":{"type":"string","minLength":1},"code":{"type":"string","enum":["parse_error","invalid_definition","dynamic_definition","duplicate_source_id","unsupported_target","manual_conflict"]},"message":{"type":"string","minLength":1},"details":{"type":"object","additionalProperties":{}}},"required":["kind","source_kind","source_path","code","message"]}}},"required":["data","page_info"]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Evaluation Definitions","x-canonical-documentation":{"domain":"evaluations","resource":"Evaluations","subgroup":"Evaluations","name":"List evals","description":"List the evals defined in the source of a project, a branch or an environment to find an eval to run or edit; returns every eval as one page with the source files that could not be read as evals. Requires project.evals.read.","operationId":"listEvals"}},"post":{"operationId":"createEval","tags":["evaluations/Evaluations/Evaluations"],"summary":"Create eval","description":"Create an eval source file in the project source or a preview branch to test an agent against a dataset and metrics; returns the eval source document. Requires project.evals.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Source to use: project or preview_branch. Defaults to project."},"required":false,"description":"Source to use: project or preview_branch. Defaults to project.","name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Preview branch to use when the target kind is preview_branch."},"required":false,"description":"Preview branch to use when the target kind is preview_branch.","name":"target_branch_id","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Human-readable eval name; the eval id is derived from it."},"description":{"type":"string","description":"Optional short description of what the eval checks."},"target":{"type":"string","minLength":1,"description":"Identifier of the agent the eval runs against."},"dataset":{"type":"object","properties":{"kind":{"type":"string","enum":["inline","json","jsonl","dynamic"]},"path":{"type":"string"},"examples":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"input":{},"reference":{},"metadata":{"type":"object","additionalProperties":{}}},"required":["id"]}},"editable":{"type":"boolean"},"dynamic":{"type":"boolean"}},"required":["kind","editable","dynamic"],"description":"The examples the eval runs: inline examples or a dataset file."},"metrics":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"family":{"type":"string","enum":["answer","agent","ops","judge","knowledge","check"]},"severity":{"type":"string","enum":["gate","soft","budget"]},"threshold":{"type":"object","properties":{"min":{"type":"number"},"max":{"type":"number"}}},"config":{"type":"object","additionalProperties":{}},"editable":{"type":"boolean"},"dynamic":{"type":"boolean"}},"required":["name","family","severity","editable","dynamic"]},"default":[],"description":"The metrics that score each example. Defaults to none."},"repetitions":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"How often each example runs. Defaults to 1."},"tags":{"type":"array","items":{"type":"string"},"default":[],"description":"Labels for the eval. Defaults to none."},"metadata":{"type":"object","additionalProperties":{},"default":{},"description":"Free-form JSON object stored with the eval. Defaults to empty."}},"required":["name","target","dataset"],"additionalProperties":false}}}},"responses":{"201":{"description":"Created a structured evaluation source document in the selected source target.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/EvalSourceDocument"},{"type":"object","properties":{"edit_mode":{"type":"string","enum":["structured","source_only"],"description":"Editing mode of the eval."},"source_only_reasons":{"type":"array","items":{"type":"string"},"description":"Why the eval can only be edited as source."}},"required":["edit_mode","source_only_reasons"]}]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Evaluation Definitions","x-canonical-documentation":{"domain":"evaluations","resource":"Evaluations","subgroup":"Evaluations","name":"Create eval","description":"Create an eval source file in the project source or a preview branch to test an agent against a dataset and metrics; returns the eval source document. Requires project.evals.write.","operationId":"createEval"}}},"/projects/{project_reference}/evals/{eval_id}/source":{"get":{"operationId":"readEvalSource","tags":["evaluations/Evaluations/Evaluations"],"summary":"Read eval source","description":"Read the editable source behind one eval before changing it; returns the eval source document with its source text, edit mode and the reasons it can only be edited as source. Requires project.evals.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","minLength":1},"required":true,"name":"eval_id","in":"path"},{"schema":{"type":"string","description":"Source to use: project or preview_branch. Defaults to project."},"required":false,"description":"Source to use: project or preview_branch. Defaults to project.","name":"source_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Preview branch to use when the target kind is preview_branch."},"required":false,"description":"Preview branch to use when the target kind is preview_branch.","name":"target_branch_id","in":"query"}],"responses":{"200":{"description":"Eval source document","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/EvalSourceDocument"},{"type":"object","properties":{"edit_mode":{"type":"string","enum":["structured","source_only"],"description":"Editing mode of the eval."},"source_only_reasons":{"type":"array","items":{"type":"string"},"description":"Why the eval can only be edited as source."}},"required":["edit_mode","source_only_reasons"]}]}}}},"400":{"description":"A source selector other than project or preview_branch, or a branch id with the project source.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PrimitiveCrudProblem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Evaluation Definitions","x-canonical-documentation":{"domain":"evaluations","resource":"Evaluations","subgroup":"Evaluations","name":"Read eval source","description":"Read the editable source behind one eval before changing it; returns the eval source document with its source text, edit mode and the reasons it can only be edited as source. Requires project.evals.read.","operationId":"readEvalSource"}}},"/projects/{project_reference}/evals/{eval_id}/runs":{"get":{"operationId":"listEvalRuns","tags":["evaluations/Evaluations/Evaluation Runs"],"summary":"List evaluation runs","description":"List evaluation runs. Requires project.runs.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","minLength":1},"required":true,"example":"eval_example","name":"eval_id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum number of records in a page, from 1 to 100. Defaults to 20.","format":"int32"},"required":false,"description":"Maximum number of records in a page, from 1 to 100. Defaults to 20.","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"The `page_info.next` of the previous page: the `run_id` of its last run. Keep `sort_by` and `sort_order` the same across pages."},"required":false,"description":"Opaque `page_info.next` cursor. Reuse it with the same filters, sort order and descendant scope.","name":"cursor","in":"query"},{"schema":{"type":"string","enum":["created_at","status"],"default":"created_at","description":"Sort field. Defaults to \"created_at\"."},"required":false,"name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort order. Defaults to \"desc\"."},"required":false,"name":"sort_order","in":"query"}],"responses":{"200":{"description":"Run page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunsPage"},"examples":{"example":{"summary":"Example response","value":{"data":[{"id":"11111111-1111-4111-8111-111111111111","run_id":"11111111-1111-4111-8111-111111111111","status":"completed","project_id":"00000000-0000-4000-8000-000000000001","target":{"type":"task","id":"eval"},"input":{"text":"A short document."},"output":{"report_storage":"inline","report":{"schema_version":1,"run_id":"11111111-1111-4111-8111-111111111111","eval_id":"eval_example","target":"summarize","started_at":"2026-10-02T10:00:00Z","completed_at":"2026-10-02T10:00:02Z","summary":{"records":0,"passed":0,"failed":0,"skipped":0,"pass_rate":0},"records":[]}},"title":"Summarize text","created_at":"2026-10-02T10:00:00Z","updated_at":"2026-10-02T10:00:02Z","trigger":{"type":"api_key","id":"key_example"},"started_at":"2026-10-02T10:00:00Z","finished_at":"2026-10-02T10:00:02Z"}],"page_info":{"next":null}}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}}},"x-documentation-source-tag":"Eval runs","x-canonical-documentation":{"domain":"evaluations","resource":"Evaluations","subgroup":"Evaluation Runs","name":"List evaluation runs","description":"List evaluation runs. Requires project.runs.read.","operationId":"listEvalRuns"}}},"/ai/models":{"get":{"operationId":"listModels","tags":["ai-gateway/Models/Model discovery"],"summary":"List models","description":"List model deployments, routing details and access status for the supplied credentials and account or project context.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Canonical project selector: a UUID or slug for model access, inference and billing context. A signed project scope takes precedence. Otherwise, send only one project selector header."},"required":false,"name":"x-veryfront-project-reference","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Compatibility selector accepting a project UUID. Prefer x-veryfront-project-reference."},"required":false,"name":"x-veryfront-project-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Compatibility selector accepting a project slug. Prefer x-veryfront-project-reference."},"required":false,"name":"x-veryfront-project-slug","in":"header"},{"schema":{"type":"string","format":"uuid","description":"An account the caller can read (account.read). Lists every model with enabled and disabled_by under that account's model policy alone. Not combined with a project selector."},"required":false,"name":"x-veryfront-account-id","in":"header"}],"responses":{"200":{"description":"Available AI model deployments. A project-scoped credential, or a selector header naming a project the caller can see, narrows the list to what that project's inference policy permits.","content":{"application/json":{"schema":{"type":"object","properties":{"deployments":{"type":"array","items":{"type":"object","properties":{"funding":{"type":"string","enum":["managed","customer"],"description":"Account funding for this route. Omitted means Veryfront-managed. Customer funding uses the account provider key and zero Veryfront model credits."},"model":{"type":"object","properties":{"id":{"type":"string","description":"Unified model ID, e.g. `anthropic/claude-opus-4-8`."},"aliases":{"type":"array","items":{"type":"string"},"description":"Other IDs that select this model. The first is the short ID."},"name":{"type":"string","description":"Display name."},"description":{"type":"string","description":"Catalog description of the model."},"capabilities":{"type":"object","properties":{"streaming":{"type":"boolean","description":"Whether streaming is supported."},"tools":{"type":"boolean","description":"Whether tool calls are supported."},"vision":{"type":"boolean","description":"Whether image inputs are supported."},"open_weights":{"type":"boolean","description":"Whether model weights are publicly released."},"attachment":{"type":"boolean","description":"Whether file input is supported. Omitted while unverified."},"structured_output":{"type":"boolean","description":"Whether schema-constrained output is supported. Omitted while unverified."},"supported_parameters":{"type":"array","items":{"type":"string"},"description":"Verified supported request parameters. Unknown names remain valid strings."},"modalities":{"type":"object","properties":{"input":{"type":"array","items":{"type":"string"}}},"required":["input"],"description":"Recorded input modalities. Output modalities are omitted while unverified."},"limit":{"type":"object","properties":{"context":{"type":"integer","exclusiveMinimum":0,"description":"Recorded context window in tokens; input and requested output must fit within it."},"output":{"type":"integer","exclusiveMinimum":0,"description":"Recorded maximum output tokens."}},"description":"Known served token ceilings; omitted when neither is recorded. Missing does not mean unlimited."},"reasoning":{"type":"boolean","description":"Whether the model takes thinking controls."},"web_research":{"type":"boolean","description":"Whether chat can enable live web research with this model."},"temperature":{"type":["object","null"],"properties":{"min":{"type":"number","minimum":0},"max":{"type":"number","minimum":0}},"required":["min","max"],"description":"The temperature range a caller may set; null when the model fixes it."}},"required":["reasoning","web_research","temperature"],"description":"Recorded model capabilities. Optional facts stay absent while unverified."},"pricing_sources":{"type":["object","null"],"properties":{"direct_provider":{"type":"string","format":"uri","description":"The model vendor's official pricing page."},"azure":{"type":"string","format":"uri","description":"The official Azure-hosted pricing page; absent when the model has no Azure price list."}},"required":["direct_provider"],"description":"Official pricing source links for this model; null when none is recorded."}},"required":["id","aliases","name","capabilities","pricing_sources"],"description":"What the model is."},"model_provider":{"type":"object","properties":{"id":{"type":"string","description":"Stable identifier."},"name":{"type":"string","description":"Display name."},"icon_url":{"type":"string","format":"uri","description":"URL of the model provider SVG icon, served without authentication."}},"required":["id","name","icon_url"],"description":"Who made the model."},"inference_provider":{"type":"object","properties":{"id":{"type":"string","description":"Stable identifier."},"name":{"type":"string","description":"Display name."}},"required":["id","name"],"description":"Who runs the model."},"region":{"type":"string","description":"Where inference runs. Known values: `eu`, `us`, `worldwide`, `unknown`. Tolerate values you have not seen."},"residency":{"type":"object","properties":{"tier":{"type":"string","description":"Residency tier. Known values: `qualified-sovereign`, `eu-owned`, `eu-resident`, `standard`. Tolerate values you have not seen."},"jurisdiction":{"type":"string","description":"Legal domicile (ISO 3166-1 alpha-2) of the company running the inference, or `unknown`. Not where inference is processed: read `region` and `processing_region` for that."},"processing_region":{"type":"string","description":"The recorded processing region, e.g. `eu`, `europe-west1`, `global` or `unknown`; `region` is its normalised form."},"processing_label":{"type":"string","description":"The processing location in words, for display. Branch on `region`."},"operator":{"type":"string","description":"Legal entity operating the inference service, or `unknown`."},"quantization":{"type":"string","description":"Weight precision served, e.g. `bf16`, `fp8` or `unknown`. Tolerate values you have not seen."},"precision_source":{"type":"string","description":"How `quantization` is evidenced: `contractual`, `published`, `reported` or `unknown`."},"certifications":{"type":"array","items":{"type":"string"},"description":"Certifications evidenced for this deployment; empty when none."},"data_retention":{"anyOf":[{"type":"string"},{"type":"object","properties":{"days":{"type":"integer","minimum":0}},"required":["days"]}],"description":"Prompt retention: `zero`, `metadata-only`, `unknown`, or `{ \"days\": N }`."}},"required":["tier","jurisdiction","processing_region","processing_label","operator","quantization","precision_source","certifications","data_retention"],"description":"Where and under whose terms this deployment processes data. `'unknown'` is a real value: the fact is not evidenced."},"pricing":{"type":["object","null"],"properties":{"provider_cost":{"type":"object","properties":{"input":{"type":"number","minimum":0,"description":"Input tokens, EUR per 1M."},"output":{"type":"number","minimum":0,"description":"Output tokens, EUR per 1M."},"cache_read":{"type":"number","minimum":0,"description":"Cache-read input tokens, EUR per 1M. Absent when not billed separately."},"cache_write":{"type":"number","minimum":0,"description":"Cache-write input tokens, EUR per 1M. Absent when not billed separately."},"cache_write_1h":{"type":"number","minimum":0,"description":"One-hour cache-write input tokens, EUR per 1M. Omitted when no separate rate is recorded."},"audio_input":{"type":"number","minimum":0,"description":"Audio input tokens, EUR per 1M."},"audio_output":{"type":"number","minimum":0,"description":"Audio output tokens, EUR per 1M."},"audio_cache_read":{"type":"number","minimum":0,"description":"Cached audio input tokens, EUR per 1M."},"cache_writes_by_default":{"type":"boolean","description":"Whether uncached prompt tokens may incur a cache-write charge by default."},"tiers":{"type":"array","items":{"type":"object","properties":{"input":{"type":"number","minimum":0,"description":"Input tokens, EUR per 1M."},"output":{"type":"number","minimum":0,"description":"Output tokens, EUR per 1M."},"cache_read":{"type":"number","minimum":0,"description":"Cache-read input tokens, EUR per 1M. Absent when not billed separately."},"cache_write":{"type":"number","minimum":0,"description":"Cache-write input tokens, EUR per 1M. Absent when not billed separately."},"cache_write_1h":{"type":"number","minimum":0,"description":"One-hour cache-write input tokens, EUR per 1M. Omitted when no separate rate is recorded."},"audio_input":{"type":"number","minimum":0,"description":"Audio input tokens, EUR per 1M."},"audio_output":{"type":"number","minimum":0,"description":"Audio output tokens, EUR per 1M."},"audio_cache_read":{"type":"number","minimum":0,"description":"Cached audio input tokens, EUR per 1M."},"id":{"type":"string","description":"Stable pricing-tier identifier."},"label":{"type":"string","description":"Display label; not a machine-readable condition."},"applies_to":{"type":"string","description":"Recorded condition in words; do not infer thresholds from this text."},"input_tokens_above":{"type":"integer","minimum":0,"description":"The tier applies when normalized input tokens strictly exceed this threshold. Omitted when no numeric condition is recorded."}},"required":["input","output","id","label","applies_to"]},"description":"Conditional provider tariffs, in declaration order. These are provider costs, not customer prices."}},"required":["input","output"],"description":"What the inference provider charges Veryfront."},"total_cost":{"type":"object","properties":{"input":{"type":"number","minimum":0,"description":"Input tokens, EUR per 1M."},"output":{"type":"number","minimum":0,"description":"Output tokens, EUR per 1M."},"cache_read":{"type":"number","minimum":0,"description":"Cache-read input tokens, EUR per 1M. Absent when not billed separately."},"cache_write":{"type":"number","minimum":0,"description":"Cache-write input tokens, EUR per 1M. Absent when not billed separately."},"cache_write_1h":{"type":"number","minimum":0,"description":"One-hour cache-write input tokens, EUR per 1M. Omitted when no separate rate is recorded."},"audio_input":{"type":"number","minimum":0,"description":"Audio input tokens, EUR per 1M."},"audio_output":{"type":"number","minimum":0,"description":"Audio output tokens, EUR per 1M."},"audio_cache_read":{"type":"number","minimum":0,"description":"Cached audio input tokens, EUR per 1M."}},"required":["input","output"],"description":"What the customer pays."}},"required":["provider_cost","total_cost"],"description":"What this deployment costs, in EUR per 1M tokens; null unless both the customer price and the provider cost are recorded."},"routing":{"type":"object","properties":{"surface":{"type":"string","enum":["openai","anthropic","google"],"description":"Wire protocol to call the model on."},"operations":{"type":"array","items":{"type":"string"},"description":"Operations of `surface` the model is served on, e.g. `messages`."},"transport":{"type":"string","description":"OpenAI wire API the model must use; absent when unconstrained."},"provider_tools":{"type":"array","items":{"type":"string"},"description":"Provider-executed tools this deployment allows."},"reasoning":{"type":"object","properties":{"mode":{"type":"string","description":"Reasoning control, e.g. `budget` or `adaptive`. Tolerate values you have not seen."},"budget_tokens":{"type":"integer","exclusiveMinimum":0,"description":"Thinking budget sent when the caller sets none."}},"required":["mode"],"description":"How to control reasoning; absent when the model has no controllable reasoning."},"chat_completions":{"type":"object","properties":{"reasoning_with_function_tools":{"type":"boolean","description":"Whether reasoning and function tools work in one request. Missing means true."},"consecutive_system_messages":{"type":"boolean","description":"Whether consecutive system messages are accepted. Missing means false."}},"description":"Chat Completions constraints; absent when none is recorded."}},"required":["surface","operations","provider_tools"],"description":"How to call the model."},"is_default":{"type":"boolean","description":"True on the first enabled deployment of the model a client preselects, and on no other. The first allowed and served default stated by the project or account wins. Otherwise it recommends Claude Sonnet 4.6, then the managed default, then the first served model. Use `is_policy_default` to read the effective policy default. No deployment is marked when nothing is served."},"is_managed_default":{"type":"boolean","description":"True on the first enabled deployment of the managed discovery recommendation, and on no other: the served default the project or its account states, else the first EU-preferred model served, else the first served model. This historical first-served fallback does not prove a model-less run is admissible. Use `is_policy_default` for the effective policy default. No deployment is marked when nothing is served."},"is_policy_default":{"type":"boolean","description":"The effective policy default, readable by project members without settings access: true on its first enabled deployment only. Select the first allowed and served candidate from the project default, account default, then built-in EU preference. Without a project, only the account default, if any, and the built-in preference apply. No deployment is marked when no candidate is served, even if other models are available. API-key limits can narrow this answer further. Customer-funded defaults still require an active credential at run time. Clients should preselect this model when present; use `is_default` only as a UI fallback for an explicit model request."},"enabled":{"type":"boolean","description":"Whether the policy in force allows this deployment."},"disabled_by":{"type":"string","enum":["account","project","api_key"],"description":"The level whose policy refuses this deployment. Present exactly when `enabled` is false."}},"required":["model","model_provider","inference_provider","region","residency","pricing","routing","is_default","is_managed_default","is_policy_default","enabled"],"description":"One place a model runs."},"description":"One entry per place a model runs, in routing order, including the ones the policy in force refuses. A model's first enabled deployment is the one requests route to."}},"required":["deployments"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"This project's inference policy could not be read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Model discovery","x-canonical-documentation":{"domain":"ai-gateway","resource":"Models","subgroup":"Model discovery","name":"List models","description":"List model deployments, routing details and access status for the supplied credentials and account or project context.","operationId":"listModels"}}},"/catalog/models":{"get":{"operationId":"listPublicModelCatalog","tags":["ai-gateway/Models/Model discovery"],"security":[],"summary":"Browse public models","description":"List public model information.","responses":{"200":{"description":"Public platform model catalog. Requires no authentication, reads no caller context, and is identical for every caller, so it is cacheable. Provider cost is served in EUR only. Pricing source links are not included; the authenticated `GET /ai/models` carries them.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicModelCatalog"}}}},"304":{"description":"The catalog has not changed since the ETag in `If-None-Match`"},"429":{"description":"Rate limit exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Model discovery","x-canonical-documentation":{"domain":"ai-gateway","resource":"Models","subgroup":"Model discovery","name":"Browse public models","description":"List public model information.","operationId":"listPublicModelCatalog"}}},"/catalog/model-providers/{id}/icon":{"get":{"operationId":"getModelProviderIcon","tags":["ai-gateway/Models/Model discovery"],"security":[],"summary":"Get model provider icon","description":"Return model provider icon.","parameters":[{"schema":{"type":"string","description":"Model provider ID","example":"anthropic"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"SVG icon","content":{"image/svg+xml":{"schema":{"type":"string","description":"SVG document of the model provider icon"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Model discovery","x-canonical-documentation":{"domain":"ai-gateway","resource":"Models","subgroup":"Model discovery","name":"Get model provider icon","description":"Return model provider icon.","operationId":"getModelProviderIcon"}}},"/ai/v1beta/models":{"get":{"operationId":"neutralGoogleModelList","tags":["ai-gateway/Models/Inference Models"],"summary":"List models in Gemini format","description":"List models in Gemini format.","parameters":[{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":1000,"description":"Maximum number of models to return.","example":50},"required":false,"name":"pageSize","in":"query"},{"schema":{"type":"string","minLength":1,"description":"The `nextPageToken` of the previous page."},"required":false,"name":"pageToken","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Canonical project selector: a UUID or slug for model access, inference and billing context. A signed project scope takes precedence. Otherwise, send only one project selector header."},"required":false,"name":"x-veryfront-project-reference","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Compatibility selector accepting a project UUID. Prefer x-veryfront-project-reference."},"required":false,"name":"x-veryfront-project-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Compatibility selector accepting a project slug. Prefer x-veryfront-project-reference."},"required":false,"name":"x-veryfront-project-slug","in":"header"}],"responses":{"200":{"description":"Model list, answered from the Veryfront catalog and never forwarded to a vendor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralGoogleModelList"}}}},"400":{"description":"No project selector, or a selector that names no usable project","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralGoogleError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralGoogleError"}}}},"403":{"description":"Project access denied, or a credential restricted to template inference","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralGoogleError"}}}},"500":{"description":"Gateway error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralGoogleError"}}}},"503":{"description":"Authentication or the project inference policy is temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralGoogleError"}}}}},"x-documentation-source-tag":"Inference Models","x-canonical-documentation":{"domain":"ai-gateway","resource":"Models","subgroup":"Inference Models","name":"List models in Gemini format","description":"List models in Gemini format.","operationId":"neutralGoogleModelList"}}},"/ai/v1/models":{"get":{"operationId":"neutralOpenAiModelList","tags":["ai-gateway/Models/Inference Models"],"summary":"List models in OpenAI format","description":"List models in OpenAI format.","parameters":[{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":1000,"description":"Maximum number of models to return.","example":1000},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Anthropic format only (`anthropic-version` sent): return the models that follow this model id."},"required":false,"name":"after_id","in":"query"},{"schema":{"type":"string","description":"Anthropic format only (`anthropic-version` sent): return the models that precede this model id."},"required":false,"name":"before_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Canonical project selector: a UUID or slug for model access, inference and billing context. A signed project scope takes precedence. Otherwise, send only one project selector header."},"required":false,"name":"x-veryfront-project-reference","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Compatibility selector accepting a project UUID. Prefer x-veryfront-project-reference."},"required":false,"name":"x-veryfront-project-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Compatibility selector accepting a project slug. Prefer x-veryfront-project-reference."},"required":false,"name":"x-veryfront-project-slug","in":"header"},{"schema":{"type":"string","description":"Present on an Anthropic client's request, as Anthropic SDKs and Claude Code send it. Selects Anthropic's list format and error envelope, and the Anthropic cursors `after_id` and `before_id`. Without it the list uses OpenAI's format.","example":"2023-06-01"},"required":false,"name":"anthropic-version","in":"header"}],"responses":{"200":{"description":"Model list from the Veryfront catalog, never forwarded to a vendor. OpenAI's list shape by default; Anthropic's list shape, error envelope and `after_id` / `before_id` cursors when the request carries `anthropic-version`.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NeutralOpenAiModelList"},{"$ref":"#/components/schemas/NeutralAnthropicModelList"}]}}}},"400":{"description":"No project selector, or a selector that names no usable project","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NeutralOpenAiError"},{"$ref":"#/components/schemas/NeutralAnthropicError"}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NeutralOpenAiError"},{"$ref":"#/components/schemas/NeutralAnthropicError"}]}}}},"403":{"description":"Project access denied, or a credential restricted to template inference","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NeutralOpenAiError"},{"$ref":"#/components/schemas/NeutralAnthropicError"}]}}}},"500":{"description":"Gateway error","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NeutralOpenAiError"},{"$ref":"#/components/schemas/NeutralAnthropicError"}]}}}},"503":{"description":"Authentication or the project inference policy is temporarily unavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NeutralOpenAiError"},{"$ref":"#/components/schemas/NeutralAnthropicError"}]}}}}},"x-documentation-source-tag":"Inference Models","x-canonical-documentation":{"domain":"ai-gateway","resource":"Models","subgroup":"Inference Models","name":"List models in OpenAI format","description":"List models in OpenAI format.","operationId":"neutralOpenAiModelList"}}},"/projects/{project_reference}/inference-policy":{"get":{"operationId":"getInferencePolicy","tags":["ai-gateway/Models/Project inference policy"],"summary":"Get inference policy","description":"Read which models a project allows and denies, its default model, and what it inherits from its account; returns the served defaults when the project stores no policy. Requires project.settings.manage.","parameters":[{"$ref":"#/components/parameters/ProjectReference"}],"responses":{"200":{"description":"The project's inference policy, or the defaults it is served under","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferencePolicy"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Requires a signed-in project administrator. API keys are rejected regardless of their scopes, including project-scoped keys.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project inference policy","x-canonical-documentation":{"domain":"ai-gateway","resource":"Models","subgroup":"Project inference policy","name":"Get inference policy","description":"Read which models a project allows and denies, its default model, and what it inherits from its account; returns the served defaults when the project stores no policy. Requires project.settings.manage.","operationId":"getInferencePolicy"}},"patch":{"operationId":"patchInferencePolicy","tags":["ai-gateway/Models/Project inference policy"],"summary":"Update inference policy models","description":"Update the models a project allows and denies and its default model, replacing each key sent; returns the policy. Requires project.settings.manage.","parameters":[{"$ref":"#/components/parameters/ProjectReference"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"models":{"type":"object","properties":{"allowed":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._/-]*$","description":"Model ID returned by list_models. Known catalog aliases are normalized to canonical IDs. Policy IDs use letters, digits, dots, underscores, slashes, and hyphens; arbitrary provider model strings are not accepted."},"maxItems":500,"description":"Model IDs from list_models the project allows. Null removes the restriction; an empty list allows nothing. Omit to keep the stored list."},"denied":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._/-]*$","description":"Model ID returned by list_models. Known catalog aliases are normalized to canonical IDs. Policy IDs use letters, digits, dots, underscores, slashes, and hyphens; arbitrary provider model strings are not accepted."},"maxItems":500,"description":"Model IDs from list_models the project denies. A denial overrides an allowance. Omit to keep the stored list."}},"additionalProperties":false,"description":"Models the project allows and denies. They only narrow what its account allows."},"default_model":{"type":["string","null"],"minLength":1,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._/-]*$","description":"Default model of the project. It must be allowed by the project's and its account's policy. Null uses the account default. Omit to keep the stored value."}},"additionalProperties":false}}}},"responses":{"200":{"description":"The policy as it now stands","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferencePolicy"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Requires a signed-in project administrator. API keys are rejected regardless of their scopes, including project-scoped keys.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"A model in `models.allowed` or `default_model` is retired (`model-retired`). The Problem detail names its successor; nothing is saved.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project inference policy","x-canonical-documentation":{"domain":"ai-gateway","resource":"Models","subgroup":"Project inference policy","name":"Update inference policy models","description":"Update the models a project allows and denies and its default model, replacing each key sent; returns the policy. Requires project.settings.manage.","operationId":"patchInferencePolicy"}},"delete":{"operationId":"deleteInferencePolicy","tags":["ai-gateway/Models/Project inference policy"],"summary":"Delete inference policy","description":"Remove the stored inference policy of a project so it is served the defaults again; returns an acknowledgement. Requires project.settings.manage.","parameters":[{"$ref":"#/components/parameters/ProjectReference"}],"responses":{"200":{"description":"Removes the policy and any recorded standard-tier consent. The project is then served under the defaults: EU-only under the `eu-resident` minimum tier while the EU default is on; every allowed model once the EU default has ended. The API records who removed the policy and retains the policy history. Succeeds without a change if no policy exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Requires a signed-in project administrator. API keys are rejected regardless of their scopes, including project-scoped keys. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project inference policy","x-canonical-documentation":{"domain":"ai-gateway","resource":"Models","subgroup":"Project inference policy","name":"Delete inference policy","description":"Remove the stored inference policy of a project so it is served the defaults again; returns an acknowledgement. Requires project.settings.manage.","operationId":"deleteInferencePolicy"}}},"/accounts/{account_id}/inference-policy":{"get":{"operationId":"getAccountInferencePolicy","tags":["ai-gateway/Models/Account inference policy"],"summary":"Get account inference policy","description":"Get account inference policy. Requires account.settings.manage.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"}],"responses":{"200":{"description":"The account inference policy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountInferencePolicy"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Requires a signed-in session as the account owner or an admin with `account.settings.manage`. API keys are refused whatever their scopes, so no API key scope grants access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account inference policy","x-canonical-documentation":{"domain":"ai-gateway","resource":"Models","subgroup":"Account inference policy","name":"Get account inference policy","description":"Get account inference policy. Requires account.settings.manage.","operationId":"getAccountInferencePolicy"}},"patch":{"operationId":"updateAccountInferencePolicy","tags":["ai-gateway/Models/Account inference policy"],"summary":"Update account inference policy","description":"Update the models an account allows and denies and its default model, replacing each key sent; returns the policy. Requires account.settings.manage.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"models":{"type":"object","properties":{"allowed":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._/-]*$","description":"Model ID returned by list_models. Known catalog aliases are normalized to canonical IDs. Policy IDs use letters, digits, dots, underscores, slashes, and hyphens; arbitrary provider model strings are not accepted."},"maxItems":500,"description":"Model IDs from list_models the account allows. Null removes the restriction; an empty list allows nothing. Omit to keep the stored list."},"denied":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._/-]*$","description":"Model ID returned by list_models. Known catalog aliases are normalized to canonical IDs. Policy IDs use letters, digits, dots, underscores, slashes, and hyphens; arbitrary provider model strings are not accepted."},"maxItems":500,"description":"Model IDs from list_models the account denies. A denial overrides an allowance. Omit to keep the stored list."}},"additionalProperties":false,"description":"Models the account allows and denies. Every project of the account can only narrow them."},"default_model":{"type":["string","null"],"minLength":1,"maxLength":200,"pattern":"^[a-z0-9][a-z0-9._/-]*$","description":"Default model of projects that set none. It must be allowed by the policy. Null uses the built-in default. Omit to keep the stored value."}},"additionalProperties":false}}}},"responses":{"200":{"description":"The account inference policy after the update. Requires a signed-in account owner or admin. API keys are rejected regardless of their scopes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountInferencePolicy"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Requires a signed-in session as the account owner or an admin with `account.settings.manage`. API keys are refused whatever their scopes, so no API key scope grants access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"A model in `models.allowed` or `default_model` is retired (`model-retired`). The Problem detail names its successor; nothing is saved.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account inference policy","x-canonical-documentation":{"domain":"ai-gateway","resource":"Models","subgroup":"Account inference policy","name":"Update account inference policy","description":"Update the models an account allows and denies and its default model, replacing each key sent; returns the policy. Requires account.settings.manage.","operationId":"updateAccountInferencePolicy"}},"delete":{"operationId":"deleteAccountInferencePolicy","tags":["ai-gateway/Models/Account inference policy"],"summary":"Delete account inference policy","description":"Remove the model policy of an account, so its projects may use every model again; returns an acknowledgement. Requires account.settings.manage.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"}],"responses":{"200":{"description":"The model policy was removed. Requires a signed-in account owner or admin. API keys are rejected regardless of their scopes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Requires a signed-in session as the account owner or an admin with `account.settings.manage`. API keys are refused whatever their scopes, so no API key scope grants access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account inference policy","x-canonical-documentation":{"domain":"ai-gateway","resource":"Models","subgroup":"Account inference policy","name":"Delete account inference policy","description":"Remove the model policy of an account, so its projects may use every model again; returns an acknowledgement. Requires account.settings.manage.","operationId":"deleteAccountInferencePolicy"}}},"/accounts/{account_id}/inference-providers/{provider}/policy-preview":{"get":{"operationId":"previewAccountInferenceProvider","tags":["ai-gateway/Provider credentials/Account provider credentials"],"summary":"Preview account provider policy restrictions","description":"Read account and project model restrictions for a customer-funded direct provider route without reading or changing credentials. Requires account.settings.manage.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"},{"schema":{"type":"string","enum":["anthropic","openai"]},"required":true,"name":"provider","in":"path"}],"responses":{"200":{"description":"Account and project policy restrictions for customer funding","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountInferenceProviderPolicyPreview"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account provider credentials","x-canonical-documentation":{"domain":"ai-gateway","resource":"Provider credentials","subgroup":"Account provider credentials","name":"Preview account provider policy restrictions","description":"Read account and project model restrictions for a customer-funded direct provider route without reading or changing credentials. Requires account.settings.manage.","operationId":"previewAccountInferenceProvider"}}},"/accounts/{account_id}/inference-providers":{"get":{"operationId":"listAccountInferenceProviders","tags":["ai-gateway/Provider credentials/Account provider credentials"],"summary":"List account inference providers","description":"Read masked account provider credentials and funding modes without returning secrets. Requires account.settings.manage.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"}],"responses":{"200":{"description":"Masked account provider configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountInferenceProviders"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account provider credentials","x-canonical-documentation":{"domain":"ai-gateway","resource":"Provider credentials","subgroup":"Account provider credentials","name":"List account inference providers","description":"Read masked account provider credentials and funding modes without returning secrets. Requires account.settings.manage.","operationId":"listAccountInferenceProviders"}}},"/accounts/{account_id}/inference-providers/{provider}":{"put":{"operationId":"updateAccountInferenceProvider","tags":["ai-gateway/Provider credentials/Account provider credentials"],"summary":"Update account inference provider","description":"Validate and save an account provider funding mode and optional replacement key at the expected revision. Requires account.settings.manage.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"},{"schema":{"type":"string","enum":["anthropic","openai"]},"required":true,"name":"provider","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expected_revision":{"type":"integer","minimum":0,"maximum":2147483646},"mode":{"type":"string","enum":["managed","customer"]},"api_key":{"type":"string","minLength":16,"maxLength":4096,"pattern":"^[\\x21-\\x7e]+$","writeOnly":true}},"required":["expected_revision","mode"],"additionalProperties":false}}}},"responses":{"200":{"description":"Saved provider configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountInferenceProvider"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account provider credentials","x-canonical-documentation":{"domain":"ai-gateway","resource":"Provider credentials","subgroup":"Account provider credentials","name":"Update account inference provider","description":"Validate and save an account provider funding mode and optional replacement key at the expected revision. Requires account.settings.manage.","operationId":"updateAccountInferenceProvider"}}},"/accounts/{account_id}/inference-providers/{provider}/revoke":{"post":{"operationId":"revokeAccountInferenceProviderCredential","tags":["ai-gateway/Provider credentials/Account provider credentials"],"summary":"Revoke account inference provider credential","description":"Revoke an account provider key at the expected revision while preserving its funding mode. Requires account.settings.manage.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"},{"schema":{"type":"string","enum":["anthropic","openai"]},"required":true,"name":"provider","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expected_revision":{"type":"integer","minimum":1,"maximum":2147483646}},"required":["expected_revision"],"additionalProperties":false}}}},"responses":{"200":{"description":"Revoked provider credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountInferenceProvider"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account provider credentials","x-canonical-documentation":{"domain":"ai-gateway","resource":"Provider credentials","subgroup":"Account provider credentials","name":"Revoke account inference provider credential","description":"Revoke an account provider key at the expected revision while preserving its funding mode. Requires account.settings.manage.","operationId":"revokeAccountInferenceProviderCredential"}}},"/ai/v1/decisions":{"post":{"operationId":"neutralDecisions","tags":["ai-gateway/Inference/OpenAI Decisions"],"summary":"Create decision","description":"Evaluate evidence with predicate, choice, or score questions.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Canonical project selector: a UUID or slug for model access, inference and billing context. A signed project scope takes precedence. Otherwise, send only one project selector header."},"required":false,"name":"x-veryfront-project-reference","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Compatibility selector accepting a project UUID. Prefer x-veryfront-project-reference."},"required":false,"name":"x-veryfront-project-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Compatibility selector accepting a project slug. Prefer x-veryfront-project-reference."},"required":false,"name":"x-veryfront-project-slug","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":245,"description":"Durable run ID. Required for run-bound service-account credentials."},"required":false,"name":"x-veryfront-agent-run-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Durable conversation ID. Required with agent run attribution."},"required":false,"name":"x-veryfront-conversation-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Durable message ID. Required with agent run attribution."},"required":false,"name":"x-veryfront-message-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Agent ID. Must match the authenticated run-bound credential."},"required":false,"name":"x-veryfront-agent-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Optional billing group. Run requests are pinned to agent-run:<run-id>."},"required":false,"name":"x-veryfront-billing-group-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","description":"Catalog model ID or alias used to select an explicitly supported deployment.","maxLength":1048576,"minLength":1,"pattern":"\\S"},"input":{"anyOf":[{"type":"string","maxLength":10485760},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message"],"default":"message"},"role":{"type":"string","enum":["user"],"default":"user"},"content":{"anyOf":[{"type":"string","maxLength":10485760},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"],"default":"input_text"},"text":{"type":"string","maxLength":10485760},"prompt_cache_breakpoint":{"type":["object","null"],"properties":{"mode":{"type":"string","enum":["explicit"],"default":"explicit"}}}},"required":["text"]},{"type":"object","properties":{"type":{"type":"string","enum":["input_image"],"default":"input_image"},"image_url":{"type":"string","maxLength":1073741824,"pattern":"^(data:|https?://)"},"detail":{"type":["string","null"],"enum":["low","high","auto","original",null]},"prompt_cache_breakpoint":{"type":["object","null"],"properties":{"mode":{"type":"string","enum":["explicit"],"default":"explicit"}}}},"required":["image_url"]},{"type":"object","properties":{"type":{"type":"string","enum":["input_json"],"default":"input_json"},"data":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"array","items":{"type":"object","additionalProperties":{}}}],"description":"JSON object or array of objects, limited to 32 container levels, 10,000 values, and 256 KiB of compact UTF-8 JSON."}},"required":["data"]}]},"maxItems":16384}]}},"required":["content"]},{"type":"object","properties":{"type":{"type":"string","enum":["message"],"default":"message"},"role":{"type":"string","enum":["developer"]},"content":{"anyOf":[{"type":"string","maxLength":10485760},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["input_text"],"default":"input_text"},"text":{"type":"string","maxLength":10485760},"prompt_cache_breakpoint":{"type":["object","null"],"properties":{"mode":{"type":"string","enum":["explicit"],"default":"explicit"}}}},"required":["text"]},"maxItems":16384}]}},"required":["role","content"]},{"type":"object","properties":{"type":{"type":"string","enum":["message"],"default":"message"},"role":{"type":"string","enum":["system"]},"content":{"anyOf":[{"type":"string","maxLength":10485760},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["input_text"],"default":"input_text"},"text":{"type":"string","maxLength":10485760},"prompt_cache_breakpoint":{"type":["object","null"],"properties":{"mode":{"type":"string","enum":["explicit"],"default":"explicit"}}}},"required":["text"]},"maxItems":16384}]}},"required":["role","content"]},{"type":"object","properties":{"type":{"type":"string","enum":["message"],"default":"message"},"role":{"type":"string","enum":["assistant"],"default":"assistant"},"phase":{"type":["string","null"],"enum":["commentary","final_answer",null]},"content":{"anyOf":[{"type":"string","maxLength":10485760},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["output_text"],"default":"output_text"},"text":{"type":"string","maxLength":10485760}},"required":["text"]},{"type":"object","properties":{"type":{"type":"string","enum":["refusal"],"default":"refusal"},"refusal":{"type":"string","maxLength":10485760}},"required":["refusal"]}]},"maxItems":16384}]}},"required":["content"]},{"type":"object","properties":{"type":{"type":"string","enum":["function_call"],"default":"function_call"},"call_id":{"type":"string","maxLength":64,"minLength":1},"id":{"type":"string","maxLength":1048576},"status":{"type":["string","null"],"enum":["in_progress","completed","incomplete",null]},"arguments":{"type":"string","maxLength":1048576},"namespace":{"type":"string","maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$","minLength":1},"name":{"type":"string","maxLength":128,"pattern":"^[a-zA-Z0-9_.-]+$","minLength":1}},"required":["call_id","arguments","name"]},{"type":"object","properties":{"type":{"type":"string","enum":["function_call_output"]},"call_id":{"type":"string","maxLength":64,"minLength":1},"id":{"type":"string","maxLength":1048576},"status":{"type":["string","null"],"enum":["in_progress","completed","incomplete",null]},"output":{"anyOf":[{"type":"string","maxLength":10485760},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"],"default":"input_text"},"text":{"type":"string","maxLength":10485760},"prompt_cache_breakpoint":{"type":["object","null"],"properties":{"mode":{"type":"string","enum":["explicit"],"default":"explicit"}}}},"required":["text"]},{"type":"object","properties":{"type":{"type":"string","enum":["input_image"],"default":"input_image"},"image_url":{"type":"string","maxLength":1073741824,"pattern":"^(data:|https?://)"},"detail":{"type":["string","null"],"enum":["low","high","auto","original",null]},"prompt_cache_breakpoint":{"type":["object","null"],"properties":{"mode":{"type":"string","enum":["explicit"],"default":"explicit"}}}},"required":["image_url"]}]},"maxItems":16384}]}},"required":["call_id","output"]},{"type":"object","properties":{"type":{"type":"string","enum":["custom_tool_call"],"default":"custom_tool_call"},"call_id":{"type":"string","maxLength":64,"minLength":1},"id":{"type":"string","maxLength":1048576},"status":{"type":["string","null"],"enum":["in_progress","completed","incomplete",null]},"input":{"type":"string","maxLength":1048576},"namespace":{"type":"string","maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$","minLength":1},"name":{"type":"string","maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$","minLength":1}},"required":["call_id","input","name"]},{"type":"object","properties":{"type":{"type":"string","enum":["custom_tool_call_output"]},"call_id":{"type":"string","maxLength":64,"minLength":1},"id":{"type":"string","maxLength":1048576},"status":{"type":["string","null"],"enum":["in_progress","completed","incomplete",null]},"output":{"anyOf":[{"type":"string","maxLength":10485760},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"],"default":"input_text"},"text":{"type":"string","maxLength":10485760},"prompt_cache_breakpoint":{"type":["object","null"],"properties":{"mode":{"type":"string","enum":["explicit"],"default":"explicit"}}}},"required":["text"]},{"type":"object","properties":{"type":{"type":"string","enum":["input_image"],"default":"input_image"},"image_url":{"type":"string","maxLength":1073741824,"pattern":"^(data:|https?://)"},"detail":{"type":["string","null"],"enum":["low","high","auto","original",null]},"prompt_cache_breakpoint":{"type":["object","null"],"properties":{"mode":{"type":"string","enum":["explicit"],"default":"explicit"}}}},"required":["image_url"]}]},"maxItems":16384}]}},"required":["call_id","output"]}]},"maxItems":131072}],"description":"Shared evidence as text or an ordered conversation. Each tool output must match a preceding call by call_id and tool type."},"questions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["predicate"],"default":"predicate"},"instructions":{"anyOf":[{"type":"string","maxLength":1048576},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"],"default":"input_text"},"text":{"type":"string","maxLength":10485760}},"required":["text"]},{"type":"object","properties":{"type":{"type":"string","enum":["input_image"],"default":"input_image"},"image_url":{"type":"string","maxLength":1073741824,"pattern":"^(data:|https?://)"},"detail":{"type":["string","null"],"enum":["low","high","auto","original",null]}},"required":["image_url"]},{"type":"object","properties":{"type":{"type":"string","enum":["input_json"],"default":"input_json"},"data":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"array","items":{"type":"object","additionalProperties":{}}}],"description":"JSON object or array of objects, limited to 32 container levels, 10,000 values, and 256 KiB of compact UTF-8 JSON."}},"required":["data"]}]},"minItems":1,"maxItems":16384}],"description":"Question instructions as text or text, image, and JSON parts."},"name":{"type":"string","description":"Optional name echoed in the corresponding answer.","maxLength":1048576}},"required":["instructions"]},{"type":"object","properties":{"type":{"type":"string","enum":["choice"]},"instructions":{"anyOf":[{"type":"string","maxLength":1048576},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"],"default":"input_text"},"text":{"type":"string","maxLength":10485760}},"required":["text"]},{"type":"object","properties":{"type":{"type":"string","enum":["input_image"],"default":"input_image"},"image_url":{"type":"string","maxLength":1073741824,"pattern":"^(data:|https?://)"},"detail":{"type":["string","null"],"enum":["low","high","auto","original",null]}},"required":["image_url"]},{"type":"object","properties":{"type":{"type":"string","enum":["input_json"],"default":"input_json"},"data":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"array","items":{"type":"object","additionalProperties":{}}}],"description":"JSON object or array of objects, limited to 32 container levels, 10,000 values, and 256 KiB of compact UTF-8 JSON."}},"required":["data"]}]},"minItems":1,"maxItems":16384}],"description":"Question instructions as text or text, image, and JSON parts."},"name":{"type":"string","description":"Optional name echoed in the corresponding answer.","maxLength":1048576},"choices":{"type":"array","items":{"type":"object","properties":{"value":{"anyOf":[{"type":"string","maxLength":1048576},{"type":"boolean"}]},"description":{"type":"string","maxLength":1048576}},"required":["value"]},"minItems":2,"maxItems":255}},"required":["type","instructions","choices"]},{"type":"object","properties":{"type":{"type":"string","enum":["score"]},"instructions":{"anyOf":[{"type":"string","maxLength":1048576},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"],"default":"input_text"},"text":{"type":"string","maxLength":10485760}},"required":["text"]},{"type":"object","properties":{"type":{"type":"string","enum":["input_image"],"default":"input_image"},"image_url":{"type":"string","maxLength":1073741824,"pattern":"^(data:|https?://)"},"detail":{"type":["string","null"],"enum":["low","high","auto","original",null]}},"required":["image_url"]},{"type":"object","properties":{"type":{"type":"string","enum":["input_json"],"default":"input_json"},"data":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"array","items":{"type":"object","additionalProperties":{}}}],"description":"JSON object or array of objects, limited to 32 container levels, 10,000 values, and 256 KiB of compact UTF-8 JSON."}},"required":["data"]}]},"minItems":1,"maxItems":16384}],"description":"Question instructions as text or text, image, and JSON parts."},"name":{"type":"string","description":"Optional name echoed in the corresponding answer.","maxLength":1048576},"levels":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","maxLength":1048576},"description":{"type":"string","maxLength":1048576}},"required":["label"]},"minItems":2,"maxItems":10}},"required":["type","instructions","levels"]}],"description":"Predicate (the default), choice, or score question."},"minItems":1,"maxItems":400},"prompt_cache_key":{"type":"string","maxLength":64},"prompt_cache_options":{"type":["object","null"],"properties":{"mode":{"type":["string","null"],"enum":["implicit","explicit",null]},"ttl":{"type":"string","enum":["30m"]}}},"safety_identifier":{"type":"string","maxLength":128}},"required":["model","input","questions"],"description":"OpenAI-compatible Decisions request on an explicitly supported deployment. Predicate is the default question type. Streaming and generation controls are not supported.","title":"NeutralDecisionsRequest"}}}},"responses":{"200":{"description":"Upstream provider response (forwarded as-is)"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralOpenAiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralOpenAiError"}}}},"402":{"description":"Insufficient AI credits, an exhausted monthly AI budget, or a provider spend limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralOpenAiError"}}}},"403":{"description":"Project access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralOpenAiError"}}}},"404":{"description":"No deployment of this model speaks this protocol natively","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralOpenAiError"}}}},"413":{"description":"Request body over the 32 MiB limit (code request_too_large), or an upstream 413 re-rendered in this envelope"},"429":{"description":"The calling API key's requests-per-minute limit (code key-rate-limited), or an upstream provider rate limit re-rendered in this envelope with its Retry-After"},"500":{"description":"Gateway error, or an upstream 500 re-rendered in this envelope"},"502":{"description":"Gateway proxy error, or an upstream 502 re-rendered in this envelope"},"503":{"description":"No available deployment, auth unavailable, or an upstream 503 re-rendered in this envelope"},"529":{"description":"Upstream provider overloaded, re-rendered in this envelope"},"default":{"description":"Any other status the upstream provider returned, with the upstream status and its body (if any) re-rendered in this envelope"}},"x-documentation-source-tag":"OpenAI Decisions","x-canonical-documentation":{"domain":"ai-gateway","resource":"Inference","subgroup":"OpenAI Decisions","name":"Create decision","description":"Evaluate evidence with predicate, choice, or score questions.","operationId":"neutralDecisions"}}},"/ai/v1/chat/completions":{"post":{"operationId":"neutralChatCompletions","tags":["ai-gateway/Inference/OpenAI Chat Completions"],"summary":"Create chat completion","description":"Create chat completion.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Canonical project selector: a UUID or slug for model access, inference and billing context. A signed project scope takes precedence. Otherwise, send only one project selector header."},"required":false,"name":"x-veryfront-project-reference","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Compatibility selector accepting a project UUID. Prefer x-veryfront-project-reference."},"required":false,"name":"x-veryfront-project-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Compatibility selector accepting a project slug. Prefer x-veryfront-project-reference."},"required":false,"name":"x-veryfront-project-slug","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":245,"description":"Durable run ID. Required for run-bound service-account credentials."},"required":false,"name":"x-veryfront-agent-run-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Durable conversation ID. Required with agent run attribution."},"required":false,"name":"x-veryfront-conversation-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Durable message ID. Required with agent run attribution."},"required":false,"name":"x-veryfront-message-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Agent ID. Must match the authenticated run-bound credential."},"required":false,"name":"x-veryfront-agent-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Optional billing group. Run requests are pinned to agent-run:<run-id>."},"required":false,"name":"x-veryfront-billing-group-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"title":"NeutralChatCompletionsRequest","description":"OpenAI-compatible chat completion request. The model ID selects the deployment.","type":"object","properties":{"model":{"type":"string","description":"Catalog model ID or alias. Required: the request is routed by model, not by base URL."},"messages":{"type":"array","items":{},"description":"Vendor-shaped messages, forwarded as sent."}},"required":["model","messages"],"additionalProperties":true}}}},"responses":{"200":{"description":"Upstream provider response (forwarded as-is)"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralOpenAiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralOpenAiError"}}}},"402":{"description":"Insufficient AI credits, an exhausted monthly AI budget, or a provider spend limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralOpenAiError"}}}},"403":{"description":"Project access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralOpenAiError"}}}},"404":{"description":"No deployment of this model speaks this protocol natively","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralOpenAiError"}}}},"413":{"description":"Request body over the 32 MiB limit (code request_too_large), or an upstream 413 re-rendered in this envelope"},"429":{"description":"The calling API key's requests-per-minute limit (code key-rate-limited), or an upstream provider rate limit re-rendered in this envelope with its Retry-After"},"500":{"description":"Gateway error, or an upstream 500 re-rendered in this envelope"},"502":{"description":"Gateway proxy error, or an upstream 502 re-rendered in this envelope"},"503":{"description":"No available deployment, auth unavailable, or an upstream 503 re-rendered in this envelope"},"529":{"description":"Upstream provider overloaded, re-rendered in this envelope"},"default":{"description":"Any other status the upstream provider returned, with the upstream status and its body (if any) re-rendered in this envelope"}},"x-documentation-source-tag":"OpenAI Chat Completions","x-canonical-documentation":{"domain":"ai-gateway","resource":"Inference","subgroup":"OpenAI Chat Completions","name":"Create chat completion","description":"Create chat completion.","operationId":"neutralChatCompletions"}}},"/ai/v1/embeddings":{"post":{"operationId":"neutralEmbeddings","tags":["ai-gateway/Inference/Embeddings"],"summary":"Create embeddings","description":"Create embeddings.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Canonical project selector: a UUID or slug for model access, inference and billing context. A signed project scope takes precedence. Otherwise, send only one project selector header."},"required":false,"name":"x-veryfront-project-reference","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Compatibility selector accepting a project UUID. Prefer x-veryfront-project-reference."},"required":false,"name":"x-veryfront-project-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Compatibility selector accepting a project slug. Prefer x-veryfront-project-reference."},"required":false,"name":"x-veryfront-project-slug","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":245,"description":"Durable run ID. Required for run-bound service-account credentials."},"required":false,"name":"x-veryfront-agent-run-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Durable conversation ID. Required with agent run attribution."},"required":false,"name":"x-veryfront-conversation-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Durable message ID. Required with agent run attribution."},"required":false,"name":"x-veryfront-message-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Agent ID. Must match the authenticated run-bound credential."},"required":false,"name":"x-veryfront-agent-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Optional billing group. Run requests are pinned to agent-run:<run-id>."},"required":false,"name":"x-veryfront-billing-group-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"title":"NeutralEmbeddingsRequest","description":"OpenAI-compatible embeddings request; the response uses the OpenAI format.","type":"object","properties":{"model":{"type":"string","description":"Catalog model ID or alias. Required: the request is routed by model, not by base URL."},"input":{"description":"Vendor-shaped input, forwarded as sent."}},"required":["model","input"],"additionalProperties":true}}}},"responses":{"200":{"description":"Upstream provider response (forwarded as-is)"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralOpenAiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralOpenAiError"}}}},"402":{"description":"Insufficient AI credits, an exhausted monthly AI budget, or a provider spend limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralOpenAiError"}}}},"403":{"description":"Project access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralOpenAiError"}}}},"404":{"description":"No deployment of this model speaks this protocol natively","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralOpenAiError"}}}},"413":{"description":"Request body over the 32 MiB limit (code request_too_large), or an upstream 413 re-rendered in this envelope"},"429":{"description":"The calling API key's requests-per-minute limit (code key-rate-limited), or an upstream provider rate limit re-rendered in this envelope with its Retry-After"},"500":{"description":"Gateway error, or an upstream 500 re-rendered in this envelope"},"502":{"description":"Gateway proxy error, or an upstream 502 re-rendered in this envelope"},"503":{"description":"No available deployment, auth unavailable, or an upstream 503 re-rendered in this envelope"},"529":{"description":"Upstream provider overloaded, re-rendered in this envelope"},"default":{"description":"Any other status the upstream provider returned, with the upstream status and its body (if any) re-rendered in this envelope"}},"x-documentation-source-tag":"Embeddings","x-canonical-documentation":{"domain":"ai-gateway","resource":"Inference","subgroup":"Embeddings","name":"Create embeddings","description":"Create embeddings.","operationId":"neutralEmbeddings"}}},"/ai/v1/responses":{"post":{"operationId":"neutralResponses","tags":["ai-gateway/Inference/OpenAI Responses"],"summary":"Create response","description":"Create response.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Canonical project selector: a UUID or slug for model access, inference and billing context. A signed project scope takes precedence. Otherwise, send only one project selector header."},"required":false,"name":"x-veryfront-project-reference","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Compatibility selector accepting a project UUID. Prefer x-veryfront-project-reference."},"required":false,"name":"x-veryfront-project-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Compatibility selector accepting a project slug. Prefer x-veryfront-project-reference."},"required":false,"name":"x-veryfront-project-slug","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":245,"description":"Durable run ID. Required for run-bound service-account credentials."},"required":false,"name":"x-veryfront-agent-run-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Durable conversation ID. Required with agent run attribution."},"required":false,"name":"x-veryfront-conversation-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Durable message ID. Required with agent run attribution."},"required":false,"name":"x-veryfront-message-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Agent ID. Must match the authenticated run-bound credential."},"required":false,"name":"x-veryfront-agent-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Optional billing group. Run requests are pinned to agent-run:<run-id>."},"required":false,"name":"x-veryfront-billing-group-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"title":"NeutralResponsesRequest","description":"OpenAI-compatible Responses API request.","type":"object","properties":{"model":{"type":"string","description":"Catalog model ID or alias. Required: the request is routed by model, not by base URL."},"input":{"description":"Vendor-shaped input, forwarded as sent."}},"required":["model"],"additionalProperties":true}}}},"responses":{"200":{"description":"Upstream provider response (forwarded as-is)"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralOpenAiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralOpenAiError"}}}},"402":{"description":"Insufficient AI credits, an exhausted monthly AI budget, or a provider spend limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralOpenAiError"}}}},"403":{"description":"Project access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralOpenAiError"}}}},"404":{"description":"No deployment of this model speaks this protocol natively","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralOpenAiError"}}}},"413":{"description":"Request body over the 32 MiB limit (code request_too_large), or an upstream 413 re-rendered in this envelope"},"429":{"description":"The calling API key's requests-per-minute limit (code key-rate-limited), or an upstream provider rate limit re-rendered in this envelope with its Retry-After"},"500":{"description":"Gateway error, or an upstream 500 re-rendered in this envelope"},"502":{"description":"Gateway proxy error, or an upstream 502 re-rendered in this envelope"},"503":{"description":"No available deployment, auth unavailable, or an upstream 503 re-rendered in this envelope"},"529":{"description":"Upstream provider overloaded, re-rendered in this envelope"},"default":{"description":"Any other status the upstream provider returned, with the upstream status and its body (if any) re-rendered in this envelope"}},"x-documentation-source-tag":"OpenAI Responses","x-canonical-documentation":{"domain":"ai-gateway","resource":"Inference","subgroup":"OpenAI Responses","name":"Create response","description":"Create response.","operationId":"neutralResponses"}}},"/projects/-/proxy-access/{lookup_key}":{"get":{"operationId":"getProjectProxyAccess","tags":["ai-gateway/Inference/Proxy metadata"],"summary":"Get proxy access metadata","description":"Get proxy access metadata.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project slug, project ID, or environment domain.","example":"my-project"},"required":true,"description":"Project slug, project ID, or environment domain.","name":"lookup_key","in":"path"},{"schema":{"type":"string","enum":["true","false"],"description":"Include the project members."},"required":false,"description":"Include the project members.","name":"include_users","in":"query"}],"responses":{"200":{"description":"Fresh protection and membership metadata for proxy authorization checks. Do not cache.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Project ID."},"slug":{"type":"string","description":"Project slug."},"environments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Environment ID."},"name":{"type":"string","description":"Environment name."},"domains":{"type":"array","items":{"type":"string"},"description":"Domains served by the environment."},"protected":{"type":"boolean","description":"Whether the environment is protected."}},"required":["id","name","domains","protected"]},"description":"Environments and their protection state."},"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"User ID."}},"required":["id"]},"description":"Project members. Present only when include_users is true."}},"required":["id","slug","environments"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Proxy metadata","x-canonical-documentation":{"domain":"ai-gateway","resource":"Inference","subgroup":"Proxy metadata","name":"Get proxy access metadata","description":"Get proxy access metadata.","operationId":"getProjectProxyAccess"}}},"/projects/-/proxy-routing/{lookup_key}":{"get":{"operationId":"getProjectProxyRouting","tags":["ai-gateway/Inference/Proxy metadata"],"summary":"Get proxy routing metadata","description":"Get proxy routing metadata.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project slug, project ID, or environment domain.","example":"my-project"},"required":true,"description":"Project slug, project ID, or environment domain.","name":"lookup_key","in":"path"}],"responses":{"200":{"description":"Cacheable project routing metadata for proxy requests. Excludes protection state and users.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Project ID."},"slug":{"type":"string","description":"Project slug."},"name":{"type":"string","description":"Project name."},"environments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Environment ID."},"name":{"type":"string","description":"Environment name."},"domains":{"type":"array","items":{"type":"string"},"description":"Domains served by the environment."},"active_release_id":{"type":["string","null"],"description":"Release the environment serves, or null."}},"required":["id","name","domains","active_release_id"]},"description":"Environments and the release each one serves."}},"required":["id","slug","name","environments"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Proxy metadata","x-canonical-documentation":{"domain":"ai-gateway","resource":"Inference","subgroup":"Proxy metadata","name":"Get proxy routing metadata","description":"Get proxy routing metadata.","operationId":"getProjectProxyRouting"}}},"/internal/application-agui-inference/admissions":{"post":{"operationId":"admitInternalApplicationAguiInference","tags":["ai-gateway/Inference/Application Inference"],"security":[{"hostBasicAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","format":"uuid"},"projectSlug":{"type":"string","minLength":1,"maxLength":255},"environmentName":{"type":"string","minLength":1,"maxLength":255},"releaseId":{"type":"string","format":"uuid"},"routePath":{"type":"string","maxLength":2048},"requestId":{"type":"string","minLength":1,"maxLength":255},"agentId":{"type":"string","minLength":1,"maxLength":255},"inferencePublicKey":{"type":"string","minLength":60,"maxLength":60,"pattern":"^[A-Za-z0-9+/]+={0,2}$"}},"required":["projectId","projectSlug","environmentName","releaseId","routePath","requestId","agentId","inferencePublicKey"],"additionalProperties":false}}}},"responses":{"200":{"description":"Private run-bound inference admission","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string","format":"uuid"},"expiresAt":{"type":"string","format":"date-time"},"encryptedInferenceToken":{"type":"object","properties":{"ephemeralPublicKey":{"type":"string","minLength":1},"iv":{"type":"string","minLength":1},"tag":{"type":"string","minLength":1},"ciphertext":{"type":"string","minLength":1}},"required":["ephemeralPublicKey","iv","tag","ciphertext"],"additionalProperties":false}},"required":["runId","expiresAt","encryptedInferenceToken"],"additionalProperties":false}}}},"400":{"description":"Redacted application inference refusal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid internal host Basic credentials","headers":{"WWW-Authenticate":{"schema":{"type":"string","enum":["Basic realm=\"Fluent Bit Log Ingestion\""]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Authentication required","Invalid credentials"]},"code":{"type":"string","enum":["BASIC_AUTH_MISSING","BASIC_AUTH_INVALID"]}},"required":["error","code"],"additionalProperties":false}}}},"402":{"description":"Redacted application inference refusal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Redacted application inference refusal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Redacted application inference refusal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Redacted application inference conflict","headers":{"Retry-After":{"description":"Seconds before retrying an in-progress admission conflict","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Request body exceeds the maximum allowed size","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Redacted application inference refusal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Redacted application inference refusal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Redacted application inference refusal or shutdown notice","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}},"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Service Unavailable"]},"message":{"type":"string","enum":["Server is shutting down"]}},"required":["error","message"],"additionalProperties":false}}}}},"x-audience":"component-internal","summary":"Admit application inference run","description":"Admit a private application AG-UI inference run and return its inference token, sealed to the host key.","x-documentation-source-tag":"Application Inference","x-canonical-documentation":{"domain":"ai-gateway","resource":"Inference","subgroup":"Application Inference","name":"Admit application inference run","description":"Admit a private application AG-UI inference run and return its inference token, sealed to the host key.","operationId":"admitInternalApplicationAguiInference"}}},"/internal/application-agui-inference/runs/{runId}/finalize":{"post":{"operationId":"finalizeInternalApplicationAguiInference","tags":["ai-gateway/Inference/Application Inference"],"security":[{"hostBasicAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"runId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["completed","failed","cancelled"]},"errorCode":{"type":"string","pattern":"^[A-Z0-9_]{1,64}$"},"inferenceToken":{"type":"string","minLength":1,"maxLength":16384}},"required":["status","inferenceToken"],"additionalProperties":false}}}},"responses":{"200":{"description":"Application inference run finalized","content":{"application/json":{"schema":{"type":"object","properties":{"finalized":{"type":"boolean","enum":[true]}},"required":["finalized"],"additionalProperties":false}}}},"400":{"description":"Redacted application inference refusal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid internal host Basic credentials","headers":{"WWW-Authenticate":{"schema":{"type":"string","enum":["Basic realm=\"Fluent Bit Log Ingestion\""]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Authentication required","Invalid credentials"]},"code":{"type":"string","enum":["BASIC_AUTH_MISSING","BASIC_AUTH_INVALID"]}},"required":["error","code"],"additionalProperties":false}}}},"402":{"description":"Redacted application inference refusal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Redacted application inference refusal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Redacted application inference refusal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Redacted application inference conflict","headers":{"Retry-After":{"description":"Seconds before retrying an in-progress admission conflict","schema":{"type":"integer","minimum":1}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Request body exceeds the maximum allowed size","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Redacted application inference refusal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Redacted application inference refusal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Redacted application inference refusal or shutdown notice","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}},"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["Service Unavailable"]},"message":{"type":"string","enum":["Server is shutting down"]}},"required":["error","message"],"additionalProperties":false}}}}},"x-audience":"component-internal","summary":"Finalize application inference run","description":"Record the terminal status of a private application AG-UI inference run.","x-documentation-source-tag":"Application Inference","x-canonical-documentation":{"domain":"ai-gateway","resource":"Inference","subgroup":"Application Inference","name":"Finalize application inference run","description":"Record the terminal status of a private application AG-UI inference run.","operationId":"finalizeInternalApplicationAguiInference"}}},"/ai/v1/messages/count_tokens":{"post":{"operationId":"neutralCountTokens","tags":["ai-gateway/Inference/Anthropic Messages"],"summary":"Count input tokens","description":"Count input tokens for a supported Anthropic deployment without generating content or charging credits.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Canonical project selector: a UUID or slug for model access, inference and billing context. A signed project scope takes precedence. Otherwise, send only one project selector header."},"required":false,"name":"x-veryfront-project-reference","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Compatibility selector accepting a project UUID. Prefer x-veryfront-project-reference."},"required":false,"name":"x-veryfront-project-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Compatibility selector accepting a project slug. Prefer x-veryfront-project-reference."},"required":false,"name":"x-veryfront-project-slug","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":245,"description":"Durable run ID. Required for run-bound service-account credentials."},"required":false,"name":"x-veryfront-agent-run-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Durable conversation ID. Required with agent run attribution."},"required":false,"name":"x-veryfront-conversation-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Durable message ID. Required with agent run attribution."},"required":false,"name":"x-veryfront-message-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Agent ID. Must match the authenticated run-bound credential."},"required":false,"name":"x-veryfront-agent-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Optional billing group. Run requests are pinned to agent-run:<run-id>."},"required":false,"name":"x-veryfront-billing-group-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"title":"NeutralAnthropicCountTokensRequest","description":"Anthropic-compatible input-token count request. Requires a permitted deployment that serves count-tokens. Unsupported model deployments return a typed 404; counting performs no generation or credit charge.","type":"object","properties":{"model":{"type":"string","description":"Catalog model ID or alias. Required: the request is routed by model, not by base URL."},"messages":{"type":"array","items":{},"description":"Vendor-shaped messages, forwarded as sent."}},"required":["model","messages"],"additionalProperties":true}}}},"responses":{"200":{"description":"Input-token count for the permitted deployment; no generation or credit charge.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicTokenCountResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralAnthropicError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralAnthropicError"}}}},"402":{"description":"Insufficient AI credits, an exhausted monthly AI budget, or a provider spend limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralAnthropicError"}}}},"403":{"description":"Project access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralAnthropicError"}}}},"404":{"description":"The selected model has no permitted token-counting deployment. Clients may fall back to a character estimate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralAnthropicError"}}}},"413":{"description":"Request body over the 32 MiB limit (code request_too_large), or an upstream 413 re-rendered in this envelope"},"429":{"description":"Optional API-key limits or mandatory token-count user, originating-key, project or platform request/attempt quotas were exceeded. Gateway refusals include Retry-After; upstream 429s retain any provider retry headers."},"500":{"description":"Gateway error, or an upstream 500 re-rendered in this envelope"},"502":{"description":"Gateway proxy error, or an upstream 502 re-rendered in this envelope"},"503":{"description":"No available deployment, auth unavailable, or an upstream 503 re-rendered in this envelope"},"529":{"description":"Upstream provider overloaded, re-rendered in this envelope"},"default":{"description":"Any other status the upstream provider returned, with the upstream status and its body (if any) re-rendered in this envelope"}},"x-documentation-source-tag":"Anthropic Messages","x-canonical-documentation":{"domain":"ai-gateway","resource":"Inference","subgroup":"Anthropic Messages","name":"Count input tokens","description":"Count input tokens for a supported Anthropic deployment without generating content or charging credits.","operationId":"neutralCountTokens"}}},"/ai/v1/messages":{"post":{"operationId":"neutralMessages","tags":["ai-gateway/Inference/Anthropic Messages"],"summary":"Create message","description":"Create message.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Canonical project selector: a UUID or slug for model access, inference and billing context. A signed project scope takes precedence. Otherwise, send only one project selector header."},"required":false,"name":"x-veryfront-project-reference","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Compatibility selector accepting a project UUID. Prefer x-veryfront-project-reference."},"required":false,"name":"x-veryfront-project-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Compatibility selector accepting a project slug. Prefer x-veryfront-project-reference."},"required":false,"name":"x-veryfront-project-slug","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":245,"description":"Durable run ID. Required for run-bound service-account credentials."},"required":false,"name":"x-veryfront-agent-run-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Durable conversation ID. Required with agent run attribution."},"required":false,"name":"x-veryfront-conversation-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Durable message ID. Required with agent run attribution."},"required":false,"name":"x-veryfront-message-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Agent ID. Must match the authenticated run-bound credential."},"required":false,"name":"x-veryfront-agent-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Optional billing group. Run requests are pinned to agent-run:<run-id>."},"required":false,"name":"x-veryfront-billing-group-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"title":"NeutralAnthropicMessagesRequest","description":"Anthropic-compatible Messages request on the vendor-neutral base URL. Set an Anthropic SDK or Claude Code base URL (`ANTHROPIC_BASE_URL`) to `https://api.<domain>/ai`.","type":"object","properties":{"model":{"type":"string","description":"Catalog model ID or alias. Required: the request is routed by model, not by base URL."},"messages":{"type":"array","items":{},"description":"Vendor-shaped messages, forwarded as sent."},"max_tokens":{"type":"integer","minimum":1}},"required":["model","messages","max_tokens"],"additionalProperties":true}}}},"responses":{"200":{"description":"Upstream provider response (forwarded as-is)"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralAnthropicError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralAnthropicError"}}}},"402":{"description":"Insufficient AI credits, an exhausted monthly AI budget, or a provider spend limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralAnthropicError"}}}},"403":{"description":"Project access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralAnthropicError"}}}},"404":{"description":"No deployment of this model speaks this protocol natively","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralAnthropicError"}}}},"413":{"description":"Request body over the 32 MiB limit (code request_too_large), or an upstream 413 re-rendered in this envelope"},"429":{"description":"The calling API key's requests-per-minute limit (code key-rate-limited), or an upstream provider rate limit re-rendered in this envelope with its Retry-After"},"500":{"description":"Gateway error, or an upstream 500 re-rendered in this envelope"},"502":{"description":"Gateway proxy error, or an upstream 502 re-rendered in this envelope"},"503":{"description":"No available deployment, auth unavailable, or an upstream 503 re-rendered in this envelope"},"529":{"description":"Upstream provider overloaded, re-rendered in this envelope"},"default":{"description":"Any other status the upstream provider returned, with the upstream status and its body (if any) re-rendered in this envelope"}},"x-documentation-source-tag":"Anthropic Messages","x-canonical-documentation":{"domain":"ai-gateway","resource":"Inference","subgroup":"Anthropic Messages","name":"Create message","description":"Create message.","operationId":"neutralMessages"}}},"/ai/gateway/billing/finalize":{"post":{"summary":"Finalize gateway billing group","description":"Finalize gateway billing group.","operationId":"finalizeGatewayBillingGroup","tags":["ai-gateway/Inference/Provider gateway"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Canonical project selector: a UUID or slug for model access, inference and billing context. A signed project scope takes precedence. Otherwise, send only one project selector header."},"required":false,"name":"x-veryfront-project-reference","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Compatibility selector accepting a project UUID. Prefer x-veryfront-project-reference."},"required":false,"name":"x-veryfront-project-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Compatibility selector accepting a project slug. Prefer x-veryfront-project-reference."},"required":false,"name":"x-veryfront-project-slug","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayBillingGroupFinalizeRequest"}}}},"responses":{"200":{"description":"Direct gateway charges for the user-facing billing group, reconciled from server-recorded usage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayBillingGroupFinalizeResponse"}}}},"400":{"description":"Invalid billing group request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Insufficient AI credits for reconciliation","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/CreditProblem"}}}},"403":{"description":"Project access denied","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Billing group not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Billing group usage is not ready to finalize","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Provider gateway","x-canonical-documentation":{"domain":"ai-gateway","resource":"Inference","subgroup":"Provider gateway","name":"Finalize gateway billing group","description":"Finalize gateway billing group.","operationId":"finalizeGatewayBillingGroup"}}},"/ai/v1beta/models/{model_method}":{"post":{"operationId":"neutralGoogleModelMethod","tags":["ai-gateway/Inference/Gemini inference"],"summary":"Call Gemini model method","description":"Call Gemini model method.","parameters":[{"schema":{"type":"string","description":"The model and the Gemini method, `<model>:<method>`, on the vendor-neutral base URL `/ai/v1beta`, served through the same gateway pipeline as the vendor route. The model is a catalog id or alias (`gemini-2.5-flash`, `google/gemini-2.5-flash`) and selects the deployment; the method is `generateContent`, `streamGenerateContent`, `embedContent` or `batchEmbedContents`. `streamGenerateContent` streams and honours `?alt=sse`.","example":"gemini-2.5-flash:generateContent"},"required":true,"name":"model_method","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Canonical project selector: a UUID or slug for model access, inference and billing context. A signed project scope takes precedence. Otherwise, send only one project selector header."},"required":false,"name":"x-veryfront-project-reference","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Compatibility selector accepting a project UUID. Prefer x-veryfront-project-reference."},"required":false,"name":"x-veryfront-project-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Compatibility selector accepting a project slug. Prefer x-veryfront-project-reference."},"required":false,"name":"x-veryfront-project-slug","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":245,"description":"Durable run ID. Required for run-bound service-account credentials."},"required":false,"name":"x-veryfront-agent-run-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Durable conversation ID. Required with agent run attribution."},"required":false,"name":"x-veryfront-conversation-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Durable message ID. Required with agent run attribution."},"required":false,"name":"x-veryfront-message-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Agent ID. Must match the authenticated run-bound credential."},"required":false,"name":"x-veryfront-agent-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Optional billing group. Run requests are pinned to agent-run:<run-id>."},"required":false,"name":"x-veryfront-billing-group-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"title":"NeutralGoogleRequest","type":"object","description":"Gemini-native request body (`contents` for generateContent, `content` for embedContent, `requests` for batchEmbedContents), forwarded as sent.","additionalProperties":true}}}},"responses":{"200":{"description":"Upstream provider response (forwarded as-is)"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralGoogleError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralGoogleError"}}}},"402":{"description":"Insufficient AI credits, an exhausted monthly AI budget, or a provider spend limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralGoogleError"}}}},"403":{"description":"Project access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralGoogleError"}}}},"404":{"description":"No deployment of this model speaks this protocol natively","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralGoogleError"}}}},"413":{"description":"Request body over the 32 MiB limit (code request_too_large), or an upstream 413 re-rendered in this envelope"},"429":{"description":"The calling API key's requests-per-minute limit (code key-rate-limited), or an upstream provider rate limit re-rendered in this envelope with its Retry-After"},"500":{"description":"Gateway error, or an upstream 500 re-rendered in this envelope"},"502":{"description":"Gateway proxy error, or an upstream 502 re-rendered in this envelope"},"503":{"description":"No available deployment, auth unavailable, or an upstream 503 re-rendered in this envelope"},"529":{"description":"Upstream provider overloaded, re-rendered in this envelope"},"default":{"description":"Any other status the upstream provider returned, with the upstream status and its body (if any) re-rendered in this envelope"}},"x-documentation-source-tag":"Gemini Models","x-canonical-documentation":{"domain":"ai-gateway","resource":"Inference","subgroup":"Gemini inference","name":"Call Gemini model method","description":"Call Gemini model method.","operationId":"neutralGoogleModelMethod"}}},"/ai/v1beta/models/{vendor}/{model_method}":{"post":{"operationId":"neutralGooglePrefixedModelMethod","tags":["ai-gateway/Inference/Gemini inference"],"summary":"Call prefixed Gemini model method","description":"Call prefixed Gemini model method.","parameters":[{"schema":{"type":"string","description":"The vendor prefix of the model id: `google` or `google-ai-studio`, as in `models/google/gemini-2.5-flash:generateContent`.","example":"google"},"required":true,"name":"vendor","in":"path"},{"schema":{"type":"string","description":"The model and the Gemini method, `<model>:<method>`, on the vendor-neutral base URL `/ai/v1beta`, served through the same gateway pipeline as the vendor route. The model is a catalog id or alias (`gemini-2.5-flash`, `google/gemini-2.5-flash`) and selects the deployment; the method is `generateContent`, `streamGenerateContent`, `embedContent` or `batchEmbedContents`. `streamGenerateContent` streams and honours `?alt=sse`.","example":"gemini-2.5-flash:generateContent"},"required":true,"name":"model_method","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Canonical project selector: a UUID or slug for model access, inference and billing context. A signed project scope takes precedence. Otherwise, send only one project selector header."},"required":false,"name":"x-veryfront-project-reference","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Compatibility selector accepting a project UUID. Prefer x-veryfront-project-reference."},"required":false,"name":"x-veryfront-project-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Compatibility selector accepting a project slug. Prefer x-veryfront-project-reference."},"required":false,"name":"x-veryfront-project-slug","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":245,"description":"Durable run ID. Required for run-bound service-account credentials."},"required":false,"name":"x-veryfront-agent-run-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Durable conversation ID. Required with agent run attribution."},"required":false,"name":"x-veryfront-conversation-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Durable message ID. Required with agent run attribution."},"required":false,"name":"x-veryfront-message-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Agent ID. Must match the authenticated run-bound credential."},"required":false,"name":"x-veryfront-agent-id","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Optional billing group. Run requests are pinned to agent-run:<run-id>."},"required":false,"name":"x-veryfront-billing-group-id","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"title":"NeutralGoogleRequest","type":"object","description":"Gemini-native request body (`contents` for generateContent, `content` for embedContent, `requests` for batchEmbedContents), forwarded as sent.","additionalProperties":true}}}},"responses":{"200":{"description":"Upstream provider response (forwarded as-is)"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralGoogleError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralGoogleError"}}}},"402":{"description":"Insufficient AI credits, an exhausted monthly AI budget, or a provider spend limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralGoogleError"}}}},"403":{"description":"Project access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralGoogleError"}}}},"404":{"description":"No deployment of this model speaks this protocol natively","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NeutralGoogleError"}}}},"413":{"description":"Request body over the 32 MiB limit (code request_too_large), or an upstream 413 re-rendered in this envelope"},"429":{"description":"The calling API key's requests-per-minute limit (code key-rate-limited), or an upstream provider rate limit re-rendered in this envelope with its Retry-After"},"500":{"description":"Gateway error, or an upstream 500 re-rendered in this envelope"},"502":{"description":"Gateway proxy error, or an upstream 502 re-rendered in this envelope"},"503":{"description":"No available deployment, auth unavailable, or an upstream 503 re-rendered in this envelope"},"529":{"description":"Upstream provider overloaded, re-rendered in this envelope"},"default":{"description":"Any other status the upstream provider returned, with the upstream status and its body (if any) re-rendered in this envelope"}},"x-documentation-source-tag":"Gemini Models","x-canonical-documentation":{"domain":"ai-gateway","resource":"Inference","subgroup":"Gemini inference","name":"Call prefixed Gemini model method","description":"Call prefixed Gemini model method.","operationId":"neutralGooglePrefixedModelMethod"}}},"/projects/{project_reference}/image-generations":{"post":{"operationId":"createImageGeneration","tags":["ai-gateway/Inference/Image generation"],"security":[{"bearerAuth":[]}],"summary":"Create image generation","description":"Generate 1 to 10 images from a text prompt with the EU image model and return their URLs; every image is billed in credits. Requires project.files.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":1000,"description":"Text description of the desired image (max 1000 characters)"},"count":{"type":"integer","minimum":1,"maximum":10,"default":1,"description":"Number of images to generate (1-10, default: 1)"},"seed":{"type":"integer","minimum":1,"maximum":999999,"description":"Random seed for reproducible generation"}},"required":["prompt"]},"example":{"prompt":"A futuristic cityscape at sunset with flying cars","count":2}}}},"responses":{"200":{"description":"Images are generated by the EU Azure FLUX.2-pro deployment and stored as project uploads. Returned as API upload URLs.","content":{"application/json":{"schema":{"type":"object","properties":{"requested_count":{"type":"integer","minimum":1,"maximum":10,"description":"Number of requested image slots, including failed and skipped items."},"generated_count":{"type":"integer","minimum":1,"maximum":10,"description":"Images successfully generated and stored."},"failed_count":{"type":"integer","minimum":0,"description":"Items that failed, including admission refusals before provider work; not a count of billable calls."},"skipped_count":{"type":"integer","minimum":0,"description":"Items not attempted because an earlier refusal or configuration failure stopped the batch."},"results":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9,"description":"Zero-based position in the requested batch."},"outcome":{"type":"string","enum":["generated"]},"url":{"type":"string","minLength":1},"upload_id":{"type":["string","null"],"description":"Owned upload ID when this surface creates one; null for legacy CDN assets."},"error":{"type":"null"}},"required":["index","outcome","url","upload_id","error"]},{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9,"description":"Zero-based position in the requested batch."},"outcome":{"type":"string","enum":["failed"]},"url":{"type":"null"},"upload_id":{"type":"null"},"error":{"type":"object","properties":{"code":{"type":"string","enum":["generation-failed","storage-failed","insufficient-credits","provider-spend-limit","provider-spend-unavailable","batch-stopped","not-configured"]}},"required":["code"],"description":"Safe failure classification; never contains raw provider or storage errors."}},"required":["index","outcome","url","upload_id","error"]},{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9,"description":"Zero-based position in the requested batch."},"outcome":{"type":"string","enum":["skipped"]},"url":{"type":"null"},"upload_id":{"type":"null"},"error":{"type":"object","properties":{"code":{"type":"string","enum":["batch-stopped"]}},"required":["code"]}},"required":["index","outcome","url","upload_id","error"]}],"description":"One outcome per requested image, in request order. Skipped items were not attempted."},"minItems":1,"maxItems":10}},"required":["requested_count","generated_count","failed_count","skipped_count","results"],"description":"A batch with at least one stored image. requested_count equals generated_count + failed_count + skipped_count. A batch with no stored images remains an error."}}}},"400":{"description":"Invalid input - prompt too long or invalid count","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Payment required - not enough credits for the first image","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden - insufficient permissions","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error - Image generation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service unavailable - Image generation not configured, the AI provider spend limit is reached, provider spend cannot be verified, or no image was produced","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Image generation","x-canonical-documentation":{"domain":"ai-gateway","resource":"Inference","subgroup":"Image generation","name":"Create image generation","description":"Generate 1 to 10 images from a text prompt with the EU image model and return their URLs; every image is billed in credits. Requires project.files.write.","operationId":"createImageGeneration"}}},"/accounts/{account_id}/usage/models":{"get":{"operationId":"getAccountModelUsage","tags":["ai-gateway/Model usage/Model usage"],"summary":"Get account model usage","description":"Read recorded model calls and tokens for an account. Requires account.billing.read.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"},{"$ref":"#/components/parameters/UsageQueryPreset"},{"$ref":"#/components/parameters/UsageQueryFrom"},{"$ref":"#/components/parameters/UsageQueryTo"},{"$ref":"#/components/parameters/UsageQueryTimezone"},{"$ref":"#/components/parameters/UsageQueryGranularity"},{"$ref":"#/components/parameters/UsageQueryGroupBy"},{"$ref":"#/components/parameters/UsageQueryCompare"},{"schema":{"type":"string","format":"uuid","description":"Filter to calls with this recorded actor user ID."},"required":false,"description":"Filter to calls with this recorded actor user ID.","name":"member_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Project UUID or slug within the selected account."},"required":false,"description":"Project UUID or slug within the selected account.","name":"project_reference","in":"query"}],"responses":{"200":{"description":"Recorded account model usage.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelUsageReport"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Model usage","x-canonical-documentation":{"domain":"ai-gateway","resource":"Model usage","subgroup":"Model usage","name":"Get account model usage","description":"Read recorded model calls and tokens for an account. Requires account.billing.read.","operationId":"getAccountModelUsage"}}},"/projects/{project_reference}/usage/models":{"get":{"operationId":"getProjectModelUsage","tags":["ai-gateway/Model usage/Model usage"],"summary":"Get project model usage","description":"Read recorded model calls and tokens for a project.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"$ref":"#/components/parameters/UsageQueryPreset"},{"$ref":"#/components/parameters/UsageQueryFrom"},{"$ref":"#/components/parameters/UsageQueryTo"},{"$ref":"#/components/parameters/UsageQueryTimezone"},{"$ref":"#/components/parameters/UsageQueryGranularity"},{"$ref":"#/components/parameters/UsageQueryGroupBy"},{"$ref":"#/components/parameters/UsageQueryCompare"},{"schema":{"type":"string","format":"uuid","description":"Filter to calls with this recorded actor user ID."},"required":false,"description":"Filter to calls with this recorded actor user ID.","name":"member_id","in":"query"}],"responses":{"200":{"description":"Recorded project model usage.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelUsageReport"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Model usage","x-canonical-documentation":{"domain":"ai-gateway","resource":"Model usage","subgroup":"Model usage","name":"Get project model usage","description":"Read recorded model calls and tokens for a project.","operationId":"getProjectModelUsage"}}},"/mcp/tools":{"get":{"operationId":"listPublicMcpTools","tags":["mcp/Tools/MCP discovery"],"summary":"List public MCP tools","description":"List public MCP tools.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":50,"description":"Maximum number of tools to return, 1 to 50. Setting it returns a page; the page size defaults to 20."},"required":false,"description":"Maximum number of tools to return, 1 to 50. Setting it returns a page; the page size defaults to 20.","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":512,"description":"Opaque cursor from page_info.next of the previous page. Omit it to read the first page."},"required":false,"description":"Opaque cursor from page_info.next of the previous page. Omit it to read the first page.","name":"cursor","in":"query"},{"schema":{"type":"string","enum":["platform","integration"],"description":"Only return tools of this type."},"required":false,"description":"Only return tools of this type.","name":"type","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":120,"description":"Only return tools in this category."},"required":false,"description":"Only return tools in this category.","name":"category","in":"query"}],"responses":{"200":{"description":"Public MCP tool summaries for anonymous browsing","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"legacyName":{"type":"string","description":"Previously saved platform selector retained as migration metadata."},"canonicalName":{"type":"string","description":"Canonical tool identity used for calls and agent tool_ids."},"type":{"type":"string","enum":["platform","integration","project"]},"category":{"type":"string"},"description":{"type":"string"},"search_description":{"type":"string","description":"Source schema guidance for tool search."},"availability":{"type":"object","properties":{"kind":{"type":"string","enum":["always_available","requires_project_integration","requires_user_connection"]},"integration":{"type":"string"}},"required":["kind"]},"riskLevel":{"type":"string","enum":["read_only","mutating","credential_bearing"]},"href":{"type":"string"},"hasOutputSchema":{"type":"boolean"},"attachVia":{"type":["string","null"],"enum":["tool_ids",null]}},"required":["name","canonicalName","type","category","description","availability","riskLevel","href","hasOutputSchema","attachVia"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"},"generatedAt":{"type":"string","description":"When the catalog was generated, as an ISO 8601 timestamp."}},"required":["data","page_info","generatedAt"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"MCP discovery","x-canonical-documentation":{"domain":"mcp","resource":"Tools","subgroup":"MCP discovery","name":"List public MCP tools","description":"List public MCP tools.","operationId":"listPublicMcpTools"}}},"/mcp/tools/{tool_name}":{"get":{"operationId":"getPublicMcpTool","tags":["mcp/Tools/MCP discovery"],"security":[],"summary":"Get public MCP tool","description":"Get an MCP tool.","parameters":[{"schema":{"type":"string"},"required":true,"name":"tool_name","in":"path"}],"responses":{"200":{"description":"Public MCP metadata and schemas for one tool","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"name":{"type":"string"},"legacyName":{"type":"string","description":"Previously saved platform selector retained as migration metadata."},"canonicalName":{"type":"string","description":"Canonical tool identity used for calls and agent tool_ids."},"type":{"type":"string","enum":["platform","integration","project"]},"category":{"type":"string"},"description":{"type":"string"},"inputSchema":{},"outputSchema":{},"availability":{"type":"object","properties":{"kind":{"type":"string","enum":["always_available","requires_project_integration","requires_user_connection"]},"integration":{"type":"string"}},"required":["kind"]},"riskLevel":{"type":"string","enum":["read_only","mutating","credential_bearing"]}},"required":["name","canonicalName","type","category","description","availability","riskLevel"]},"generatedAt":{"type":"string"}},"required":["data","generatedAt"]}}}},"404":{"description":"MCP tool not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"MCP discovery","x-canonical-documentation":{"domain":"mcp","resource":"Tools","subgroup":"MCP discovery","name":"Get public MCP tool","description":"Get an MCP tool.","operationId":"getPublicMcpTool"}}},"/mcp/playground":{"get":{"operationId":"getMcpPlayground","tags":["mcp/Tools/MCP discovery"],"security":[],"summary":"Get MCP playground","description":"Open the MCP playground.","responses":{"200":{"description":"Browser-based MCP tool playground HTML.","content":{"text/html":{"schema":{"type":"string","description":"Browser-based MCP tool playground HTML."}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"MCP discovery","x-canonical-documentation":{"domain":"mcp","resource":"Tools","subgroup":"MCP discovery","name":"Get MCP playground","description":"Open the MCP playground.","operationId":"getMcpPlayground"}}},"/.well-known/oauth-protected-resource/projects/{project_reference}/mcp":{"get":{"security":[],"operationId":"getProjectMcpProtectedResourceMetadata","tags":["mcp/Authorization/Protected resource discovery"],"summary":"Discover MCP authorization","description":"Discover project MCP authorization.","parameters":[{"schema":{"type":"string","pattern":"^[a-zA-Z0-9-]+$"},"required":true,"name":"project_reference","in":"path"}],"responses":{"200":{"description":"OAuth protected resource metadata","content":{"application/json":{"schema":{"type":"object","properties":{"resource":{"type":"string","format":"uri"},"authorization_servers":{"type":"array","items":{"type":"string","format":"uri"}},"scopes_supported":{"type":"array","items":{"type":"string"}},"bearer_methods_supported":{"type":"array","items":{"type":"string"}}},"required":["resource","authorization_servers","scopes_supported","bearer_methods_supported"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"OAuth Metadata","x-canonical-documentation":{"domain":"mcp","resource":"Authorization","subgroup":"Protected resource discovery","name":"Discover MCP authorization","description":"Discover project MCP authorization.","operationId":"getProjectMcpProtectedResourceMetadata"}}},"/.well-known/oauth-protected-resource/mcp":{"get":{"security":[],"operationId":"getMcpProtectedResourceMetadata","tags":["mcp/Authorization/Protected resource discovery"],"summary":"Discover root MCP authorization","description":"Discover root MCP authorization.","responses":{"200":{"description":"OAuth protected resource metadata","content":{"application/json":{"schema":{"type":"object","properties":{"resource":{"type":"string","format":"uri"},"authorization_servers":{"type":"array","items":{"type":"string","format":"uri"}},"scopes_supported":{"type":"array","items":{"type":"string"}},"bearer_methods_supported":{"type":"array","items":{"type":"string"}}},"required":["resource","authorization_servers","scopes_supported","bearer_methods_supported"]}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"OAuth Metadata","x-canonical-documentation":{"domain":"mcp","resource":"Authorization","subgroup":"Protected resource discovery","name":"Discover root MCP authorization","description":"Discover root MCP authorization.","operationId":"getMcpProtectedResourceMetadata"}}},"/integration-tools":{"get":{"operationId":"listIntegrationTools","tags":["integrations/Integrations/Integration tools"],"summary":"List integration tools","description":"List the integration tools the caller can run in a project to discover tool names and input schemas before a run; returns the complete list in one response when no limit or cursor is sent, or one page with total and page information otherwise.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Opt in to paged results. Omit limit and cursor to retain the complete legacy list."},"required":false,"description":"Opt in to paged results. Omit limit and cursor to retain the complete legacy list.","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":4096,"description":"Opaque continuation from page_info. A cursor without limit uses 20 entries."},"required":false,"description":"Opaque continuation from page_info. A cursor without limit uses 20 entries.","name":"cursor","in":"query"},{"schema":{"type":"string","minLength":1,"pattern":"^[^\\s/]+$","description":"Integration name from the catalog","example":"github"},"required":false,"description":"Exact integration filter, applied before pagination. Must match the path on integration-scoped routes. Any discovery query selects canonical tool names qualified by integration; omitting all queries retains the complete legacy list, including bare mock tool IDs.","name":"integration","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":256,"description":"Case-sensitive substring filter on canonical tool names, applied before pagination."},"required":false,"description":"Case-sensitive substring filter on canonical tool names, applied before pagination.","name":"name","in":"query"},{"schema":{"type":"string","enum":["name"],"description":"Field to sort by: the canonical tool name. Sending it or sort_order sorts the tools; omitting both on legacy unpaged requests retains catalog order, and paging sorts by name."},"required":false,"description":"Field to sort by: the canonical tool name. Sending it or sort_order sorts the tools; omitting both on legacy unpaged requests retains catalog order, and paging sorts by name.","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"description":"Canonical tool-name order. Defaults to asc when the tools are sorted."},"required":false,"description":"Canonical tool-name order. Defaults to asc when the tools are sorted.","name":"sort_order","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Optional immutable project UUID precondition, compared case-insensitively after project resolution and authorization. It never selects a project. A mismatch fails with validation-failed before tool discovery or execution, including for project-bound callers. Send exactly one value.","example":"11111111-1111-4111-8111-111111111111"},"required":false,"name":"x-veryfront-expected-project-id","in":"header"},{"schema":{"type":"string","description":"Required for callers without a project-bound context. The slug is resolved and authorized before discovery or execution. A project-bound context takes precedence and ignores this header, including conflicting values.","example":"example-project"},"required":false,"name":"x-veryfront-project-slug","in":"header"}],"responses":{"200":{"description":"Available integration tools","headers":{"x-veryfront-tool-preconditions":{"description":"Supported tool-call preconditions. Clients requiring a connection generation must observe connection_generation_id before dispatch and on the call response.","schema":{"type":"string","enum":["project_id,connection_generation_id"]}},"x-veryfront-project-id":{"description":"Effective authorized project ID used for this request, regardless of the supplied slug.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Tool name in integration:tool-id format","example":"github__list-repos"},"description":{"type":"string","description":"Tool description"},"inputSchema":{"type":"object","additionalProperties":{},"description":"JSON Schema for tool input"}},"required":["name","description","inputSchema"]},"description":"Tools visible to the current user and project. Filters without pagination return every match."},"total":{"type":"integer","minimum":0},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["tools"]}}}},"400":{"description":"Invalid project selector or request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"forbidden: the credential is not bound to a project and lacks project.integrations.read on the project named by x-veryfront-project-slug.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"internal: discovery failed unexpectedly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"internal: the mock integration service did not return the tools of an integration in mock execution mode.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Integration tools","x-canonical-documentation":{"domain":"integrations","resource":"Integrations","subgroup":"Integration tools","name":"List integration tools","description":"List the integration tools the caller can run in a project to discover tool names and input schemas before a run; returns the complete list in one response when no limit or cursor is sent, or one page with total and page information otherwise.","operationId":"listIntegrationTools"}}},"/integration-tools/{tool_name}/run":{"post":{"operationId":"runIntegrationTool","tags":["integrations/Integrations/Integration tools"],"summary":"Run integration tool","description":"Run one integration tool synchronously by its qualified name, with provider arguments and an optional exact connection; returns the native tool result, where a provider failure or a refusal of the tool layer is a result with isError true, not an error.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[^\\s/]+$","description":"Qualified tool name, <integration>__<tool>.","example":"github__list-repos"},"required":true,"name":"tool_name","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Optional immutable project UUID precondition, compared case-insensitively after project resolution and authorization. It never selects a project. A mismatch fails with validation-failed before tool discovery or execution, including for project-bound callers. Send exactly one value.","example":"11111111-1111-4111-8111-111111111111"},"required":false,"name":"x-veryfront-expected-project-id","in":"header"},{"schema":{"type":"string","description":"Required for callers without a project-bound context. The slug is resolved and authorized before discovery or execution. A project-bound context takes precedence and ignores this header, including conflicting values.","example":"example-project"},"required":false,"name":"x-veryfront-project-slug","in":"header"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"arguments":{"type":"object","additionalProperties":{},"default":{},"description":"Tool arguments. Unknown top-level body fields are rejected, so provider arguments must be sent here."},"run_id":{"type":"string","description":"Agent run ID for validating run-declared integration tools"},"agent_id":{"type":"string","description":"Agent ID for validating run-declared integration tools"},"connection_id":{"type":"string","format":"uuid","description":"Optional exact connected account to use for this call"},"expected_connection_generation_id":{"type":"string","format":"uuid","description":"Require this observed generation of the selected connection. Requires connection_id; stale selections fail before credential or provider effects."}},"additionalProperties":false}}}},"responses":{"200":{"description":"The native tool result. A provider failure or a refusal of the tool layer is a result with isError true: a credential without the capability of the tool (project.integrations.read, or project.integrations.connect for a tool that writes) gets such a refusal.","headers":{"x-veryfront-tool-preconditions":{"description":"Supported tool-call preconditions. Clients requiring a connection generation must observe connection_generation_id before dispatch and on the call response.","schema":{"type":"string","enum":["project_id,connection_generation_id"]}},"x-veryfront-project-id":{"description":"Effective authorized project ID used for this request, regardless of the supplied slug.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"data":{"type":"string"},"mimeType":{"type":"string"}},"required":["type","data","mimeType"]},{"type":"object","properties":{"type":{"type":"string","enum":["audio"]},"data":{"type":"string"},"mimeType":{"type":"string"}},"required":["type","data","mimeType"]},{"type":"object","properties":{"type":{"type":"string","enum":["resource"]},"resource":{"anyOf":[{"type":"object","properties":{"uri":{"type":"string"},"mimeType":{"type":"string"},"text":{"type":"string"}},"required":["uri","text"]},{"type":"object","properties":{"uri":{"type":"string"},"mimeType":{"type":"string"},"blob":{"type":"string"}},"required":["uri","blob"]}]}},"required":["type","resource"]},{"type":"object","properties":{"type":{"type":"string","enum":["resource_link"]},"uri":{"type":"string"},"name":{"type":"string"}},"required":["type","uri","name"]}]}},"structuredContent":{"type":"object","additionalProperties":{}},"isError":{"type":"boolean"},"_meta":{"type":"object","additionalProperties":{}}}}}}},"400":{"description":"invalid_input: the body is malformed, carries an unknown top-level field or is not JSON, or the effective project does not match x-veryfront-expected-project-id.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"forbidden: the credential is not bound to a project and lacks project.integrations.read on the project named by x-veryfront-project-slug.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"not_found: the project is not accessible, the integration is unknown, or the integration has no such tool.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"integration-connection-stale: the expected connection generation was replaced; read the connection again","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"internal: the run failed unexpectedly. A provider failure is an isError result, not this error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"internal: the mock integration service did not answer the run of a tool in mock execution mode.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Integration tools","x-canonical-documentation":{"domain":"integrations","resource":"Integrations","subgroup":"Integration tools","name":"Run integration tool","description":"Run one integration tool synchronously by its qualified name, with provider arguments and an optional exact connection; returns the native tool result, where a provider failure or a refusal of the tool layer is a result with isError true, not an error.","operationId":"runIntegrationTool"}}},"/integrations":{"get":{"operationId":"listIntegrations","tags":["integrations/Integrations/Integration catalog"],"summary":"List integrations","description":"List the integrations.","parameters":[{"schema":{"type":"string","description":"Search query to filter integrations","example":"email"},"required":false,"name":"search","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Only integrations with one of these availabilities (default, experimental, host_adapter). Comma-separated and/or repeated; duplicates are ignored; at most 16 values.","example":"default"},"required":false,"name":"availability","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Only integrations with one of these authentication types (oauth2, oauth1, api-key, basic). Comma-separated and/or repeated; duplicates are ignored; at most 16 values.","example":"api-key,basic"},"required":false,"name":"auth_type","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Only integrations in one of these categories. Comma-separated and/or repeated; duplicates are ignored; at most 16 values. Integrations without a category match no value.","example":"communication"},"required":false,"name":"category","in":"query"},{"schema":{"type":"string","description":"Cursor.","example":"gmail"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"example":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["name"],"default":"name","description":"Sort by display name, with ties broken by integration name ascending."},"required":false,"name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"asc","description":"Sort order. Defaults to \"asc\"."},"required":false,"name":"sort_order","in":"query"}],"responses":{"200":{"description":"Paginated list of integrations","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Integration identifier","example":"gmail"},"display_name":{"type":"string","description":"Human-readable name","example":"Gmail"},"icon":{"type":"string","description":"Icon filename","example":"gmail.svg"},"icon_url":{"type":"string","format":"uri"},"description":{"type":"string","description":"Brief description","example":"Read and send emails via Gmail API"},"category":{"type":["string","null"],"description":"Connector category from the veryfront package, such as communication or development. Null when the package declares none.","example":"communication"},"availability":{"type":"string","enum":["default","experimental","host_adapter"],"description":"Why this deployment publishes the integration: default (supported everywhere), experimental (enabled by this deployment's experimental integrations setting; may be absent elsewhere) or host_adapter (an adapter-only connector this API drives with its own client).","example":"default"},"auth_type":{"type":"string","enum":["oauth2","oauth1","api-key","basic"],"description":"Authentication type","example":"oauth2"},"tool_count":{"type":"number","description":"Number of available tools","example":3},"prompt_count":{"type":"number","description":"Number of available prompts","example":2},"project_connections":{"type":"object","properties":{"connected":{"type":"integer","minimum":0},"expired":{"type":"integer","minimum":0},"disconnected":{"type":"integer","minimum":0}},"required":["connected","expired","disconnected"]},"project_user_connections":{"type":"object","properties":{"connected":{"type":"integer","minimum":0},"expired":{"type":"integer","minimum":0},"disconnected":{"type":"integer","minimum":0}},"required":["connected","expired","disconnected"]}},"required":["name","display_name","icon","description","category","availability","auth_type","tool_count","prompt_count","project_connections","project_user_connections"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"},"total":{"type":"number"}},"required":["data","page_info","total"]}}}},"400":{"description":"Invalid query parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Integration catalog","x-canonical-documentation":{"domain":"integrations","resource":"Integrations","subgroup":"Integration catalog","name":"List integrations","description":"List the integrations.","operationId":"listIntegrations"}}},"/integrations/{name}":{"get":{"operationId":"getIntegration","tags":["integrations/Integrations/Integration catalog"],"summary":"Get integration","description":"Return an integration.","parameters":[{"schema":{"type":"string","description":"Integration name","example":"gmail"},"required":true,"name":"name","in":"path"}],"responses":{"200":{"description":"Integration details","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"display_name":{"type":"string"},"icon":{"type":"string"},"icon_url":{"type":"string","format":"uri"},"description":{"type":"string"},"category":{"type":["string","null"],"description":"Connector category from the veryfront package, such as communication or development. Null when the package declares none.","example":"communication"},"availability":{"type":"string","enum":["default","experimental","host_adapter"],"description":"Why this deployment publishes the integration: default (supported everywhere), experimental (enabled by this deployment's experimental integrations setting; may be absent elsewhere) or host_adapter (an adapter-only connector this API drives with its own client).","example":"default"},"auth":{"type":"object","properties":{"type":{"type":"string","enum":["oauth2","oauth1","api-key","basic"]},"provider":{"type":"string"},"authorization_url":{"type":"string"},"token_url":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"optional_scopes":{"type":"array","items":{"type":"string"}},"callback_path":{"type":"string"},"required_apis":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"enable_url":{"type":"string"}},"required":["name","enable_url"]}}},"required":["type"]},"credential_env_var_names":{"type":"array","items":{"type":"string"},"description":"Environment variable names for the integration’s credentials. Empty if none are configured.","example":["VERCEL_TOKEN"]},"credential_requirement":{"type":"object","properties":{"mode":{"type":"string","enum":["oauth_connection","project_credentials","none"]},"managed_oauth":{"type":"boolean"},"byo_oauth_app_override":{"type":"object","properties":{"supported":{"type":"boolean"},"required":{"type":"boolean"},"client_id_env_var":{"type":["string","null"]},"client_secret_env_var":{"type":["string","null"]}},"required":["supported","required","client_id_env_var","client_secret_env_var"]},"mandatory_env_vars":{"type":"array","items":{"type":"string"}}},"required":["mode","managed_oauth","byo_oauth_app_override","mandatory_env_vars"]},"env_vars":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"required":{"type":"boolean"},"sensitive":{"type":"boolean"},"default":{"type":"string"},"docs_url":{"type":"string"}},"required":["name","description","required","sensitive"]}},"tools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"requires_write":{"type":"boolean","description":"Whether write authority is required. Unknown side effects require write authority."},"input_schema":{"type":"object","additionalProperties":{},"description":"JSON Schema of the tool input. Omitted when the catalog tool is not callable."}},"required":["id","name","description","requires_write"]}},"prompts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"prompt":{"type":"string"},"category":{"type":"string"},"icon":{"type":"string"}},"required":["id","title","prompt","category","icon"]}},"suggested_with":{"type":"array","items":{"type":"string"}},"config_schema":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string","enum":["select","multiselect","boolean","number"]},"label":{"type":"string"},"description":{"type":"string"},"default":{},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"}},"required":["value","label"]}},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number"}},"required":["key","type","label"]}}},"required":["version","fields"]},"setup_guide":{"type":"object","properties":{"title":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"step":{"type":"number"},"title":{"type":"string"},"description":{"type":"string"},"url":{"type":"string"},"docs_url":{"type":"string"},"code":{"type":"string"}},"required":["title","description"]}},"notes":{"type":"array","items":{"type":"string"}},"documentation":{"type":"string"}},"required":["steps"]},"project_connections":{"type":"object","properties":{"connected":{"type":"integer","minimum":0},"expired":{"type":"integer","minimum":0},"disconnected":{"type":"integer","minimum":0}},"required":["connected","expired","disconnected"]},"project_user_connections":{"type":"object","properties":{"connected":{"type":"integer","minimum":0},"expired":{"type":"integer","minimum":0},"disconnected":{"type":"integer","minimum":0}},"required":["connected","expired","disconnected"]}},"required":["name","display_name","icon","description","category","availability","auth","credential_env_var_names","credential_requirement","env_vars","tools","project_connections","project_user_connections"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Integration catalog","x-canonical-documentation":{"domain":"integrations","resource":"Integrations","subgroup":"Integration catalog","name":"Get integration","description":"Return an integration.","operationId":"getIntegration"}}},"/integrations/{name}/icon":{"get":{"operationId":"getIntegrationIcon","tags":["integrations/Integrations/Integration catalog"],"summary":"Get integration icon","description":"Return integration icon.","parameters":[{"schema":{"type":"string","description":"Integration name","example":"gmail"},"required":true,"name":"name","in":"path"}],"responses":{"200":{"description":"SVG icon","content":{"image/svg+xml":{"schema":{"type":"string","description":"SVG document of the integration icon from the deployed catalog package"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Integration catalog","x-canonical-documentation":{"domain":"integrations","resource":"Integrations","subgroup":"Integration catalog","name":"Get integration icon","description":"Return integration icon.","operationId":"getIntegrationIcon"}}},"/projects/{project_reference}/integrations/{name}/readiness":{"get":{"operationId":"checkIntegrationReadiness","tags":["integrations/Integrations/Project integrations"],"summary":"Check integration readiness","description":"Check whether one integration tool can run now in a project, before a run or to explain why a run was blocked; returns the selected connection, its state and the local blockers from stored metadata only, where a blocked or missing selection is a result and the provider is not contacted. Requires project.integrations.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Integration name, for example \"salesforce\"."},"required":true,"description":"Integration name, for example \"salesforce\".","name":"name","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":256,"description":"Qualified tool name in the namespace of the integration, for example github__list-repos."},"required":true,"description":"Qualified tool name in the namespace of the integration, for example github__list-repos.","name":"tool_name","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Exact connection to evaluate."},"required":false,"description":"Exact connection to evaluate.","name":"connection_id","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Observed generation of the connection. Requires connection_id."},"required":false,"description":"Observed generation of the connection. Requires connection_id.","name":"expected_connection_generation_id","in":"query"}],"responses":{"200":{"description":"The readiness of the selected tool. A blocked, missing or ambiguous selection is a result, not an error.","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"selection":{"type":"object","properties":{"integration":{"type":"string"},"state":{"type":"string","enum":["selected","missing","ambiguous","unavailable","stale","unknown"]},"mode":{"type":"string","enum":["oauth_connection","project_credentials","service_identity","mock","unknown"]},"scope":{"type":["string","null"],"enum":["user","project",null],"description":"Selected connection owner scope. Project connections are shared; user connections belong to the interactive caller."},"project_id":{"type":"string","format":"uuid"},"tool_name":{"type":"string"},"requested_connection_id":{"type":["string","null"],"format":"uuid"},"connection_id":{"type":["string","null"],"format":"uuid"},"connection_generation_id":{"type":["string","null"],"format":"uuid"}},"required":["integration","state","mode","scope","project_id","tool_name","requested_connection_id","connection_id","connection_generation_id"]},"connection":{"type":"object","properties":{"state":{"type":"string","enum":["connected","expired","disconnected","revoked","missing","unknown","not_applicable"]}},"required":["state"]},"account":{"type":"object","properties":{"state":{"type":"string","enum":["recorded","unknown"]},"id":{"type":["string","null"]},"evidence":{"type":"string","enum":["stored_metadata","none"]},"display_name":{"type":["string","null"]}},"required":["state","id","evidence","display_name"]},"credentials":{"type":"object","properties":{"evidence":{"type":"string","enum":["connection_metadata","complete_key_presence","partial_key_presence","absent","not_applicable"]},"missing_keys":{"type":"array","items":{"type":"string"}}},"required":["evidence","missing_keys"]},"local_eligibility":{"type":"object","properties":{"state":{"type":"string","enum":["eligible","blocked","unknown"]},"basis":{"type":"string","enum":["metadata_only"],"description":"Local eligibility is inferred from stored metadata only; it does not verify provider access."},"blockers":{"type":"array","items":{"type":"string","enum":["tool_unavailable","tool_permission_denied","connection_required","connection_selection_required","connection_unavailable","connection_stale","reconnect_required","credentials_missing","technical_configuration_blocked","selector_incompatible_with_mode"]}},"required_capability":{"type":"string","enum":["project.integrations.read","project.integrations.connect"]},"pending_checks":{"type":"array","items":{"type":"string","enum":["argument_validation","credential_value_validation","provider_authorization","credential_mode_resolution","mock_tool_availability","provider_resource_validation"]}}},"required":["state","basis","blockers","required_capability","pending_checks"]},"provider_verification":{"type":"object","properties":{"state":{"type":"string","enum":["not_checked"],"description":"Provider access has not been verified by this metadata inspection."}},"required":["state"]}},"required":["version","selection","connection","account","credentials","local_eligibility","provider_verification"]}}}},"400":{"description":"invalid_input: tool_name is missing or outside the namespace of the integration, or a connection selector is invalid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"unauthenticated: no valid credential was sent.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"forbidden: the credential lacks project.integrations.read, or it is a run token or a service account.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"not_found: the project does not exist or is not accessible.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"internal: the check failed unexpectedly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project integrations","x-canonical-documentation":{"domain":"integrations","resource":"Integrations","subgroup":"Project integrations","name":"Check integration readiness","description":"Check whether one integration tool can run now in a project, before a run or to explain why a run was blocked; returns the selected connection, its state and the local blockers from stored metadata only, where a blocked or missing selection is a result and the provider is not contacted. Requires project.integrations.read.","operationId":"checkIntegrationReadiness"}}},"/projects/{project_reference}/integrations":{"get":{"operationId":"listProjectIntegrations","tags":["integrations/Integrations/Project integrations"],"summary":"List project integrations","description":"List project integrations. Requires project.integrations.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Opt in to paged results. Omit limit and cursor to retain the complete legacy list."},"required":false,"description":"Opt in to paged results. Omit limit and cursor to retain the complete legacy list.","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":4096,"description":"Opaque continuation from page_info. A cursor without limit uses 20 entries."},"required":false,"description":"Opaque continuation from page_info. A cursor without limit uses 20 entries.","name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"search","in":"query"},{"schema":{"type":"string","enum":["name","status"],"default":"name"},"required":false,"name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"asc"},"required":false,"name":"sort_order","in":"query"}],"responses":{"200":{"description":"Project integration cards.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"configured":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"name":{"type":"string"},"display_name":{"type":"string"},"icon":{"type":"string"},"description":{"type":"string"},"auth_type":{"type":"string","enum":["oauth2","oauth1","api-key","basic"]},"tool_count":{"type":"integer","minimum":0},"prompt_count":{"type":"integer","minimum":0},"connected_for_project":{"type":"boolean"},"scope":{"type":"string","enum":["project","user"]},"allowed_tools":{"type":["array","null"],"items":{"type":"string"}},"config":{"type":"object","additionalProperties":{}},"execution_mode":{"type":"string","enum":["real","mock"]},"config_schema":{"type":["object","null"],"properties":{"version":{"type":"number","enum":[1]},"fields":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string","enum":["select"]},"label":{"type":"string"},"description":{"type":"string"},"default":{"type":"string"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"}},"required":["value","label"]}}},"required":["key","type","label","options"]},{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string","enum":["multiselect"]},"label":{"type":"string"},"description":{"type":"string"},"default":{"type":"array","items":{"type":"string"}},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"}},"required":["value","label"]}}},"required":["key","type","label","options"]},{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string","enum":["boolean"]},"label":{"type":"string"},"description":{"type":"string"},"default":{"type":"boolean"}},"required":["key","type","label"]},{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string","enum":["number"]},"label":{"type":"string"},"description":{"type":"string"},"default":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number"}},"required":["key","type","label"]}]}}},"required":["version","fields"],"description":"The project configuration schema of the integration that config must match, or null when it declares none."},"project_connections":{"type":"object","properties":{"connected":{"type":"integer","minimum":0},"expired":{"type":"integer","minimum":0},"disconnected":{"type":"integer","minimum":0}},"required":["connected","expired","disconnected"]},"project_user_connections":{"type":"object","properties":{"connected":{"type":"integer","minimum":0},"expired":{"type":"integer","minimum":0},"disconnected":{"type":"integer","minimum":0}},"required":["connected","expired","disconnected"],"description":"Private connections belonging to the interactive viewer in this project. Zero for API keys and service credentials."},"resolution":{"type":"object","properties":{"catalog_available":{"type":"boolean"},"catalog_state":{"type":"string","enum":["available","removed"]},"policy":{"type":"object","properties":{"state":{"type":"string","enum":["absent","allowed","restricted"]},"scope":{"type":"string","enum":["project","user"]},"allowed_tools":{"type":["array","null"],"items":{"type":"string"}},"execution_mode":{"type":"string","enum":["real","mock"]}},"required":["state","scope","allowed_tools","execution_mode"]},"credential_requirement":{"type":"object","properties":{"mode":{"type":"string","enum":["oauth_connection","project_credentials","none"]},"managed_oauth":{"type":"boolean"},"byo_oauth_app_override":{"type":"object","properties":{"supported":{"type":"boolean"},"required":{"type":"boolean"},"client_id_env_var":{"type":["string","null"]},"client_secret_env_var":{"type":["string","null"]}},"required":["supported","required","client_id_env_var","client_secret_env_var"]},"mandatory_env_vars":{"type":"array","items":{"type":"string"}}},"required":["mode","managed_oauth","byo_oauth_app_override","mandatory_env_vars"]},"connection_readiness":{"type":"object","properties":{"status":{"type":"string","enum":["ready","required","not_applicable","unknown"]},"scope":{"type":["string","null"],"enum":["project","user",null]},"connected_count":{"type":["integer","null"],"minimum":0}},"required":["status","scope","connected_count"]}},"required":["catalog_available","catalog_state","policy","credential_requirement","connection_readiness"]}},"required":["configured","created_at","updated_at","name","display_name","icon","description","auth_type","tool_count","prompt_count","connected_for_project","scope","allowed_tools","config","execution_mode","config_schema","project_connections","project_user_connections","resolution"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"},"total":{"type":"integer","minimum":0}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project integrations","x-canonical-documentation":{"domain":"integrations","resource":"Integrations","subgroup":"Project integrations","name":"List project integrations","description":"List project integrations. Requires project.integrations.read.","operationId":"listProjectIntegrations"}}},"/projects/{project_reference}/integrations/{name}":{"get":{"operationId":"getProjectIntegration","tags":["integrations/Integrations/Project integrations"],"summary":"Get project integration","description":"Read the settings of a project for one integration to show or check its scope, allowed tools, configuration, execution mode and connection counts; returns the project integration, with configured false and the defaults when no settings are stored. Requires project.integrations.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Integration name, for example \"salesforce\"."},"required":true,"description":"Integration name, for example \"salesforce\".","name":"name","in":"path"}],"responses":{"200":{"description":"The project integration","content":{"application/json":{"schema":{"type":"object","properties":{"configured":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"name":{"type":"string"},"display_name":{"type":"string"},"icon":{"type":"string"},"description":{"type":"string"},"auth_type":{"type":"string","enum":["oauth2","oauth1","api-key","basic"]},"tool_count":{"type":"integer","minimum":0},"prompt_count":{"type":"integer","minimum":0},"connected_for_project":{"type":"boolean"},"scope":{"type":"string","enum":["project","user"]},"allowed_tools":{"type":["array","null"],"items":{"type":"string"}},"config":{"type":"object","additionalProperties":{}},"execution_mode":{"type":"string","enum":["real","mock"]},"config_schema":{"type":["object","null"],"properties":{"version":{"type":"number","enum":[1]},"fields":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string","enum":["select"]},"label":{"type":"string"},"description":{"type":"string"},"default":{"type":"string"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"}},"required":["value","label"]}}},"required":["key","type","label","options"]},{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string","enum":["multiselect"]},"label":{"type":"string"},"description":{"type":"string"},"default":{"type":"array","items":{"type":"string"}},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"}},"required":["value","label"]}}},"required":["key","type","label","options"]},{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string","enum":["boolean"]},"label":{"type":"string"},"description":{"type":"string"},"default":{"type":"boolean"}},"required":["key","type","label"]},{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string","enum":["number"]},"label":{"type":"string"},"description":{"type":"string"},"default":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number"}},"required":["key","type","label"]}]}}},"required":["version","fields"],"description":"The project configuration schema of the integration that config must match, or null when it declares none."},"project_connections":{"type":"object","properties":{"connected":{"type":"integer","minimum":0},"expired":{"type":"integer","minimum":0},"disconnected":{"type":"integer","minimum":0}},"required":["connected","expired","disconnected"]},"project_user_connections":{"type":"object","properties":{"connected":{"type":"integer","minimum":0},"expired":{"type":"integer","minimum":0},"disconnected":{"type":"integer","minimum":0}},"required":["connected","expired","disconnected"],"description":"Private connections belonging to the interactive viewer in this project. Zero for API keys and service credentials."},"resolution":{"type":"object","properties":{"catalog_available":{"type":"boolean"},"catalog_state":{"type":"string","enum":["available","removed"]},"policy":{"type":"object","properties":{"state":{"type":"string","enum":["absent","allowed","restricted"]},"scope":{"type":"string","enum":["project","user"]},"allowed_tools":{"type":["array","null"],"items":{"type":"string"}},"execution_mode":{"type":"string","enum":["real","mock"]}},"required":["state","scope","allowed_tools","execution_mode"]},"credential_requirement":{"type":"object","properties":{"mode":{"type":"string","enum":["oauth_connection","project_credentials","none"]},"managed_oauth":{"type":"boolean"},"byo_oauth_app_override":{"type":"object","properties":{"supported":{"type":"boolean"},"required":{"type":"boolean"},"client_id_env_var":{"type":["string","null"]},"client_secret_env_var":{"type":["string","null"]}},"required":["supported","required","client_id_env_var","client_secret_env_var"]},"mandatory_env_vars":{"type":"array","items":{"type":"string"}}},"required":["mode","managed_oauth","byo_oauth_app_override","mandatory_env_vars"]},"connection_readiness":{"type":"object","properties":{"status":{"type":"string","enum":["ready","required","not_applicable","unknown"]},"scope":{"type":["string","null"],"enum":["project","user",null]},"connected_count":{"type":["integer","null"],"minimum":0}},"required":["status","scope","connected_count"]}},"required":["catalog_available","catalog_state","policy","credential_requirement","connection_readiness"]}},"required":["configured","created_at","updated_at","name","display_name","icon","description","auth_type","tool_count","prompt_count","connected_for_project","scope","allowed_tools","config","execution_mode","config_schema","project_connections","project_user_connections","resolution"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Project access denied","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project or integration not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project integrations","x-canonical-documentation":{"domain":"integrations","resource":"Integrations","subgroup":"Project integrations","name":"Get project integration","description":"Read the settings of a project for one integration to show or check its scope, allowed tools, configuration, execution mode and connection counts; returns the project integration, with configured false and the defaults when no settings are stored. Requires project.integrations.read.","operationId":"getProjectIntegration"}},"patch":{"operationId":"updateProjectIntegration","tags":["integrations/Integrations/Project integrations"],"summary":"Update project integration","description":"Change the scope, allowed tools, configuration or execution mode of a project integration by sending only the fields to change, so that an omitted field keeps its stored value; returns the updated project integration. Requires project.integrations.configure.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Integration name, for example \"salesforce\"."},"required":true,"description":"Integration name, for example \"salesforce\".","name":"name","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["project","user","endUser","end_user"],"description":"Credential scope the integration uses. Omit to keep the stored value. The legacy end_user and endUser inputs are aliases of user; the result returns user."},"allowed_tools":{"type":["array","null"],"items":{"type":"string"},"description":"Unprefixed tool IDs the project allows. Null allows all tools. Omit to keep the stored list. Each entry must exist in the catalog of the effective execution mode."},"config":{"type":"object","additionalProperties":{},"description":"Integration-specific configuration that must match config_schema. Omit to keep the stored configuration."},"execution_mode":{"type":"string","enum":["real","mock"],"description":"Execution mode, real or mock. Omit to keep the stored value."}}}}}},"responses":{"200":{"description":"The updated project integration.","content":{"application/json":{"schema":{"type":"object","properties":{"configured":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"name":{"type":"string"},"display_name":{"type":"string"},"icon":{"type":"string"},"description":{"type":"string"},"auth_type":{"type":"string","enum":["oauth2","oauth1","api-key","basic"]},"tool_count":{"type":"integer","minimum":0},"prompt_count":{"type":"integer","minimum":0},"connected_for_project":{"type":"boolean"},"scope":{"type":"string","enum":["project","user"]},"allowed_tools":{"type":["array","null"],"items":{"type":"string"}},"config":{"type":"object","additionalProperties":{}},"execution_mode":{"type":"string","enum":["real","mock"]},"config_schema":{"type":["object","null"],"properties":{"version":{"type":"number","enum":[1]},"fields":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string","enum":["select"]},"label":{"type":"string"},"description":{"type":"string"},"default":{"type":"string"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"}},"required":["value","label"]}}},"required":["key","type","label","options"]},{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string","enum":["multiselect"]},"label":{"type":"string"},"description":{"type":"string"},"default":{"type":"array","items":{"type":"string"}},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"}},"required":["value","label"]}}},"required":["key","type","label","options"]},{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string","enum":["boolean"]},"label":{"type":"string"},"description":{"type":"string"},"default":{"type":"boolean"}},"required":["key","type","label"]},{"type":"object","properties":{"key":{"type":"string"},"type":{"type":"string","enum":["number"]},"label":{"type":"string"},"description":{"type":"string"},"default":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"step":{"type":"number"}},"required":["key","type","label"]}]}}},"required":["version","fields"],"description":"The project configuration schema of the integration that config must match, or null when it declares none."},"project_connections":{"type":"object","properties":{"connected":{"type":"integer","minimum":0},"expired":{"type":"integer","minimum":0},"disconnected":{"type":"integer","minimum":0}},"required":["connected","expired","disconnected"]},"project_user_connections":{"type":"object","properties":{"connected":{"type":"integer","minimum":0},"expired":{"type":"integer","minimum":0},"disconnected":{"type":"integer","minimum":0}},"required":["connected","expired","disconnected"],"description":"Private connections belonging to the interactive viewer in this project. Zero for API keys and service credentials."},"resolution":{"type":"object","properties":{"catalog_available":{"type":"boolean"},"catalog_state":{"type":"string","enum":["available","removed"]},"policy":{"type":"object","properties":{"state":{"type":"string","enum":["absent","allowed","restricted"]},"scope":{"type":"string","enum":["project","user"]},"allowed_tools":{"type":["array","null"],"items":{"type":"string"}},"execution_mode":{"type":"string","enum":["real","mock"]}},"required":["state","scope","allowed_tools","execution_mode"]},"credential_requirement":{"type":"object","properties":{"mode":{"type":"string","enum":["oauth_connection","project_credentials","none"]},"managed_oauth":{"type":"boolean"},"byo_oauth_app_override":{"type":"object","properties":{"supported":{"type":"boolean"},"required":{"type":"boolean"},"client_id_env_var":{"type":["string","null"]},"client_secret_env_var":{"type":["string","null"]}},"required":["supported","required","client_id_env_var","client_secret_env_var"]},"mandatory_env_vars":{"type":"array","items":{"type":"string"}}},"required":["mode","managed_oauth","byo_oauth_app_override","mandatory_env_vars"]},"connection_readiness":{"type":"object","properties":{"status":{"type":"string","enum":["ready","required","not_applicable","unknown"]},"scope":{"type":["string","null"],"enum":["project","user",null]},"connected_count":{"type":["integer","null"],"minimum":0}},"required":["status","scope","connected_count"]}},"required":["catalog_available","catalog_state","policy","credential_requirement","connection_readiness"]}},"required":["configured","created_at","updated_at","name","display_name","icon","description","auth_type","tool_count","prompt_count","connected_for_project","scope","allowed_tools","config","execution_mode","config_schema","project_connections","project_user_connections","resolution"]}}}},"400":{"description":"invalid_input: a field is invalid, allowed_tools names a tool outside the catalog of the effective execution mode, or config does not match config_schema. errors lists the fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"unauthenticated: no valid credential was sent.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"forbidden: the credential lacks project.integrations.configure.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"not_found: the project or the integration does not exist or is not accessible.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"internal: the update failed unexpectedly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"internal: the mock integration service did not return its catalog, which allowed_tools is checked against in mock execution mode.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project integrations","x-canonical-documentation":{"domain":"integrations","resource":"Integrations","subgroup":"Project integrations","name":"Update project integration","description":"Change the scope, allowed tools, configuration or execution mode of a project integration by sending only the fields to change, so that an omitted field keeps its stored value; returns the updated project integration. Requires project.integrations.configure.","operationId":"updateProjectIntegration"}},"delete":{"operationId":"deleteProjectIntegration","tags":["integrations/Integrations/Project integrations"],"summary":"Delete project integration","description":"Reset the settings of a project for one integration to the defaults without touching its connections, also when no settings were stored; every surface returns { ok: true }. Requires project.integrations.configure; API keys also need delete scope.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Integration policy to delete. Deleting the saved policy does not revoke its OAuth credentials."},"required":true,"description":"Integration policy to delete. Deleting the saved policy does not revoke its OAuth credentials.","name":"name","in":"path"}],"responses":{"200":{"description":"Project integration policy deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Integration not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project integrations","x-canonical-documentation":{"domain":"integrations","resource":"Integrations","subgroup":"Project integrations","name":"Delete project integration","description":"Reset the settings of a project for one integration to the defaults without touching its connections, also when no settings were stored; every surface returns { ok: true }. Requires project.integrations.configure; API keys also need delete scope.","operationId":"deleteProjectIntegration"}}},"/projects/{project_reference}/integrations/salesforce/objects":{"get":{"operationId":"listSalesforceObjects","tags":["integrations/Integrations/Project integrations"],"summary":"List Salesforce objects","description":"List the objects of the Salesforce org connected to a project to choose the objects an integration may access; returns every object the connected user can see, or one page when a limit or cursor is sent. Requires project.integrations.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Opt in to paged results. Omit limit and cursor to retain the complete legacy list."},"required":false,"description":"Opt in to paged results. Omit limit and cursor to retain the complete legacy list.","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":4096,"description":"Opaque continuation from page_info, at most 4096 characters. A cursor without limit reads 20 objects."},"required":false,"description":"Opaque continuation from page_info, at most 4096 characters. A cursor without limit reads 20 objects.","name":"cursor","in":"query"}],"responses":{"200":{"description":"Visible Salesforce object metadata.","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer","minimum":0},"page_info":{"$ref":"#/components/schemas/PageInfo"},"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"custom":{"type":"boolean"},"queryable":{"type":"boolean"},"createable":{"type":"boolean"},"updateable":{"type":"boolean"},"deletable":{"type":"boolean"},"deprecated_and_hidden":{"type":"boolean"}},"required":["name","label","custom","queryable","createable","updateable","deletable","deprecated_and_hidden"]}}},"required":["data"]}}}},"400":{"description":"Salesforce is not connected or object discovery failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project integrations","x-canonical-documentation":{"domain":"integrations","resource":"Integrations","subgroup":"Project integrations","name":"List Salesforce objects","description":"List the objects of the Salesforce org connected to a project to choose the objects an integration may access; returns every object the connected user can see, or one page when a limit or cursor is sent. Requires project.integrations.read.","operationId":"listSalesforceObjects"}}},"/projects/{project_reference}/integrations/salesforce/objects/{object_name}/fields":{"get":{"operationId":"listSalesforceObjectFields","tags":["integrations/Integrations/Project integrations"],"summary":"List Salesforce object fields","description":"List the fields of one Salesforce object in the org connected to a project to map or filter its data; returns every field the connected user can see, or one page when a limit or cursor is sent. Requires project.integrations.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","minLength":1,"pattern":"^[A-Za-z][A-Za-z0-9_]*$","description":"Salesforce object API name, for example Account."},"required":true,"description":"Salesforce object API name, for example Account.","name":"object_name","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Opt in to paged results. Omit limit and cursor to retain the complete legacy list."},"required":false,"description":"Opt in to paged results. Omit limit and cursor to retain the complete legacy list.","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":4096,"description":"Opaque continuation from page_info, at most 4096 characters. A cursor without limit reads 20 fields."},"required":false,"description":"Opaque continuation from page_info, at most 4096 characters. A cursor without limit reads 20 fields.","name":"cursor","in":"query"}],"responses":{"200":{"description":"Visible Salesforce object field metadata.","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer","minimum":0},"page_info":{"$ref":"#/components/schemas/PageInfo"},"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"},"reference_to":{"type":"array","items":{"type":"string"}},"relationship_name":{"type":["string","null"]},"nillable":{"type":"boolean"},"createable":{"type":"boolean"},"updateable":{"type":"boolean"},"filterable":{"type":"boolean"},"sortable":{"type":"boolean"},"id_lookup":{"type":"boolean"},"external_id":{"type":"boolean"},"calculated":{"type":"boolean"},"name_field":{"type":"boolean"}},"required":["name","label","type","reference_to","relationship_name","nillable","createable","updateable","filterable","sortable","id_lookup","external_id","calculated","name_field"]}}},"required":["data"]}}}},"400":{"description":"Salesforce is not connected or field discovery failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project or Salesforce object not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project integrations","x-canonical-documentation":{"domain":"integrations","resource":"Integrations","subgroup":"Project integrations","name":"List Salesforce object fields","description":"List the fields of one Salesforce object in the org connected to a project to map or filter its data; returns every field the connected user can see, or one page when a limit or cursor is sent. Requires project.integrations.read.","operationId":"listSalesforceObjectFields"}}},"/projects/{project_reference}/integrations/{name}/connect-sessions":{"post":{"operationId":"createConnectSession","tags":["integrations/Connections/Connections"],"summary":"Create connect session","description":"Create connect session.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project ID or slug. A missing or inaccessible project, including a denied scope-dependent project access check, returns not_found."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Integration name, for example github or slack."},"required":true,"name":"name","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["user","project"],"description":"Connection owner. Project scope needs the editor role; user scope connects your own account and needs viewer access to the project. API keys also need the integrations write scope. Verified user-session or API-key credentials are required; MCP OAuth grants and runtime credentials are refused."},"redirect_uri":{"type":"string","maxLength":4096,"description":"Trusted web or native URI the browser returns to after consent."}},"required":["scope","redirect_uri"],"additionalProperties":false}}}},"responses":{"201":{"description":"One-time provider consent link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectSession"},"example":{"session_token":"ocs_example","connect_url":"https://api.veryfront.com/oauth/connect/github?session_token=ocs_example","expires_at":"2026-10-10T12:05:00.000Z"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project or connection not found, including inaccessible projects or denied scope-dependent project access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Connections","x-canonical-documentation":{"domain":"integrations","resource":"Connections","subgroup":"Connections","name":"Create connect session","description":"Create connect session.","operationId":"createConnectSession"}}},"/projects/{project_reference}/integrations/{name}/connection-status":{"get":{"operationId":"getConnectionStatus","tags":["integrations/Connections/Connections"],"summary":"Get connection status","description":"Return connection status. Requires project.integrations.read.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project ID or slug. A missing or inaccessible project, including a denied scope-dependent project access check, returns not_found."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Integration name, for example github or slack."},"required":true,"name":"name","in":"path"},{"schema":{"type":"string","enum":["user","project"],"description":"Connection owner to inspect. Requires viewer access to the project. API keys never see user-scope connections. Verified user-session or API-key credentials are required; MCP OAuth grants and runtime credentials are refused."},"required":true,"description":"Connection owner to inspect. Requires viewer access to the project. API keys never see user-scope connections. Verified user-session or API-key credentials are required; MCP OAuth grants and runtime credentials are refused.","name":"scope","in":"query"}],"responses":{"200":{"description":"Connection availability and current IDs; disconnected owners have null IDs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionStatus"},"example":{"integration":"github","scope":"project","connected":true,"connection_id":"6f1c2b8e-3d4a-4f5b-9c6d-7e8f9a0b1c2d","connection_generation_id":"0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project or connection not found, including inaccessible projects or denied scope-dependent project access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Connections","x-canonical-documentation":{"domain":"integrations","resource":"Connections","subgroup":"Connections","name":"Get connection status","description":"Return connection status. Requires project.integrations.read.","operationId":"getConnectionStatus"}}},"/projects/{project_reference}/integrations/{name}/connections/{connection_id}":{"delete":{"operationId":"deleteConnection","tags":["integrations/Connections/Connections"],"summary":"Delete connection","description":"Delete a connection.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Project ID or slug. A missing or inaccessible project, including a denied scope-dependent project access check, returns not_found."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Integration name, for example github or slack."},"required":true,"name":"name","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Connection ID from getConnectionStatus or listProjectConnections."},"required":true,"name":"connection_id","in":"path"},{"schema":{"type":"string","enum":["user","project"],"description":"Connection owner. Project scope needs the editor role for project.integrations.connect; user scope needs viewer access to the project. API keys also need the integrations write scope. Verified user-session or API-key credentials are required; MCP OAuth grants and runtime credentials are refused."},"required":true,"description":"Connection owner. Project scope needs the editor role for project.integrations.connect; user scope needs viewer access to the project. API keys also need the integrations write scope. Verified user-session or API-key credentials are required; MCP OAuth grants and runtime credentials are refused.","name":"scope","in":"query"}],"responses":{"200":{"description":"Stored credentials deleted; ok is always true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionDeletion"},"example":{"ok":true,"provider_revoked":true}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project or connection not found, including inaccessible projects or denied scope-dependent project access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Connections","x-canonical-documentation":{"domain":"integrations","resource":"Connections","subgroup":"Connections","name":"Delete connection","description":"Delete a connection.","operationId":"deleteConnection"}}},"/oauth/connect/{integration}":{"get":{"operationId":"startConnection","tags":["integrations/Connections/Connections"],"summary":"Start connecting an integration","description":"Start connecting an integration.","parameters":[{"schema":{"type":"string","description":"Integration identifier, for example github or gmail."},"required":true,"description":"Integration identifier, for example github or gmail.","name":"integration","in":"path"},{"schema":{"type":"string","description":"Project UUID or slug that owns the connection."},"required":false,"description":"Project UUID or slug that owns the connection.","name":"project_reference","in":"query"},{"schema":{"type":"string","enum":["user","project"],"description":"Connection ownership within the project."},"required":false,"description":"Connection ownership within the project.","name":"scope","in":"query"},{"schema":{"type":"string","maxLength":4096,"description":"Dashboard-relative path to redirect to after OAuth completes."},"required":false,"description":"Dashboard-relative path to redirect to after OAuth completes.","name":"redirect","in":"query"},{"schema":{"type":"string","maxLength":4096,"description":"Absolute redirect URI for native or custom app OAuth flows."},"required":false,"description":"Absolute redirect URI for native or custom app OAuth flows.","name":"redirect_uri","in":"query"},{"schema":{"type":"string","description":"One-time connect session token from connect_url. Open connect_url in a browser to start provider consent; the flow returns through the integration callback."},"required":false,"description":"One-time connect session token from connect_url. Open connect_url in a browser to start provider consent; the flow returns through the integration callback.","name":"session_token","in":"query"}],"responses":{"302":{"description":"Redirect to provider consent screen. The /oauth/connect/{integration} URL is persisted in links and chat history; its path and query fields remain stable."},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Connections","x-canonical-documentation":{"domain":"integrations","resource":"Connections","subgroup":"Connections","name":"Start connecting an integration","description":"Start connecting an integration.","operationId":"startConnection"}}},"/oauth/callback/{integration}":{"get":{"operationId":"completeConnection","tags":["integrations/Connections/Connections"],"summary":"Complete connecting an integration","description":"Complete connecting an integration.","parameters":[{"schema":{"type":"string","description":"Integration identifier in the provider redirect callback. The provider calls this endpoint after consent; applications open the connect URL instead."},"required":true,"description":"Integration identifier in the provider redirect callback. The provider calls this endpoint after consent; applications open the connect URL instead.","name":"integration","in":"path"},{"schema":{"type":"string","maxLength":8192,"description":"Authorization code returned by the OAuth provider."},"required":false,"description":"Authorization code returned by the OAuth provider.","name":"code","in":"query"},{"schema":{"type":"string","description":"Opaque OAuth state token created by the connect endpoint."},"required":false,"description":"Opaque OAuth state token created by the connect endpoint.","name":"state","in":"query"},{"schema":{"type":"string","maxLength":8192,"description":"Provider error code when the OAuth consent flow fails."},"required":false,"description":"Provider error code when the OAuth consent flow fails.","name":"error","in":"query"},{"schema":{"type":"string","description":"Human-readable provider error description."},"required":false,"description":"Human-readable provider error description.","name":"error_description","in":"query"}],"responses":{"302":{"description":"Completes provider consent and stores the connection on success. Redirect to the application with oauth_connected naming the integration, or an OAuth error reason. The /oauth/callback/{integration} path is the redirect URI registered with every provider and remains unchanged."},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Connections","x-canonical-documentation":{"domain":"integrations","resource":"Connections","subgroup":"Connections","name":"Complete connecting an integration","description":"Complete connecting an integration.","operationId":"completeConnection"}}},"/projects/{project_reference}/connections":{"get":{"operationId":"listProjectConnections","tags":["integrations/Connections/Connections"],"summary":"List connections","description":"List the connections. Requires project.integrations.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Filter by integration identifier","example":"github"},"required":false,"description":"Filter by integration identifier","name":"integration","in":"query"},{"$ref":"#/components/parameters/PaginationCursor"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["project","status","created_at"],"default":"project"},"required":false,"name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"asc"},"required":false,"name":"sort_order","in":"query"}],"responses":{"200":{"description":"Visible project connections.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectConnectionList"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project or integration not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Connections","x-canonical-documentation":{"domain":"integrations","resource":"Connections","subgroup":"Connections","name":"List connections","description":"List the connections. Requires project.integrations.read.","operationId":"listProjectConnections"}}},"/connections":{"get":{"operationId":"listConnections","tags":["integrations/Connections/Connections"],"summary":"List connections across projects","description":"List connections across projects.","parameters":[{"schema":{"type":"string","description":"Filter by integration identifier","example":"github"},"required":false,"description":"Filter by integration identifier","name":"integration","in":"query"},{"$ref":"#/components/parameters/PaginationCursor"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["project","status","created_at"],"default":"project"},"required":false,"name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"asc"},"required":false,"name":"sort_order","in":"query"}],"responses":{"200":{"description":"Accessible connections","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountConnectionList"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Connections","x-canonical-documentation":{"domain":"integrations","resource":"Connections","subgroup":"Connections","name":"List connections across projects","description":"List connections across projects.","operationId":"listConnections"}}},"/projects/{project_reference}/channels":{"get":{"operationId":"listChannels","tags":["integrations/Channels/Channels"],"summary":"List a project's channels","description":"List a project's channels. Requires project.channels.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"}],"responses":{"200":{"description":"Project channels","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Channel"},"description":"All project channels, newest first by creation time then ID. This complete list is not paginated."}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Channels","x-canonical-documentation":{"domain":"integrations","resource":"Channels","subgroup":"Channels","name":"List a project's channels","description":"List a project's channels. Requires project.channels.read.","operationId":"listChannels"}},"post":{"operationId":"createChannel","tags":["integrations/Channels/Channels"],"summary":"Connect an agent to a Slack workspace","description":"Connect a Slack agent. Requires project.channels.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"platform":{"type":"string","enum":["slack"],"description":"Messaging platform: slack"},"agent_id":{"type":"string","minLength":1,"description":"Agent ID from listChannelAgents (MCP: list_channel_agents) for the same runtime target"},"name":{"type":"string","minLength":1,"maxLength":255,"description":"Display name, 1-255 characters"},"respond_to":{"type":"string","enum":["mentions","direct_messages","all"],"description":"Which Slack messages to answer: mentions, direct_messages or all"},"allowed_slack_channel_ids":{"type":"array","items":{"type":"string","minLength":1,"maxLength":255},"maxItems":250,"description":"Slack channel IDs. Overlap with another channel in the same workspace is rejected with resource-already-exists. IDs come from listSlackChannels (MCP: list_slack_channels); empty means every Slack channel the bot is in. A preview_branch target needs at least one."},"welcome_message":{"type":["string","null"],"maxLength":4000,"description":"Welcome message; null clears"},"error_message":{"type":["string","null"],"maxLength":4000,"description":"Message shown when the agent fails; null clears"},"max_response_tokens":{"type":["integer","null"],"exclusiveMinimum":0,"maximum":65536,"description":"Maximum response tokens, 1-65536; null clears"},"runtime_target_kind":{"type":"string","enum":["main_branch","environment","preview_branch"],"description":"Runtime target: main_branch, environment or preview_branch"},"target_environment_id":{"type":["string","null"],"format":"uuid","description":"Environment ID; required when runtime_target_kind is environment"},"target_branch_id":{"type":["string","null"],"format":"uuid","description":"Branch ID; required when runtime_target_kind is preview_branch"}},"required":["platform","agent_id"]}}}},"responses":{"201":{"description":"Created channel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Channel"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Channels","x-canonical-documentation":{"domain":"integrations","resource":"Channels","subgroup":"Channels","name":"Connect an agent to a Slack workspace","description":"Connect a Slack agent. Requires project.channels.write.","operationId":"createChannel"}}},"/projects/{project_reference}/channels/{channel_id}":{"get":{"operationId":"getChannel","tags":["integrations/Channels/Channels"],"summary":"Read one channel and its runtime target","description":"Return a channel binding. Requires project.channels.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"channel_id","in":"path"}],"responses":{"200":{"description":"Channel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Channel"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Channels","x-canonical-documentation":{"domain":"integrations","resource":"Channels","subgroup":"Channels","name":"Read one channel and its runtime target","description":"Return a channel binding. Requires project.channels.read.","operationId":"getChannel"}},"patch":{"operationId":"updateChannel","tags":["integrations/Channels/Channels"],"summary":"Change a channel's settings or target","description":"Update a channel binding. Requires project.channels.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"channel_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","minLength":1,"description":"Agent from the same runtime target; checked against the selected target again. Omission keeps the current agent. Updating does not require the caller Slack connection."},"name":{"type":"string","minLength":1,"maxLength":255,"description":"Display name, 1-255 characters"},"respond_to":{"type":"string","enum":["mentions","direct_messages","all"],"description":"Which Slack messages to answer: mentions, direct_messages or all"},"allowed_slack_channel_ids":{"type":"array","items":{"type":"string","minLength":1,"maxLength":255},"maxItems":250,"description":"Slack channel IDs. Overlap with another channel in the same workspace is rejected with resource-already-exists. IDs come from listSlackChannels (MCP: list_slack_channels); empty means every Slack channel the bot is in. A preview_branch target needs at least one."},"welcome_message":{"type":["string","null"],"maxLength":4000,"description":"Welcome message. Omission keeps the value; null clears it."},"error_message":{"type":["string","null"],"maxLength":4000,"description":"Error message. Omission keeps the value; null clears it."},"max_response_tokens":{"type":["integer","null"],"exclusiveMinimum":0,"maximum":65536,"description":"Maximum response tokens. Omission keeps the value; null clears it."},"runtime_target_kind":{"type":"string","enum":["main_branch","environment","preview_branch"],"description":"Runtime target: main_branch, environment or preview_branch"},"target_environment_id":{"type":["string","null"],"format":"uuid","description":"Environment ID; required when runtime_target_kind is environment"},"target_branch_id":{"type":["string","null"],"format":"uuid","description":"Branch ID; required when runtime_target_kind is preview_branch"}}}}}},"responses":{"200":{"description":"Updated channel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Channel"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Channels","x-canonical-documentation":{"domain":"integrations","resource":"Channels","subgroup":"Channels","name":"Change a channel's settings or target","description":"Update a channel binding. Requires project.channels.write.","operationId":"updateChannel"}},"delete":{"operationId":"deleteChannel","tags":["integrations/Channels/Channels"],"summary":"Disconnect a channel","description":"Disconnect a channel. Requires project.channels.write; API keys also need delete scope.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"channel_id","in":"path"}],"responses":{"200":{"description":"Channel synchronously deleted; the Slack connection remains.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Channels","x-canonical-documentation":{"domain":"integrations","resource":"Channels","subgroup":"Channels","name":"Disconnect a channel","description":"Disconnect a channel. Requires project.channels.write; API keys also need delete scope.","operationId":"deleteChannel"}}},"/projects/{project_reference}/channels/{channel_id}/check":{"post":{"operationId":"checkChannel","tags":["integrations/Channels/Channels"],"summary":"Post a test message to verify delivery","description":"Test channel message delivery. Requires project.channels.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"channel_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"slack_channel_id":{"type":"string","minLength":1,"maxLength":255,"description":"Slack channel for the test message. Slack refusals return status failed with a failure code. A missing Slack connection returns validation-failed; a transient connection refresh failure returns external-service-error."},"text":{"type":"string","minLength":1,"maxLength":4000,"description":"Message text; default 'Veryfront Slack connection test'."}},"required":["slack_channel_id"]}}}},"responses":{"200":{"description":"Delivery result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelCheckResult"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Channels","x-canonical-documentation":{"domain":"integrations","resource":"Channels","subgroup":"Channels","name":"Post a test message to verify delivery","description":"Test channel message delivery. Requires project.channels.write.","operationId":"checkChannel"}}},"/projects/{project_reference}/channels/agents":{"get":{"operationId":"listChannelAgents","tags":["integrations/Channels/Setup lookups"],"summary":"List agents a runtime target can use","description":"List runtime target agents. Requires project.channels.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","enum":["main_branch","environment","preview_branch"],"default":"main_branch","description":"Runtime target to inspect. Environment targets require target_environment_id; preview_branch targets require target_branch_id. Missing or mismatched IDs return 400."},"required":false,"description":"Runtime target to inspect. Environment targets require target_environment_id; preview_branch targets require target_branch_id. Missing or mismatched IDs return 400.","name":"runtime_target_kind","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Environment ID; required when runtime_target_kind is environment"},"required":false,"description":"Environment ID; required when runtime_target_kind is environment","name":"target_environment_id","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Branch ID; required when runtime_target_kind is preview_branch"},"required":false,"description":"Branch ID; required when runtime_target_kind is preview_branch","name":"target_branch_id","in":"query"}],"responses":{"200":{"description":"The available agents.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"model":{"type":["string","null"]}},"required":["id","name","description","model"]},"description":"All agents available for the selected runtime target, sorted by name then ID. This complete list is not paginated."}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Setup lookups","x-canonical-documentation":{"domain":"integrations","resource":"Channels","subgroup":"Setup lookups","name":"List agents a runtime target can use","description":"List runtime target agents. Requires project.channels.read.","operationId":"listChannelAgents"}}},"/projects/{project_reference}/channels/slack-channels":{"get":{"operationId":"listSlackChannels","tags":["integrations/Channels/Setup lookups"],"summary":"Search Slack channels the workspace can see","description":"Search accessible Slack channels. Requires project.channels.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","maxLength":255,"description":"Filter by Slack channel name or ID"},"required":false,"description":"Filter by Slack channel name or ID","name":"query","in":"query"},{"schema":{"type":"integer","exclusiveMinimum":0,"maximum":200,"default":100,"description":"Maximum public channels and maximum private channels fetched separately, before query filtering. Up to twice this limit can be returned."},"required":false,"description":"Maximum public channels and maximum private channels fetched separately, before query filtering. Up to twice this limit can be returned.","name":"limit","in":"query"}],"responses":{"200":{"description":"Slack channels","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"is_private":{"type":"boolean"},"is_archived":{"type":"boolean"}},"required":["id","name","is_private","is_archived"]},"description":"Connected workspace public and private channels after query filtering."}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Setup lookups","x-canonical-documentation":{"domain":"integrations","resource":"Channels","subgroup":"Setup lookups","name":"Search Slack channels the workspace can see","description":"Search accessible Slack channels. Requires project.channels.read.","operationId":"listSlackChannels"}}},"/webhooks/channels/{platform}":{"post":{"operationId":"receiveChannelWebhooks","tags":["integrations/Channels/Channel delivery"],"summary":"Receive channel webhooks","description":"Receive channel webhooks.","parameters":[{"schema":{"type":"string","enum":["slack"],"description":"Channel platform that sent the webhook"},"required":true,"description":"Channel platform that sent the webhook","name":"platform","in":"path"}],"responses":{"200":{"description":"Webhook accepted or URL verification challenge returned","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OkResponse"},{"type":"object","properties":{"challenge":{"type":"string","description":"Verification challenge echoed back to the platform"}},"required":["challenge"]}]}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Invalid signature or stale timestamp","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-audience":"component-internal","x-documentation-source-tag":"Channel delivery","x-canonical-documentation":{"domain":"integrations","resource":"Channels","subgroup":"Channel delivery","name":"Receive channel webhooks","description":"Receive channel webhooks.","operationId":"receiveChannelWebhooks"}}},"/projects/{project_reference}/external-files/{provider}":{"get":{"operationId":"listExternalFiles","tags":["integrations/External storage/External Files"],"summary":"List external files","description":"List external files.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","enum":["onedrive","sharepoint","drive"],"description":"External file provider: `onedrive`, `sharepoint` or `drive` (Google Drive)."},"required":true,"name":"provider","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":1024,"description":"Folder item ID; defaults to the drive root or SharePoint sites root. A cursor retains the original folder when this is omitted; a supplied folder must match the cursor."},"required":false,"name":"folder_id","in":"query"},{"schema":{"type":"string","description":"Older folder path selector, accepted only without folder_id. Use folder_id."},"required":false,"name":"path","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":256,"description":"Search text. Searches below folder_id when given, else the whole drive. SharePoint needs a site or folder to search."},"required":false,"name":"query","in":"query"},{"schema":{"type":"string","description":"Opaque page_info.next from a previous page of the same provider, folder and query. Omitted folder and query retain the original selectors; supplied selectors must match."},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","description":"Items per page, 1 to 100. Defaults to 20.","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"A page of external files.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalFileList"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"428":{"description":"Precondition required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"429":{"description":"Rate limit exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}}},"x-documentation-source-tag":"External Files","x-canonical-documentation":{"domain":"integrations","resource":"External storage","subgroup":"External Files","name":"List external files","description":"List external files.","operationId":"listExternalFiles"}},"post":{"operationId":"createExternalFile","tags":["integrations/External storage/External Files"],"summary":"Create external file","description":"Create external file.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","enum":["onedrive","sharepoint","drive"],"description":"External file provider: `onedrive`, `sharepoint` or `drive` (Google Drive)."},"required":true,"name":"provider","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^\\S+$","description":"Key of 1-128 characters without whitespace. A retry with the same key and request within 24 hours returns the first result instead of creating another item; the same key with a different request returns 409 conflict."},"required":false,"name":"idempotency-key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExternalFileRequest"}}}},"responses":{"201":{"description":"The created file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalFile"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"402":{"description":"Payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"428":{"description":"Precondition required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"429":{"description":"Rate limit exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}}},"x-documentation-source-tag":"External Files","x-canonical-documentation":{"domain":"integrations","resource":"External storage","subgroup":"External Files","name":"Create external file","description":"Create external file.","operationId":"createExternalFile"}}},"/projects/{project_reference}/external-files/{provider}/{file_id}":{"get":{"operationId":"getExternalFile","tags":["integrations/External storage/External Files"],"summary":"Get external file","description":"Return external file.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","enum":["onedrive","sharepoint","drive"],"description":"External file provider: `onedrive`, `sharepoint` or `drive` (Google Drive)."},"required":true,"name":"provider","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":1024,"description":"Provider item ID from listExternalFiles. Opaque; percent-encode it. Missing or inaccessible items return not_found."},"required":true,"name":"file_id","in":"path"}],"responses":{"200":{"description":"The external file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalFile"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"428":{"description":"Precondition required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"429":{"description":"Rate limit exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}}},"x-documentation-source-tag":"External Files","x-canonical-documentation":{"domain":"integrations","resource":"External storage","subgroup":"External Files","name":"Get external file","description":"Return external file.","operationId":"getExternalFile"}},"put":{"operationId":"updateExternalFile","tags":["integrations/External storage/External Files"],"summary":"Update external file","description":"Update external file.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","enum":["onedrive","sharepoint","drive"],"description":"External file provider: `onedrive`, `sharepoint` or `drive` (Google Drive)."},"required":true,"name":"provider","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":1024,"description":"Provider item ID from listExternalFiles. Opaque; percent-encode it. Missing or inaccessible items return not_found."},"required":true,"name":"file_id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":1024,"pattern":"^(?:\\*|(?:W\\/)?\"[\\x21\\x23-\\x7e]*\"(?:[ \\t]*,[ \\t]*(?:W\\/)?\"[\\x21\\x23-\\x7e]*\")*|[!#$%&'*+.^_`|~0-9A-Za-z-]+)$","description":"The etag from ExternalFile. The update is refused with 409 conflict when the file changed."},"required":false,"name":"if-match","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateExternalFileRequest"}}}},"responses":{"200":{"description":"The updated file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalFile"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"402":{"description":"Payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"428":{"description":"Precondition required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"429":{"description":"Rate limit exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}}},"x-documentation-source-tag":"External Files","x-canonical-documentation":{"domain":"integrations","resource":"External storage","subgroup":"External Files","name":"Update external file","description":"Update external file.","operationId":"updateExternalFile"}},"delete":{"operationId":"deleteExternalFile","tags":["integrations/External storage/External Files"],"summary":"Delete external file","description":"Delete external file. API keys need delete scope.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","enum":["onedrive","sharepoint","drive"],"description":"External file provider: `onedrive`, `sharepoint` or `drive` (Google Drive)."},"required":true,"name":"provider","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":1024,"description":"Provider item ID. Deleting a folder recursively deletes its contents."},"required":true,"name":"file_id","in":"path"}],"responses":{"200":{"description":"What the provider accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalFileDeletion"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"428":{"description":"Precondition required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"429":{"description":"Rate limit exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}}},"x-documentation-source-tag":"External Files","x-canonical-documentation":{"domain":"integrations","resource":"External storage","subgroup":"External Files","name":"Delete external file","description":"Delete external file. API keys need delete scope.","operationId":"deleteExternalFile"}}},"/projects/{project_reference}/external-files/{provider}/{file_id}/content":{"get":{"operationId":"readExternalFile","tags":["integrations/External storage/External Files"],"summary":"Read external file content","description":"Read external file content.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","enum":["onedrive","sharepoint","drive"],"description":"External file provider: `onedrive`, `sharepoint` or `drive` (Google Drive)."},"required":true,"name":"provider","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":1024,"description":"Provider file ID. Folders return invalid_input. Files over 50 MiB or 100000 encoded characters return 413 limit_exceeded; use import for larger files."},"required":true,"name":"file_id","in":"path"}],"responses":{"200":{"description":"The complete content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalFileContent"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"428":{"description":"Precondition required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"429":{"description":"Rate limit exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}}},"x-documentation-source-tag":"External Files","x-canonical-documentation":{"domain":"integrations","resource":"External storage","subgroup":"External Files","name":"Read external file content","description":"Read external file content.","operationId":"readExternalFile"}}},"/projects/{project_reference}/external-files/{provider}/{file_id}/move":{"post":{"operationId":"moveExternalFile","tags":["integrations/External storage/External Files"],"summary":"Move external file","description":"Move external file.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","enum":["onedrive","sharepoint","drive"],"description":"External file provider: `onedrive`, `sharepoint` or `drive` (Google Drive)."},"required":true,"name":"provider","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":1024,"description":"Provider item ID from listExternalFiles. Opaque; percent-encode it. Missing or inaccessible items return not_found."},"required":true,"name":"file_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveExternalFileRequest"}}}},"responses":{"200":{"description":"The moved item.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalFile"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"402":{"description":"Payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"428":{"description":"Precondition required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"429":{"description":"Rate limit exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}}},"x-documentation-source-tag":"External Files","x-canonical-documentation":{"domain":"integrations","resource":"External storage","subgroup":"External Files","name":"Move external file","description":"Move external file.","operationId":"moveExternalFile"}}},"/projects/{project_reference}/external-files/{provider}/folders":{"post":{"operationId":"createExternalFolder","tags":["integrations/External storage/External Files"],"summary":"Create external folder","description":"Create external folder.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","enum":["onedrive","sharepoint","drive"],"description":"External file provider: `onedrive`, `sharepoint` or `drive` (Google Drive)."},"required":true,"name":"provider","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^\\S+$","description":"Key of 1-128 characters without whitespace. A retry with the same key and request within 24 hours returns the first result instead of creating another item; the same key with a different request returns 409 conflict."},"required":false,"name":"idempotency-key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExternalFolderRequest"}}}},"responses":{"201":{"description":"The created folder.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalFile"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"402":{"description":"Payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"428":{"description":"Precondition required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"429":{"description":"Rate limit exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}}},"x-documentation-source-tag":"External Files","x-canonical-documentation":{"domain":"integrations","resource":"External storage","subgroup":"External Files","name":"Create external folder","description":"Create external folder.","operationId":"createExternalFolder"}}},"/projects/{project_reference}/external-files/{provider}/{file_id}/import":{"post":{"operationId":"importExternalFile","tags":["integrations/External storage/External Files"],"summary":"Import external file","description":"Import external file.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","enum":["onedrive","sharepoint","drive"],"description":"External file provider: `onedrive`, `sharepoint` or `drive` (Google Drive)."},"required":true,"name":"provider","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":1024,"description":"Provider item ID from listExternalFiles. Opaque; percent-encode it. Missing or inaccessible items return not_found."},"required":true,"name":"file_id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^\\S+$","description":"Key of 1-128 characters without whitespace. A retry with the same key and request within 24 hours returns the first result instead of creating another item; the same key with a different request returns 409 conflict."},"required":false,"name":"idempotency-key","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportExternalFileRequest"}}}},"responses":{"200":{"description":"The created upload and its source.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalFileImport"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"402":{"description":"Payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"428":{"description":"Precondition required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"429":{"description":"Rate limit exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ExternalFileProblem"}}}}},"x-documentation-source-tag":"External Files","x-canonical-documentation":{"domain":"integrations","resource":"External storage","subgroup":"External Files","name":"Import external file","description":"Import external file.","operationId":"importExternalFile"}}},"/projects/{project_reference}/knowledge/search":{"post":{"operationId":"searchKnowledge","tags":["knowledge/Documents/Project knowledge"],"summary":"Search knowledge files","description":"Search knowledge files.","parameters":[{"schema":{"type":"string","description":"Project whose knowledge is selected. Ordinary callers require project.knowledge.read. A run-bound MCP service credential instead must match the persisted run's project and agent plus its actor or runtime transport binding; its effective sealed authority must grant the invoked tool and a knowledge selector. On project-scoped MCP endpoints, the scoped project supplies this value when omitted."},"required":true,"description":"Project whose knowledge is selected. Ordinary callers require project.knowledge.read. A run-bound MCP service credential instead must match the persisted run's project and agent plus its actor or runtime transport binding; its effective sealed authority must grant the invoked tool and a knowledge selector. On project-scoped MCP endpoints, the scoped project supplies this value when omitted.","name":"project_reference","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","maxLength":500,"description":"Text to match against knowledge file paths and frontmatter. Omit query to list knowledge files."},"cursor":{"type":"string","minLength":1,"maxLength":13334,"description":"Opaque pagination token. Omit on the first request. To continue REST or MCP pagination, pass page_info.next from the previous response as cursor."},"lookup_target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["preview_branch"]},"branch_id":{"type":["string","null"],"format":"uuid","description":"Branch to search. Omit or use null for the main branch (the default)."}},"required":["kind"],"additionalProperties":false,"description":"Search a working branch, the default scope when lookup_target is omitted."},{"type":"object","properties":{"kind":{"type":"string","enum":["environment"]},"environment_id":{"type":"string","format":"uuid","description":"ID of the environment whose deployed release to search."},"environment_name":{"type":"string","minLength":1,"maxLength":255,"description":"Name of the environment (for example \"production\") whose deployed release to search."}},"required":["kind"],"additionalProperties":false,"description":"Search the release currently deployed to an environment. Provide environment_id or environment_name."},{"type":"object","properties":{"kind":{"type":"string","enum":["release"]},"release_id":{"type":"string","format":"uuid","description":"ID of the release to search."},"release_version":{"type":"string","minLength":1,"maxLength":255,"description":"Version string of the release to search."}},"required":["kind"],"additionalProperties":false,"description":"Search a specific published release. Provide release_id or release_version."}],"description":"Optional. Omit to search the main preview branch (the default). Set this to target another preview branch, a deployed environment, or a published release; unresolved targets are returned as not found."},"limit":{"type":"integer","minimum":1,"maximum":12},"shard_count":{"type":"integer","minimum":1,"maximum":8},"shard_index":{"type":"integer","minimum":0}},"additionalProperties":false}}}},"responses":{"200":{"description":"Ranked knowledge files and the next-page cursor.","content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","description":"Resolved query used for scoring."},"mode":{"type":"string","enum":["search","browse"],"description":"search when results scored positively; browse when no positive matches exist. Returns paths and metadata, falling back to a browse page when nothing matches."},"data":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Knowledge Markdown file path."},"matched_fields":{"type":"array","items":{"type":"string"},"description":"Matched fields. May include path and frontmatter keys, including keys not present in the returned preview."},"frontmatter":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Frontmatter key."},"value":{"type":"string","description":"Frontmatter value. Returned preview values may be truncated."}},"required":["key","value"]},"description":"Preview of prioritized frontmatter: at most six fields, with values truncated to 160 characters."}},"required":["path","matched_fields","frontmatter"]},"description":"Knowledge Markdown paths with frontmatter previews. Read selected files (MCP get_file) before answering knowledge questions."},"page_info":{"type":"object","properties":{"self":{"type":["string","null"],"description":"Cursor supplied on this request, if any."},"first":{"type":["object","null"],"enum":[null],"description":"Reserved; first-page cursor is not emitted."},"next":{"type":["string","null"],"description":"Opaque cursor for the next REST or MCP page, if more results are available."},"prev":{"type":["string","null"],"description":"Reserved; previous-page cursor is not emitted."}},"required":["self","first","next","prev"]},"returned":{"type":"integer","minimum":0},"total_matches":{"type":"integer","minimum":0},"shard":{"type":"object","properties":{"shard_index":{"type":"integer","minimum":0},"shard_count":{"type":"integer","minimum":1},"total_items":{"type":"integer","minimum":0}},"required":["shard_index","shard_count","total_items"],"description":"Shard metadata for this page. Optional sharding divides results between the selected shards."},"limit":{"type":"integer","minimum":1,"maximum":12,"description":"Page size used for this page. A cursor keeps the page size of the request that started the search."}},"required":["query","mode","data","page_info","returned","total_matches","shard","limit"]}}}},"400":{"description":"invalid_input: invalid query, limit, shard or cursor","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"unauthenticated","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"not_found: project or lookup_target not found or not visible","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"internal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project knowledge","x-canonical-documentation":{"domain":"knowledge","resource":"Documents","subgroup":"Project knowledge","name":"Search knowledge files","description":"Search knowledge files.","operationId":"searchKnowledge"}}},"/projects/{project_reference}/knowledge/catalog":{"post":{"operationId":"listKnowledgeCatalog","tags":["knowledge/Documents/Project knowledge"],"summary":"List knowledge files","description":"List knowledge files.","parameters":[{"schema":{"type":"string","description":"Project whose knowledge is selected. Ordinary callers require project.knowledge.read. A run-bound MCP service credential instead must match the persisted run's project and agent plus its actor or runtime transport binding; its effective sealed authority must grant the invoked tool and a knowledge selector. On project-scoped MCP endpoints, the scoped project supplies this value when omitted."},"required":true,"description":"Project whose knowledge is selected. Ordinary callers require project.knowledge.read. A run-bound MCP service credential instead must match the persisted run's project and agent plus its actor or runtime transport binding; its effective sealed authority must grant the invoked tool and a knowledge selector. On project-scoped MCP endpoints, the scoped project supplies this value when omitted.","name":"project_reference","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"lookup_target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["preview_branch"]},"branch_id":{"type":["string","null"],"format":"uuid","description":"Branch to search. Omit or use null for the main branch (the default)."}},"required":["kind"],"additionalProperties":false,"description":"Search a working branch, the default scope when lookup_target is omitted."},{"type":"object","properties":{"kind":{"type":"string","enum":["environment"]},"environment_id":{"type":"string","format":"uuid","description":"ID of the environment whose deployed release to search."},"environment_name":{"type":"string","minLength":1,"maxLength":255,"description":"Name of the environment (for example \"production\") whose deployed release to search."}},"required":["kind"],"additionalProperties":false,"description":"Search the release currently deployed to an environment. Provide environment_id or environment_name."},{"type":"object","properties":{"kind":{"type":"string","enum":["release"]},"release_id":{"type":"string","format":"uuid","description":"ID of the release to search."},"release_version":{"type":"string","minLength":1,"maxLength":255,"description":"Version string of the release to search."}},"required":["kind"],"additionalProperties":false,"description":"Search a specific published release. Provide release_id or release_version."}],"description":"Optional. Omit to search the main preview branch (the default). Set this to target another preview branch, a deployed environment, or a published release; unresolved targets are returned as not found."},"caller_selector":{"anyOf":[{"type":"boolean"},{"type":"string","minLength":1,"maxLength":4096},{"type":"array","items":{"type":"string","minLength":1,"maxLength":4096},"maxItems":1024},{"type":"object","additionalProperties":{"type":"boolean"}}],"description":"Caller-selected document scope. Source membership, persisted run knowledge policy and this selector are intersected before counting or paging. Results include visible knowledge Markdown files with title, type, tags and link counts. Accepts a boolean, a path pattern, a list of patterns, or a {pattern: boolean} map. Patterns are relative; at most 1024 entries."},"filters":{"type":"object","properties":{"search":{"type":"string","minLength":1,"maxLength":256,"description":"Case-insensitive title or path search within the authorized source."},"type":{"type":"string","minLength":1,"maxLength":128},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":64}},"additionalProperties":false},"pagination":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":100},"cursor":{"type":"string","minLength":1,"maxLength":2048}}}},"additionalProperties":false}}}},"responses":{"200":{"description":"Authorized knowledge catalog page.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"file_id":{"type":"string","format":"uuid"},"file_version_id":{"type":"string","format":"uuid"},"path":{"type":"string"},"title":{"type":["string","null"]},"type":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"reserved":{"type":"boolean"},"reserved_kind":{"type":["string","null"]},"malformed_reason":{"type":["string","null"]},"links":{"type":"object","properties":{"document_edges":{"type":"integer","minimum":0},"external_links":{"type":"integer","minimum":0},"broken_links":{"type":"integer","minimum":0}},"required":["document_edges","external_links","broken_links"]}},"required":["file_id","file_version_id","path","title","type","tags","reserved","reserved_kind","malformed_reason","links"]}},"total":{"type":"integer","minimum":0},"returned":{"type":"integer","minimum":0},"page_info":{"type":"object","properties":{"self":{"type":["string","null"],"description":"Cursor supplied on this request, if any."},"first":{"type":["object","null"],"enum":[null],"description":"Reserved; a first-page cursor is not emitted."},"next":{"type":["string","null"],"description":"Opaque cursor for the next page, or null on the last page."},"prev":{"type":["object","null"],"enum":[null],"description":"Reserved; a previous-page cursor is not emitted."}},"required":["self","first","next","prev"]}},"required":["data","total","returned","page_info"]}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project or content target not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project knowledge","x-canonical-documentation":{"domain":"knowledge","resource":"Documents","subgroup":"Project knowledge","name":"List knowledge files","description":"List knowledge files.","operationId":"listKnowledgeCatalog"}}},"/projects/{project_reference}/knowledge/graph":{"post":{"operationId":"getKnowledgeGraph","tags":["knowledge/Documents/Project knowledge"],"summary":"Get the knowledge graph","description":"Get knowledge graph.","parameters":[{"schema":{"type":"string","description":"Project whose knowledge is selected. Ordinary callers require project.knowledge.read. A run-bound MCP service credential instead must match the persisted run's project and agent plus its actor or runtime transport binding; its effective sealed authority must grant the invoked tool and a knowledge selector. On project-scoped MCP endpoints, the scoped project supplies this value when omitted."},"required":true,"description":"Project whose knowledge is selected. Ordinary callers require project.knowledge.read. A run-bound MCP service credential instead must match the persisted run's project and agent plus its actor or runtime transport binding; its effective sealed authority must grant the invoked tool and a knowledge selector. On project-scoped MCP endpoints, the scoped project supplies this value when omitted.","name":"project_reference","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"lookup_target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["preview_branch"]},"branch_id":{"type":["string","null"],"format":"uuid","description":"Branch to search. Omit or use null for the main branch (the default)."}},"required":["kind"],"additionalProperties":false,"description":"Search a working branch, the default scope when lookup_target is omitted."},{"type":"object","properties":{"kind":{"type":"string","enum":["environment"]},"environment_id":{"type":"string","format":"uuid","description":"ID of the environment whose deployed release to search."},"environment_name":{"type":"string","minLength":1,"maxLength":255,"description":"Name of the environment (for example \"production\") whose deployed release to search."}},"required":["kind"],"additionalProperties":false,"description":"Search the release currently deployed to an environment. Provide environment_id or environment_name."},{"type":"object","properties":{"kind":{"type":"string","enum":["release"]},"release_id":{"type":"string","format":"uuid","description":"ID of the release to search."},"release_version":{"type":"string","minLength":1,"maxLength":255,"description":"Version string of the release to search."}},"required":["kind"],"additionalProperties":false,"description":"Search a specific published release. Provide release_id or release_version."}],"description":"Optional. Omit to search the main preview branch (the default). Set this to target another preview branch, a deployed environment, or a published release; unresolved targets are returned as not found."},"caller_selector":{"anyOf":[{"type":"boolean"},{"type":"string","minLength":1,"maxLength":4096},{"type":"array","items":{"type":"string","minLength":1,"maxLength":4096},"maxItems":1024},{"type":"object","additionalProperties":{"type":"boolean"}}],"description":"Caller-selected document scope. Source membership and server-trusted knowledge policy are intersected with this selector before pagination; denied nodes, edges, broken-link labels and counts are filtered."},"root_file_version_id":{"type":"string","format":"uuid"},"root_path":{"type":"string","minLength":1,"maxLength":1024},"max_depth":{"type":"integer","minimum":0,"maximum":3,"description":"Link hops from the root, 0 to 3; omit the root to read the whole visible set. Responses over 512 KiB fail with a size limit (REST 413, MCP PAYLOAD_TOO_LARGE). Narrow the graph with root_path, max_depth, filters or pagination.limit (GraphQL rootPath, maxDepth, filters or pagination.limit)."},"filters":{"type":"object","properties":{"search":{"type":"string","minLength":1,"maxLength":256,"description":"Case-insensitive title or path search within the authorized source."},"type":{"type":"string","minLength":1,"maxLength":128},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":64}},"additionalProperties":false},"pagination":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":200},"cursor":{"type":"string","minLength":1,"maxLength":2048}}}},"additionalProperties":false}}}},"responses":{"200":{"description":"Authorized knowledge graph neighborhood.","content":{"application/json":{"schema":{"type":"object","properties":{"nodes":{"type":"array","items":{"type":"object","properties":{"file_id":{"type":"string","format":"uuid"},"file_version_id":{"type":"string","format":"uuid"},"path":{"type":"string"},"title":{"type":["string","null"]},"type":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"reserved":{"type":"boolean"}},"required":["file_id","file_version_id","path","title","type","tags","reserved"]},"maxItems":200,"description":"Visible knowledge files as nodes. Markdown document links are edges; external and broken links are returned separately. Use the graph to find related files."},"edges":{"type":"array","items":{"type":"object","properties":{"source_file_version_id":{"type":"string","format":"uuid"},"target_file_version_id":{"type":"string","format":"uuid"},"ordinal":{"type":"integer","minimum":0}},"required":["source_file_version_id","target_file_version_id","ordinal"]},"maxItems":2000},"external_links":{"type":"array","items":{"type":"object","properties":{"source_file_version_id":{"type":"string","format":"uuid"},"ordinal":{"type":"integer","minimum":0},"url":{"type":"string"}},"required":["source_file_version_id","ordinal","url"]},"maxItems":2000},"broken_links":{"type":"array","items":{"type":"object","properties":{"source_file_version_id":{"type":"string","format":"uuid"},"ordinal":{"type":"integer","minimum":0},"target_path":{"type":"string"}},"required":["source_file_version_id","ordinal","target_path"]},"maxItems":2000},"returned_nodes":{"type":"integer","minimum":0},"total_nodes":{"type":"integer","minimum":0},"partial":{"type":"boolean"},"links_truncated":{"type":"boolean","description":"True when the combined link count or byte budget omits links. The graph is partial."},"limit":{"type":"integer","minimum":1,"maximum":200},"page_info":{"type":"object","properties":{"self":{"type":["string","null"],"description":"Cursor supplied on this request, if any."},"first":{"type":["object","null"],"enum":[null],"description":"Reserved; a first-page cursor is not emitted."},"next":{"type":["string","null"],"description":"Opaque cursor for the next page, or null on the last page."},"prev":{"type":["object","null"],"enum":[null],"description":"Reserved; a previous-page cursor is not emitted."}},"required":["self","first","next","prev"]}},"required":["nodes","edges","external_links","broken_links","returned_nodes","total_nodes","partial","links_truncated","limit","page_info"]}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project or content target not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"The graph response exceeds 512 KiB","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project knowledge","x-canonical-documentation":{"domain":"knowledge","resource":"Documents","subgroup":"Project knowledge","name":"Get the knowledge graph","description":"Get knowledge graph.","operationId":"getKnowledgeGraph"}}},"/projects/{project_reference}/knowledge/index-status":{"post":{"operationId":"getProjectKnowledgeIndexStatus","tags":["knowledge/Documents/Project knowledge"],"summary":"Read authorized current knowledge index readiness","description":"Report index readiness for up to twenty authorized current knowledge paths, omitting missing or denied paths. Requires project.knowledge.read.","parameters":[{"schema":{"type":"string","description":"Project ID or slug."},"required":true,"name":"project_reference","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"paths":{"type":"array","items":{"type":"string","maxLength":4096},"minItems":1,"maxItems":20},"lookup_target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["preview_branch"]},"branch_id":{"type":["string","null"],"format":"uuid","description":"Branch to search. Omit or use null for the main branch (the default)."}},"required":["kind"],"additionalProperties":false,"description":"Search a working branch, the default scope when lookup_target is omitted."},{"type":"object","properties":{"kind":{"type":"string","enum":["environment"]},"environment_id":{"type":"string","format":"uuid","description":"ID of the environment whose deployed release to search."},"environment_name":{"type":"string","minLength":1,"maxLength":255,"description":"Name of the environment (for example \"production\") whose deployed release to search."}},"required":["kind"],"additionalProperties":false,"description":"Search the release currently deployed to an environment. Provide environment_id or environment_name."},{"type":"object","properties":{"kind":{"type":"string","enum":["release"]},"release_id":{"type":"string","format":"uuid","description":"ID of the release to search."},"release_version":{"type":"string","minLength":1,"maxLength":255,"description":"Version string of the release to search."}},"required":["kind"],"additionalProperties":false,"description":"Search a specific published release. Provide release_id or release_version."}],"description":"Optional. Omit to search the main preview branch (the default). Set this to target another preview branch, a deployed environment, or a published release; unresolved targets are returned as not found."}},"required":["paths"],"additionalProperties":false}}}},"responses":{"200":{"description":"Authorized immutable-version index status.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","maxLength":4096},"file_id":{"type":"string","format":"uuid"},"file_version_id":{"type":"string","format":"uuid"},"index_ready":{"type":"boolean"}},"required":["path","file_id","file_version_id","index_ready"]},"maxItems":20}},"required":["data"]}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project or content target not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project knowledge","x-canonical-documentation":{"domain":"knowledge","resource":"Documents","subgroup":"Project knowledge","name":"Read authorized current knowledge index readiness","description":"Report index readiness for up to twenty authorized current knowledge paths, omitting missing or denied paths. Requires project.knowledge.read.","operationId":"getProjectKnowledgeIndexStatus"}}},"/projects/{project_reference}/knowledge/retrieval-documents":{"get":{"operationId":"listRetrievalDocuments","tags":["knowledge/Documents/Retrieval documents"],"summary":"List retrieval documents","description":"List retrieval documents. Requires project.knowledge.read.","parameters":[{"schema":{"type":"string","description":"Project ID or slug. A project you cannot read is not_found. The MCP tool requires a signed-in user (a user session or user API key); service and agent-run credentials without a user are unauthenticated."},"required":true,"description":"Project ID or slug. A project you cannot read is not_found. The MCP tool requires a signed-in user (a user session or user API key); service and agent-run credentials without a user are unauthenticated.","name":"project_reference","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Records per page. Integer from 1 to 100; defaults to 20."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":2048,"description":"Opaque page_info.next from the previous page. A cursor this list did not issue returns 400."},"required":false,"description":"Opaque page_info.next from the previous page. A cursor this list did not issue is invalid_input.","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of retrieval documents.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Retrieval document ID."},"revision":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"Opaque revision of this record. Send it as expected_revision to update or delete exactly this version."},"title":{"type":"string","description":"Document title."},"source":{"type":"string","description":"Upstream source reference, such as a file path or URL; empty when not set."},"type":{"type":"string","description":"Document type label; empty when not set."},"metadata":{"type":"object","additionalProperties":{},"description":"Structured metadata stored with the record: an object of string keys to JSON values."},"created_at":{"type":"string","format":"date-time","description":"When the record was created (RFC 3339, UTC)."},"updated_at":{"type":"string","format":"date-time","description":"When the record last changed (RFC 3339, UTC)."}},"required":["id","revision","title","source","type","metadata","created_at","updated_at"]},"description":"Retrieval document records behind ragStore(), oldest first with ID as tie-breaker. Read the ID and current revision before updating or deleting. Follow the next cursor until null to read every record."},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"invalid_input: invalid limit or cursor","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"unauthenticated","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"not_found: project not found or not visible","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"internal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project documents","x-canonical-documentation":{"domain":"knowledge","resource":"Documents","subgroup":"Retrieval documents","name":"List retrieval documents","description":"List retrieval documents. Requires project.knowledge.read.","operationId":"listRetrievalDocuments"}},"post":{"operationId":"createRetrievalDocument","tags":["knowledge/Documents/Retrieval documents"],"summary":"Create a retrieval document","description":"Create retrieval document. Requires project.knowledge.write.","parameters":[{"schema":{"type":"string","description":"Project ID or slug."},"required":true,"name":"project_reference","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"description":"Document title, at least one character."},"source":{"type":"string","description":"Upstream source reference, such as a file path or URL. Defaults to \"\"."},"type":{"type":"string","description":"Document type label. Defaults to \"\"."},"metadata":{"type":"object","additionalProperties":{},"description":"Structured metadata stored with the record: an object of string keys to JSON values."},"id":{"type":"string","format":"uuid","description":"Caller-chosen record ID. Omit to let the API choose one. An ID that already exists is a conflict. Create the record before writing its chunks; use update to change an existing record."}},"required":["title"]}}}},"responses":{"201":{"description":"The created record with its first revision.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Retrieval document ID."},"revision":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"Opaque revision of this record. Send it as expected_revision to update or delete exactly this version."},"title":{"type":"string","description":"Document title."},"source":{"type":"string","description":"Upstream source reference, such as a file path or URL; empty when not set."},"type":{"type":"string","description":"Document type label; empty when not set."},"metadata":{"type":"object","additionalProperties":{},"description":"Structured metadata stored with the record: an object of string keys to JSON values."},"created_at":{"type":"string","format":"date-time","description":"When the record was created (RFC 3339, UTC)."},"updated_at":{"type":"string","format":"date-time","description":"When the record last changed (RFC 3339, UTC)."}},"required":["id","revision","title","source","type","metadata","created_at","updated_at"]}}}},"400":{"description":"invalid_input: invalid title, ID or metadata","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"unauthenticated","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"not_found: project not found or not visible","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"conflict: a record with this ID already exists","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"internal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project documents","x-canonical-documentation":{"domain":"knowledge","resource":"Documents","subgroup":"Retrieval documents","name":"Create a retrieval document","description":"Create retrieval document. Requires project.knowledge.write.","operationId":"createRetrievalDocument"}}},"/projects/{project_reference}/knowledge/retrieval-documents/{retrieval_document_id}":{"put":{"operationId":"updateRetrievalDocument","tags":["knowledge/Documents/Retrieval documents"],"summary":"Update a retrieval document","description":"Update retrieval document. Requires project.knowledge.write.","parameters":[{"schema":{"type":"string","description":"Project ID or slug."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Retrieval document ID."},"required":true,"description":"Retrieval document ID.","name":"retrieval_document_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"description":"Document title, at least one character."},"source":{"type":"string","description":"Upstream source reference, such as a file path or URL. Defaults to \"\"."},"type":{"type":"string","description":"Document type label. Defaults to \"\"."},"metadata":{"type":"object","additionalProperties":{},"description":"Structured metadata stored with the record: an object of string keys to JSON values."},"expected_revision":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"The revision you read. A changed record is a conflict; a missing record is not_found. Title, source, type and metadata are replaced, and the response includes the new revision."}},"required":["title","expected_revision"]}}}},"responses":{"200":{"description":"The updated record with its new revision.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Retrieval document ID."},"revision":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"Opaque revision of this record. Send it as expected_revision to update or delete exactly this version."},"title":{"type":"string","description":"Document title."},"source":{"type":"string","description":"Upstream source reference, such as a file path or URL; empty when not set."},"type":{"type":"string","description":"Document type label; empty when not set."},"metadata":{"type":"object","additionalProperties":{},"description":"Structured metadata stored with the record: an object of string keys to JSON values."},"created_at":{"type":"string","format":"date-time","description":"When the record was created (RFC 3339, UTC)."},"updated_at":{"type":"string","format":"date-time","description":"When the record last changed (RFC 3339, UTC)."}},"required":["id","revision","title","source","type","metadata","created_at","updated_at"]}}}},"400":{"description":"invalid_input: invalid title, metadata or expected_revision","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"unauthenticated","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"not_found: project or retrieval document not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"conflict: the record changed since expected_revision was read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"internal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project documents","x-canonical-documentation":{"domain":"knowledge","resource":"Documents","subgroup":"Retrieval documents","name":"Update a retrieval document","description":"Update retrieval document. Requires project.knowledge.write.","operationId":"updateRetrievalDocument"}},"delete":{"operationId":"deleteRetrievalDocument","tags":["knowledge/Documents/Retrieval documents"],"summary":"Delete a retrieval document","description":"Delete retrieval document. Requires project.knowledge.write; API keys also need delete scope.","parameters":[{"schema":{"type":"string","description":"Project ID or slug."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Retrieval document ID."},"required":true,"description":"Retrieval document ID.","name":"retrieval_document_id","in":"path"},{"schema":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"Delete only this observed revision. A changed record is a conflict; a missing record is not_found. Delete the record before removing its chunks, as ragStore().removeDocument() does, so a concurrent refresh cannot publish through a still-visible record."},"required":false,"description":"Delete only this observed revision. A changed record is a conflict; a missing record is not_found. Delete the record before removing its chunks, as ragStore().removeDocument() does, so a concurrent refresh cannot publish through a still-visible record.","name":"expected_revision","in":"query"}],"responses":{"200":{"description":"The record was deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"invalid_input: invalid ID or expected_revision","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"unauthenticated","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"forbidden: the credential lacks project.knowledge.write or the delete scope","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"not_found: project or retrieval document not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"conflict: the record changed since expected_revision was read","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"internal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project documents","x-canonical-documentation":{"domain":"knowledge","resource":"Documents","subgroup":"Retrieval documents","name":"Delete a retrieval document","description":"Delete retrieval document. Requires project.knowledge.write; API keys also need delete scope.","operationId":"deleteRetrievalDocument"}}},"/projects/{project_reference}/knowledge/assets/{asset_path}":{"get":{"operationId":"readKnowledgeBinaryCompanion","description":"Read a selected binary companion version. Requires project.files.read.","tags":["knowledge/Documents/Knowledge assets"],"summary":"Read binary companion","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string"},"required":true,"name":"asset_path","in":"path"},{"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","enum":["main"]}]},"required":false,"name":"branch_id","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"release_id","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"file_version_id","in":"query"},{"schema":{"type":"string","enum":["true"]},"required":false,"name":"historical","in":"query"},{"schema":{"type":"string","pattern":"^[a-f0-9]{64}$"},"required":true,"name":"content_hash","in":"query"}],"responses":{"200":{"description":"Verified selected version bytes.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project knowledge","x-canonical-documentation":{"domain":"knowledge","resource":"Documents","subgroup":"Knowledge assets","name":"Read binary companion","description":"Read a selected binary companion version. Requires project.files.read.","operationId":"readKnowledgeBinaryCompanion"}},"put":{"operationId":"publishKnowledgeBinaryCompanion","tags":["knowledge/Documents/Knowledge assets"],"description":"Publish verified binary companion bytes. Requires project.files.write.","summary":"Publish binary companion","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string"},"required":true,"name":"asset_path","in":"path"},{"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","enum":["main"]}]},"required":true,"name":"branch_id","in":"query"},{"schema":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 of exact raw bytes, lowercase hexadecimal."},"required":true,"description":"SHA-256 of exact raw bytes, lowercase hexadecimal.","name":"x-vf-content-sha256","in":"header"},{"schema":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[\\x20-\\x7e]+$","description":"Retained asset MIME type; defaults to application/octet-stream. The wire MIME remains application/octet-stream."},"required":false,"description":"Retained asset MIME type; defaults to application/octet-stream. The wire MIME remains application/octet-stream.","name":"x-vf-content-type","in":"header"},{"schema":{"type":"string","format":"uuid","description":"Current selected immutable file version. Mutually exclusive with expected-absent."},"required":false,"description":"Current selected immutable file version. Mutually exclusive with expected-absent.","name":"x-vf-expected-version-id","in":"header"},{"schema":{"type":"string","enum":["true"],"description":"Require no selected file. Mutually exclusive with expected-version-id."},"required":false,"description":"Require no selected file. Mutually exclusive with expected-version-id.","name":"x-vf-expected-absent","in":"header"}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"Verified immutable binary companion version.","content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","format":"uuid"},"file_version_id":{"type":"string","format":"uuid"},"path":{"type":"string"},"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"byte_size":{"type":"integer","minimum":0,"maximum":8388608},"content_type":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[\\x20-\\x7e]+$"}},"required":["file_id","file_version_id","path","content_hash","byte_size","content_type"],"additionalProperties":false}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project knowledge","x-canonical-documentation":{"domain":"knowledge","resource":"Documents","subgroup":"Knowledge assets","name":"Publish binary companion","description":"Publish verified binary companion bytes. Requires project.files.write.","operationId":"publishKnowledgeBinaryCompanion"}}},"/projects/{project_reference}/knowledge/bundles/export":{"get":{"operationId":"exportKnowledgeBundle","description":"Export version-bound text and binary source references. Requires project.files.read.","tags":["knowledge/Documents/Knowledge assets"],"summary":"Export knowledge bundle","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","enum":["main"]}]},"required":false,"name":"branch_id","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"release_id","in":"query"},{"schema":{"type":"string","maxLength":1024},"required":true,"name":"root_path","in":"query"}],"responses":{"200":{"description":"Version-bound mixed source manifest.","content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string","format":"uuid"},"root_path":{"type":"string"},"selector":{"type":"object","properties":{"type":{"type":"string","enum":["preview_branch","main_branch","release"]},"id":{"type":"string","format":"uuid"}},"required":["type","id"]},"file_count":{"type":"integer","minimum":0},"total_bytes":{"type":"integer","minimum":0},"files":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"file_id":{"type":"string","format":"uuid"},"file_version_id":{"type":"string","format":"uuid"},"path":{"type":"string"},"kind":{"type":"string","enum":["text"]},"content":{"type":"string"},"byte_size":{"type":"integer","minimum":0},"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["file_id","file_version_id","path","kind","content","byte_size","content_hash"]},{"type":"object","properties":{"file_id":{"type":"string","format":"uuid"},"file_version_id":{"type":"string","format":"uuid"},"path":{"type":"string"},"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"byte_size":{"type":"integer","minimum":0,"maximum":8388608},"content_type":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[\\x20-\\x7e]+$"},"kind":{"type":"string","enum":["binary"]},"content_path":{"type":"string"}},"required":["file_id","file_version_id","path","content_hash","byte_size","content_type","kind","content_path"],"additionalProperties":false}]}}},"required":["project_id","root_path","selector","file_count","total_bytes","files"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project knowledge","x-canonical-documentation":{"domain":"knowledge","resource":"Documents","subgroup":"Knowledge assets","name":"Export knowledge bundle","description":"Export version-bound text and binary source references. Requires project.files.read.","operationId":"exportKnowledgeBundle"}}},"/projects/{project_reference}/branches/{branchName}/search":{"post":{"operationId":"searchBranchContent","tags":["knowledge/Search/Search"],"summary":"Search branch files","description":"Search branch files. Requires project.files.read.","parameters":[{"schema":{"type":"string","description":"Project ID, slug, or domain from the authenticated context."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","description":"Branch name or ID. Use `main` to search the default project state."},"required":true,"name":"branchName","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentSearchBody"}}}},"responses":{"200":{"description":"Search results. Searches branch content using a precomputed embedding vector.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentSearchResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Vector search","x-canonical-documentation":{"domain":"knowledge","resource":"Search","subgroup":"Search","name":"Search branch files","description":"Search branch files. Requires project.files.read.","operationId":"searchBranchContent"}}},"/projects/{project_reference}/environments/{environmentName}/search":{"post":{"operationId":"searchEnvironmentContent","tags":["knowledge/Search/Search"],"summary":"Search environment files","description":"Search environment files. Requires project.files.read.","parameters":[{"schema":{"type":"string","description":"Project ID, slug, or domain from the authenticated context."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Exact environment name from the route."},"required":true,"name":"environmentName","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentSearchBody"}}}},"responses":{"200":{"description":"Searches the named environment deployment using a precomputed embedding vector. A deployed environment with no release yields no results; an environment that does not exist for the project is not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentSearchResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Vector search","x-canonical-documentation":{"domain":"knowledge","resource":"Search","subgroup":"Search","name":"Search environment files","description":"Search environment files. Requires project.files.read.","operationId":"searchEnvironmentContent"}}},"/projects/{project_reference}/releases/{version}/search":{"post":{"operationId":"searchReleaseContent","tags":["knowledge/Search/Search"],"summary":"Search release files","description":"Search release files. Requires project.files.read.","parameters":[{"schema":{"type":"string","description":"Project ID, slug, or domain from the authenticated context."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","description":"Release version to search."},"required":true,"name":"version","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentSearchBody"}}}},"responses":{"200":{"description":"Search results.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentSearchResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Vector search","x-canonical-documentation":{"domain":"knowledge","resource":"Search","subgroup":"Search","name":"Search release files","description":"Search release files. Requires project.files.read.","operationId":"searchReleaseContent"}}},"/projects/{project_reference}/embeddings":{"get":{"operationId":"listEmbeddings","tags":["knowledge/Embeddings/Project embeddings"],"summary":"List embeddings","description":"List embeddings. Requires project.knowledge.read.","parameters":[{"schema":{"type":"string","description":"Project ID or slug."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","enum":["PREVIEW","PRODUCTION","RELEASE"],"description":"Deployment index to read. Omit all scope selectors for project-wide stored embeddings, including branch, release, historical, and legacy indexes. PREVIEW explicitly selects current main or the selected branch."},"required":false,"description":"Deployment index to read. Omit all scope selectors for project-wide stored embeddings, including branch, release, historical, and legacy indexes. PREVIEW explicitly selects current main or the selected branch.","name":"environment","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Select a current preview branch. Use null to explicitly select current main; when PREVIEW is set, an omitted branch also selects main."},"required":false,"description":"Select a current preview branch. Use null to explicitly select current main; when PREVIEW is set, an omitted branch also selects main.","name":"branch_id","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Select a frozen release by ID. RELEASE is inferred when environment is omitted."},"required":false,"description":"Select a frozen release by ID. RELEASE is inferred when environment is omitted.","name":"release_id","in":"query"},{"schema":{"type":"string","description":"Select a frozen release by version when no release ID is supplied. RELEASE is inferred when environment is omitted."},"required":false,"description":"Select a frozen release by version when no release ID is supplied. RELEASE is inferred when environment is omitted.","name":"release_version","in":"query"},{"schema":{"type":"string","enum":["768","1024","1536","3072","4096"],"description":"Vector dimension: 768, 1024, 1536, 3072, or 4096."},"required":true,"description":"Vector dimension: 768, 1024, 1536, 3072, or 4096.","name":"dimension","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":100,"description":"Maximum embeddings to return."},"required":false,"description":"Maximum embeddings to return.","name":"limit","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0,"description":"Result offset."},"required":false,"description":"Result offset.","name":"offset","in":"query"},{"schema":{"type":"string","enum":["created_at"],"default":"created_at","description":"Sort field. Defaults to \"created_at\"."},"required":false,"description":"Sort field. Defaults to \"created_at\".","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort order. Defaults to \"desc\"."},"required":false,"description":"Sort order. Defaults to \"desc\".","name":"sort_order","in":"query"}],"responses":{"200":{"description":"List of embeddings.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Embedding ID."},"chunk_id":{"type":"string","description":"File chunk ID associated with the embedding."},"file_path":{"type":["string","null"],"description":"Source file path for the chunk, or null when unavailable."},"model_name":{"type":"string","description":"Embedding model name."},"model_provider":{"type":"string","description":"Embedding provider name."},"status":{"type":"string","enum":["ready","stale","missing"],"description":"Embedding lifecycle status."},"created_at":{"type":"string","description":"Embedding creation timestamp in ISO 8601 format."}},"required":["id","chunk_id","file_path","model_name","model_provider","status","created_at"]},"description":"Embedding summaries for the project."},"total":{"type":"number","description":"Total matching embeddings."},"limit":{"type":"number","description":"Page size used for the query."},"offset":{"type":"number","description":"Offset used for the query."}},"required":["data","total","limit","offset"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project embeddings","x-canonical-documentation":{"domain":"knowledge","resource":"Embeddings","subgroup":"Project embeddings","name":"List embeddings","description":"List embeddings. Requires project.knowledge.read.","operationId":"listEmbeddings"}},"post":{"operationId":"upsertEmbeddings","tags":["knowledge/Embeddings/Project embeddings"],"summary":"Upsert embeddings","description":"Upsert embeddings. Requires project.knowledge.write.","parameters":[{"schema":{"type":"string","description":"Project ID or slug."},"required":true,"name":"project_reference","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"chunk_ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":100,"description":"Chunk IDs to upsert embeddings for."},"vectors":{"type":"array","items":{"type":"array","items":{"type":"number"},"maxItems":4096},"maxItems":100,"description":"Embedding vectors aligned by index with `chunk_ids`."},"model":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Model name, for example `text-embedding-3-small`."},"provider":{"type":"string","minLength":1,"description":"Provider name, for example `openai`."},"dimension":{"type":["number","null"],"description":"Embedding vector dimension: 768, 1024, 1536, 3072, or 4096. Every vector must have this length."}},"required":["name","provider","dimension"],"description":"Embedding model that produced these vectors. Not an agent chat model; model listings omit it."}},"required":["chunk_ids","vectors","model"]}}}},"responses":{"200":{"description":"Upsert results. Stores embeddings generated by clients for project file chunks.","content":{"application/json":{"schema":{"type":"object","properties":{"embeddings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Embedding ID."},"model":{"type":"string","description":"Embedding model name used to create the vector."},"status":{"type":"string","enum":["ready","stale","missing"],"description":"Embedding lifecycle status."},"created_at":{"type":"string","description":"Embedding creation timestamp in ISO 8601 format."}},"required":["id","model","status","created_at"]},"description":"Embeddings that were created or updated."},"created":{"type":"number","description":"Number of embeddings created."},"updated":{"type":"number","description":"Number of embeddings updated."}},"required":["embeddings","created","updated"]}}}},"400":{"description":"Invalid request.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project embeddings","x-canonical-documentation":{"domain":"knowledge","resource":"Embeddings","subgroup":"Project embeddings","name":"Upsert embeddings","description":"Upsert embeddings. Requires project.knowledge.write.","operationId":"upsertEmbeddings"}}},"/projects/{project_reference}/embeddings/{chunkId}":{"get":{"operationId":"getChunkEmbedding","tags":["knowledge/Embeddings/Project embeddings"],"summary":"Get embedding","description":"Return a chunk embedding. Requires project.knowledge.read.","parameters":[{"schema":{"type":"string","description":"Project ID or slug."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Chunk ID."},"required":true,"name":"chunkId","in":"path"},{"schema":{"type":"string","enum":["PREVIEW","PRODUCTION","RELEASE"],"description":"Deployment index to read. Omit all scope selectors for project-wide stored embeddings, including branch, release, historical, and legacy indexes. PREVIEW explicitly selects current main or the selected branch."},"required":false,"description":"Deployment index to read. Omit all scope selectors for project-wide stored embeddings, including branch, release, historical, and legacy indexes. PREVIEW explicitly selects current main or the selected branch.","name":"environment","in":"query"},{"schema":{"type":["string","null"],"format":"uuid","description":"Select a current preview branch. Use null to explicitly select current main; when PREVIEW is set, an omitted branch also selects main."},"required":false,"description":"Select a current preview branch. Use null to explicitly select current main; when PREVIEW is set, an omitted branch also selects main.","name":"branch_id","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Select a frozen release by ID. RELEASE is inferred when environment is omitted."},"required":false,"description":"Select a frozen release by ID. RELEASE is inferred when environment is omitted.","name":"release_id","in":"query"},{"schema":{"type":"string","description":"Select a frozen release by version when no release ID is supplied. RELEASE is inferred when environment is omitted."},"required":false,"description":"Select a frozen release by version when no release ID is supplied. RELEASE is inferred when environment is omitted.","name":"release_version","in":"query"},{"schema":{"type":"string","enum":["768","1024","1536","3072","4096"],"description":"Vector dimension to retrieve."},"required":true,"description":"Vector dimension to retrieve.","name":"dimension","in":"query"},{"schema":{"type":"boolean","default":true,"description":"Include raw vector data. Defaults to true."},"required":false,"name":"include_vector","in":"query"}],"responses":{"200":{"description":"Embedding metadata and optionally the vector for a specific chunk.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Embedding ID."},"chunk_id":{"type":"string","description":"File chunk ID associated with the embedding."},"model":{"type":"object","properties":{"name":{"type":"string","description":"Embedding model name."},"provider":{"type":"string","description":"Embedding provider name."},"dimension":{"type":"number","description":"Embedding vector dimension."}},"required":["name","provider","dimension"],"description":"Embedding model that produced the vector. Not an agent chat model."},"status":{"type":"string","enum":["ready","stale","missing"],"description":"Embedding lifecycle status."},"vector":{"type":"array","items":{"type":"number"},"description":"Raw embedding vector when requested."},"created_at":{"type":"string","description":"Embedding creation timestamp in ISO 8601 format."}},"required":["id","chunk_id","model","status","created_at"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Chunk or embedding not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project embeddings","x-canonical-documentation":{"domain":"knowledge","resource":"Embeddings","subgroup":"Project embeddings","name":"Get embedding","description":"Return a chunk embedding. Requires project.knowledge.read.","operationId":"getChunkEmbedding"}},"delete":{"operationId":"deleteChunkEmbedding","tags":["knowledge/Embeddings/Project embeddings"],"summary":"Delete embedding","description":"Delete a chunk embedding. Requires project.knowledge.write; API keys also need delete scope.","parameters":[{"schema":{"type":"string","description":"Project ID or slug."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Chunk ID."},"required":true,"name":"chunkId","in":"path"},{"schema":{"type":"string","enum":["768","1024","1536","3072","4096"],"description":"Vector dimension to delete."},"required":true,"description":"Vector dimension to delete.","name":"dimension","in":"query"}],"responses":{"200":{"description":"Delete result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project embeddings","x-canonical-documentation":{"domain":"knowledge","resource":"Embeddings","subgroup":"Project embeddings","name":"Delete embedding","description":"Delete a chunk embedding. Requires project.knowledge.write; API keys also need delete scope.","operationId":"deleteChunkEmbedding"}}},"/projects/{project_reference}/releases":{"get":{"operationId":"listReleases","tags":["deployments/Releases/Releases"],"summary":"List releases","description":"List releases. Requires project.releases.read.","parameters":[{"schema":{"type":"string","description":"Project slug, ID, or other supported project reference."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","description":"Cursor for pagination (release ID)."},"required":false,"description":"Cursor for pagination (release ID).","name":"cursor","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20,"description":"Maximum number of releases to return. Defaults to 20 and is capped at 100."},"required":false,"description":"Maximum number of releases to return. Defaults to 20 and is capped at 100.","name":"limit","in":"query"},{"schema":{"type":"string","enum":["created_at","version","status"],"default":"created_at","description":"Sort field. Defaults to \"created_at\". The \"status\" field sorts by deploy_status."},"required":false,"description":"Sort field. Defaults to \"created_at\". The \"status\" field sorts by deploy_status.","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort order. Defaults to \"desc\"."},"required":false,"description":"Sort order. Defaults to \"desc\".","name":"sort_order","in":"query"}],"responses":{"200":{"description":"Paginated list of releases","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Release"}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Releases","x-canonical-documentation":{"domain":"deployments","resource":"Releases","subgroup":"Releases","name":"List releases","description":"List releases. Requires project.releases.read.","operationId":"listReleases"}},"post":{"operationId":"createRelease","tags":["deployments/Releases/Releases"],"summary":"Create release","description":"Create a release. Requires project.releases.write.","parameters":[{"schema":{"type":"string","description":"Project slug, ID, or other supported project reference."},"required":true,"name":"project_reference","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name for the release. Auto-generated when omitted."},"branch_reference":{"type":"string","description":"Branch ID or branch name. When omitted, creates the release from the main branch."}}},"example":{"name":"v1.0.0"}}}},"responses":{"201":{"description":"Release created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Release"}}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Releases","x-canonical-documentation":{"domain":"deployments","resource":"Releases","subgroup":"Releases","name":"Create release","description":"Create a release. Requires project.releases.write.","operationId":"createRelease"}}},"/projects/{project_reference}/releases/latest":{"get":{"operationId":"getLatestRelease","tags":["deployments/Releases/Releases"],"summary":"Get latest release","description":"Get the latest release. Requires project.releases.read.","parameters":[{"schema":{"type":"string","description":"Project slug, ID, or other supported project reference."},"required":true,"name":"project_reference","in":"path"}],"responses":{"200":{"description":"Latest release found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Release"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No releases found for this project","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Releases","x-canonical-documentation":{"domain":"deployments","resource":"Releases","subgroup":"Releases","name":"Get latest release","description":"Get the latest release. Requires project.releases.read.","operationId":"getLatestRelease"}}},"/projects/{project_reference}/releases/{release_reference}":{"get":{"operationId":"getRelease","tags":["deployments/Releases/Releases"],"summary":"Get release","description":"Get a release. Requires project.releases.read.","parameters":[{"schema":{"type":"string","description":"Project slug, ID, or other supported project reference."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Release ID, `latest`, or a version specifier: \"1.2.3\" for exact, \"1.2\" for the newest 1.2.x, \"1\" for the newest 1.x.x.","example":"1.2.3"},"required":true,"name":"release_reference","in":"path"}],"responses":{"200":{"description":"Release found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Release"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Release not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Releases","x-canonical-documentation":{"domain":"deployments","resource":"Releases","subgroup":"Releases","name":"Get release","description":"Get a release. Requires project.releases.read.","operationId":"getRelease"}},"delete":{"operationId":"deleteRelease","tags":["deployments/Releases/Releases"],"summary":"Delete release","description":"Delete a release. Requires project.releases.write; API keys also need delete scope.","parameters":[{"schema":{"type":"string","description":"Project slug, ID, or other supported project reference."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Release ID."},"required":true,"description":"Release ID.","name":"release_reference","in":"path"}],"responses":{"200":{"description":"Release deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Release not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Releases","x-canonical-documentation":{"domain":"deployments","resource":"Releases","subgroup":"Releases","name":"Delete release","description":"Delete a release. Requires project.releases.write; API keys also need delete scope.","operationId":"deleteRelease"}}},"/projects/{project_reference}/releases/{release_id}/source-manifest":{"get":{"operationId":"getReleaseSourceManifest","tags":["deployments/Releases/Release Source Manifests"],"summary":"Export release source","description":"Export release source, which requires project.files.read and server-function source access.","parameters":[{"schema":{"type":"string","description":"Project slug, ID, or other supported project reference."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"release_id","in":"path"},{"schema":{"type":"string","enum":["native"]},"required":false,"name":"representation","in":"query"}],"responses":{"200":{"description":"Complete bounded release source manifest, returned only to callers allowed to read server-function source. Default representation is unchanged UTF-8 v1; representation=native preserves mixed text and binary files as v2 with canonical base64 raw bytes. Version two requires at least one binary file; empty and all-text native responses retain exact v1 identity. Requires an exact release UUID, never a mutable alias. Limits: 10000 files, 64 MiB raw total, 8 MiB per file, 1024 UTF-8 bytes and 64 components per path, 10000 distinct directories and 96 MiB encoded JSON. Paths are NFC relative paths without traversal, reserved characters, trailing dots/spaces, device names or case-insensitive file/directory collisions. Source identity excludes mutable metadata; it is not execution authority or a compiled artifact.","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"project_id":{"type":"string","format":"uuid"},"release_id":{"type":"string","format":"uuid"},"manifest_version":{"type":"number","enum":[1]},"manifest_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"file_count":{"type":"integer","minimum":0,"maximum":10000},"total_bytes":{"type":"integer","minimum":0,"maximum":67108864},"files":{"type":"array","items":{"type":"object","properties":{"version_id":{"type":"string","format":"uuid"},"path":{"type":"string","minLength":1,"maxLength":1024},"entity_type":{"type":"string","enum":["page","component","function","virtual_file"]},"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"byte_size":{"type":"integer","minimum":0,"maximum":8388608},"content":{"type":"string"}},"required":["version_id","path","entity_type","content_hash","byte_size","content"],"additionalProperties":false},"maxItems":10000}},"required":["project_id","release_id","manifest_version","manifest_hash","file_count","total_bytes","files"],"additionalProperties":false},{"type":"object","properties":{"project_id":{"type":"string","format":"uuid"},"release_id":{"type":"string","format":"uuid"},"manifest_version":{"type":"number","enum":[2]},"manifest_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"file_count":{"type":"integer","minimum":0,"maximum":10000},"total_bytes":{"type":"integer","minimum":0,"maximum":67108864},"files":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"version_id":{"type":"string","format":"uuid"},"path":{"type":"string","minLength":1,"maxLength":1024},"entity_type":{"type":"string","enum":["page","component","function","virtual_file"]},"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"byte_size":{"type":"integer","minimum":0,"maximum":8388608},"kind":{"type":"string","enum":["text"]},"content":{"type":"string"}},"required":["version_id","path","entity_type","content_hash","byte_size","kind","content"],"additionalProperties":false},{"type":"object","properties":{"version_id":{"type":"string","format":"uuid"},"path":{"type":"string","minLength":1,"maxLength":1024},"entity_type":{"type":"string","enum":["page","component","function","virtual_file"]},"content_hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"byte_size":{"type":"integer","minimum":0,"maximum":8388608},"kind":{"type":"string","enum":["binary"]},"content_type":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[\\x20-\\x7e]+$"},"content_base64":{"type":"string","maxLength":11184812}},"required":["version_id","path","entity_type","content_hash","byte_size","kind","content_type","content_base64"],"additionalProperties":false}]},"minItems":1,"maxItems":10000}},"required":["project_id","release_id","manifest_version","manifest_hash","file_count","total_bytes","files"],"additionalProperties":false}]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Release Source Manifests","x-canonical-documentation":{"domain":"deployments","resource":"Releases","subgroup":"Release Source Manifests","name":"Export release source","description":"Export release source, which requires project.files.read and server-function source access.","operationId":"getReleaseSourceManifest"}}},"/projects/{project_reference}/deployments":{"get":{"operationId":"listDeployments","tags":["deployments/Deployments/Project deployments"],"summary":"List deployments","description":"List deployments. Requires project.deployments.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"environment_id","in":"query"},{"schema":{"type":"string","description":"Cursor for pagination (deployment ID)"},"required":false,"name":"cursor","in":"query"},{"$ref":"#/components/parameters/PaginationLimit"},{"schema":{"type":"string","enum":["created_at"],"default":"created_at","description":"Sort field. Defaults to \"created_at\"."},"required":false,"name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort order. Defaults to \"desc\"."},"required":false,"name":"sort_order","in":"query"}],"responses":{"200":{"description":"Paginated list of deployments","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"release_id":{"type":"string","format":"uuid"},"environment_id":{"type":"string","format":"uuid"},"user_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","release_id","environment_id"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project deployments","x-canonical-documentation":{"domain":"deployments","resource":"Deployments","subgroup":"Project deployments","name":"List deployments","description":"List deployments. Requires project.deployments.read.","operationId":"listDeployments"}},"post":{"operationId":"createDeployment","tags":["deployments/Deployments/Project deployments"],"summary":"Create deployment","description":"Create a deployment. Requires project.deploy.execute.","parameters":[{"$ref":"#/components/parameters/ProjectReference"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"release_id":{"type":"string","format":"uuid","description":"UUID of the release to deploy"},"environment_id":{"type":"string","format":"uuid","description":"UUID of the target environment"}},"required":["release_id","environment_id"]},"example":{"release_id":"550e8400-e29b-41d4-a716-446655440000","environment_id":"660e8400-e29b-41d4-a716-446655440000"}}}},"responses":{"201":{"description":"Deployment created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"release_id":{"type":"string","format":"uuid"},"environment_id":{"type":"string","format":"uuid"},"user_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","release_id","environment_id"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project deployments","x-canonical-documentation":{"domain":"deployments","resource":"Deployments","subgroup":"Project deployments","name":"Create deployment","description":"Create a deployment. Requires project.deploy.execute.","operationId":"createDeployment"}}},"/projects/{project_reference}/deployments/{deployment_id}":{"get":{"operationId":"getDeployment","tags":["deployments/Deployments/Project deployments"],"summary":"Get deployment","description":"Get a deployment. Requires project.deployments.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"uuid","description":"Deployment ID"},"required":true,"description":"Deployment ID","name":"deployment_id","in":"path"}],"responses":{"200":{"description":"Deployment found","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"release_id":{"type":"string","format":"uuid"},"environment_id":{"type":"string","format":"uuid"},"user_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","release_id","environment_id"]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project deployments","x-canonical-documentation":{"domain":"deployments","resource":"Deployments","subgroup":"Project deployments","name":"Get deployment","description":"Get a deployment. Requires project.deployments.read.","operationId":"getDeployment"}},"delete":{"operationId":"deleteDeployment","tags":["deployments/Deployments/Project deployments"],"summary":"Delete deployment","description":"Delete a deployment. Requires project.deployments.write; API keys also need delete scope.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"uuid","description":"Deployment ID"},"required":true,"description":"Deployment ID","name":"deployment_id","in":"path"}],"responses":{"200":{"description":"Deployment deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project deployments","x-canonical-documentation":{"domain":"deployments","resource":"Deployments","subgroup":"Project deployments","name":"Delete deployment","description":"Delete a deployment. Requires project.deployments.write; API keys also need delete scope.","operationId":"deleteDeployment"}}},"/projects/{project_reference}/dependencies/history":{"get":{"operationId":"getProjectDependencyHistory","tags":["deployments/Artifacts/Dependencies"],"summary":"Get dependency history","description":"Return dependency history. Requires project.files.read.","parameters":[{"schema":{"type":"string","description":"Project UUID or slug, or the project domain."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Branch name or UUID, 1–255 characters without surrounding whitespace. Omit for main."},"required":false,"description":"Branch name or UUID, 1–255 characters without surrounding whitespace. Omit for main.","name":"branch","in":"query"}],"responses":{"200":{"description":"Dependency history.","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"number","enum":[1],"description":"Dependency history schema version; always 1."},"project_id":{"type":"string","format":"uuid","description":"Canonical project UUID whose dependency history was read."},"branch":{"type":["string","null"],"description":"Requested branch reference, or null for the main branch."},"entries":{"type":"array","items":{"type":"object","properties":{"dependencies":{"type":"object","description":"Object mapping package names to raw string declarations captured around guarded package.json mutations.","additionalProperties":{"type":"string"}},"expires_at":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Expiry as Unix epoch milliseconds, expressed as a positive safe integer. Only unexpired snapshots are returned; retention is at most 23 hours 59 minutes from capture."}},"required":["dependencies","expires_at"]},"maxItems":16,"description":"At most 16 recent unexpired raw dependency declaration snapshots captured around guarded package.json changes. Use these snapshots to recover previous declarations. The complete JSON response is bounded to 1 MiB and never truncated."}},"required":["version","project_id","branch","entries"]}}}},"400":{"description":"Invalid branch reference","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden — project.files.read capability required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project or branch not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Dependency history exceeds the 1 MiB response limit","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Dependencies","x-canonical-documentation":{"domain":"deployments","resource":"Artifacts","subgroup":"Dependencies","name":"Get dependency history","description":"Return dependency history. Requires project.files.read.","operationId":"getProjectDependencyHistory"}}},"/projects/{project_reference}/dependencies/resolve":{"post":{"operationId":"resolveProjectDependencies","tags":["deployments/Artifacts/Dependencies"],"summary":"Resolve and pin dependencies","description":"Resolve dependency pins. Requires project.files.write.","parameters":[{"schema":{"type":"string","description":"Project UUID or slug, or the project domain."},"required":true,"name":"project_reference","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"specifiers":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":100,"description":"npm package specifiers to pin in package.json after adding imports or packages. Inline exact versions are used as-is; ranges and bare names resolve against the npm registry (cached in Redis). Existing exact pins are never overwritten. Each entry may be a bare name, a name with an inline exact version, or a name with a semver range (for example, \"react\", \"got@12.6.1\", \"zod@^3\", \"@radix-ui/react-dialog\").","example":["styled-components","@radix-ui/react-dialog","got@12.6.1","zod@^3"]},"branch":{"type":"string","minLength":1,"maxLength":255,"description":"Branch name or UUID, 1–255 characters without surrounding whitespace. Omit for main; selected package.json receives the resolved pins.","example":"feature-a"},"expected_declarations":{"type":"object","description":"Package declarations observed by the caller, at most 100 entries with string values up to 200 characters. A null value means the package was absent. When supplied, every requested package must be present and stale declarations are not overwritten.","additionalProperties":{"type":["string","null"],"maxLength":200},"example":{"styled-components":"^6","got":null}}},"required":["specifiers"]}}}},"responses":{"200":{"description":"Dependency resolution result.","content":{"application/json":{"schema":{"type":"object","properties":{"pins":{"type":"object","description":"Successfully resolved exact pins, including existing pins. Existing exact pins remain unchanged. Unknown packages and registry failures are omitted without failing the batch. A requested package absent from both pins and skipped was not resolved or written.","additionalProperties":{"type":"string"},"example":{"styled-components":"6.3.5","got":"12.6.1","zod":"3.23.8"}},"persisted":{"type":"boolean","description":"True when eligible pins were persisted or no eligible write was needed. False means persistence failed; pins retain intended values for retry."},"skipped":{"type":"object","description":"Packages skipped because their current declaration differs from the supplied snapshot. The skip reason is declaration_changed.","additionalProperties":{"type":"string","enum":["declaration_changed"]},"example":{"zod":"declaration_changed"}}},"required":["pins","persisted","skipped"]}}}},"400":{"description":"Invalid specifier syntax or batch size exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden — project.files.write capability required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project or branch not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Dependencies","x-canonical-documentation":{"domain":"deployments","resource":"Artifacts","subgroup":"Dependencies","name":"Resolve and pin dependencies","description":"Resolve dependency pins. Requires project.files.write.","operationId":"resolveProjectDependencies"}}},"/projects/{project_reference}/releases/{release_reference}/asset-manifest":{"get":{"operationId":"getReleaseAssetManifest","tags":["deployments/Artifacts/Release Asset Manifests"],"summary":"Get release asset manifest","description":"Return release manifest. Requires project.files.read.","parameters":[{"schema":{"type":"string","description":"Project slug, ID, or other supported project reference."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","description":"Release ID or version specifier (for example, \"1.2.3\", or \"1.2\" for the newest 1.2.x).","example":"1.2.3"},"required":true,"name":"release_reference","in":"path"}],"responses":{"200":{"description":"Manifest state and version, with the manifest body when ready","content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","enum":["queued","building","partial","ready","failed","superseded"]},"manifest_version":{"type":"integer"},"manifest":{"type":["object","null"],"additionalProperties":{}}},"required":["state","manifest_version","manifest"]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing permission to read the project files","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project, release, or manifest not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Release Asset Manifests","x-canonical-documentation":{"domain":"deployments","resource":"Artifacts","subgroup":"Release Asset Manifests","name":"Get release asset manifest","description":"Return release manifest. Requires project.files.read.","operationId":"getReleaseAssetManifest"}},"put":{"operationId":"writeReleaseAssetManifest","tags":["deployments/Artifacts/Release Asset Manifests"],"summary":"Write release asset manifest","description":"Store release manifest. Requires project.files.write.","parameters":[{"schema":{"type":"string","description":"Project slug, ID, or other supported project reference."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","description":"Release ID or version specifier (for example, \"1.2.3\", or \"1.2\" for the newest 1.2.x).","example":"1.2.3"},"required":true,"name":"release_reference","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[2]},"projectId":{"type":"string","format":"uuid"},"releaseId":{"type":"string","format":"uuid"},"releaseVersion":{"type":"integer"},"manifestVersion":{"type":"integer"},"builderVersion":{"type":"string"},"sourceContentHash":{"type":"string"},"createdAt":{"type":"string"},"assetBasePath":{"type":"string"},"modules":{"type":"object","additionalProperties":{"type":"object","properties":{"contentHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"size":{"type":"integer","minimum":0},"contentType":{"type":"string"}},"required":["contentHash","size","contentType"]}},"css":{"type":"array","items":{"type":"object","properties":{"contentHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"size":{"type":"integer","minimum":0},"contentType":{"type":"string"},"styleProfileHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"cssPipelineIdentity":{"type":"string","minLength":1,"maxLength":2048}},"required":["contentHash","size","contentType","styleProfileHash","cssPipelineIdentity"]}},"routes":{"type":"object","additionalProperties":{"type":"object","properties":{"modules":{"type":"array","items":{"type":"string"}},"css":{"type":"array","items":{"type":"string"}}},"required":["modules","css"]}},"dependencyMode":{"type":"string","enum":["source","immutable"]},"dependencies":{"type":"object","additionalProperties":{"type":"object","properties":{"contentHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"size":{"type":"integer","minimum":0},"contentType":{"type":"string"}},"required":["contentHash","size","contentType"]}}},"required":["schemaVersion","projectId","releaseId","releaseVersion","manifestVersion","builderVersion","sourceContentHash","createdAt","assetBasePath","modules","css","routes","dependencyMode","dependencies"]}}}},"responses":{"200":{"description":"Full manifest validated, stored, and marked ready","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"manifest_version":{"type":"integer"},"state":{"type":"string","enum":["queued","building","partial","ready","failed","superseded"]}},"required":["id","manifest_version","state"]}}}},"400":{"description":"Invalid manifest body","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing permission to write the project files","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project or release not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Release Asset Manifests","x-canonical-documentation":{"domain":"deployments","resource":"Artifacts","subgroup":"Release Asset Manifests","name":"Write release asset manifest","description":"Store release manifest. Requires project.files.write.","operationId":"writeReleaseAssetManifest"}}},"/projects/{project_reference}/releases/{release_reference}/asset-manifest/builds":{"post":{"operationId":"startReleaseAssetManifestBuild","tags":["deployments/Artifacts/Release Asset Manifests"],"summary":"Start release asset manifest build","description":"Start manifest build. Requires project.files.write.","parameters":[{"schema":{"type":"string","description":"Project slug, ID, or other supported project reference."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","description":"Release ID or version specifier (for example, \"1.2.3\", or \"1.2\" for the newest 1.2.x).","example":"1.2.3"},"required":true,"name":"release_reference","in":"path"},{"schema":{"type":"string","enum":["true","false"],"description":"Set to true to enqueue the release asset build task. Runtime executors leave this unset.","example":"true"},"required":false,"name":"queue_task","in":"query"}],"responses":{"200":{"description":"Build begun, or idempotently re-claimed","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"manifest_version":{"type":"integer"},"state":{"type":"string","enum":["queued","building","partial","ready","failed","superseded"]}},"required":["id","manifest_version","state"]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project or release not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Release Asset Manifests","x-canonical-documentation":{"domain":"deployments","resource":"Artifacts","subgroup":"Release Asset Manifests","name":"Start release asset manifest build","description":"Start manifest build. Requires project.files.write.","operationId":"startReleaseAssetManifestBuild"}}},"/projects/{project_reference}/releases/{release_reference}/asset-manifest/state":{"post":{"operationId":"updateReleaseAssetManifestState","tags":["deployments/Artifacts/Release Asset Manifests"],"summary":"Update release asset manifest state","description":"Report manifest state. Requires project.files.write.","parameters":[{"schema":{"type":"string","description":"Project slug, ID, or other supported project reference."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","description":"Release ID or version specifier (for example, \"1.2.3\", or \"1.2\" for the newest 1.2.x).","example":"1.2.3"},"required":true,"name":"release_reference","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"manifest_version":{"description":"A positive safe integer fences this manifest build generation; other legacy values are ignored."},"state":{"type":"string","enum":["partial","failed"]},"error":{"type":"string"}},"required":["state"]}}}},"responses":{"200":{"description":"Partial build progress or failure recorded","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"manifest_version":{"type":"integer"},"state":{"type":"string","enum":["queued","building","partial","ready","failed","superseded"]}},"required":["id","manifest_version","state"]}}}},"400":{"description":"Invalid state transition","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project or release not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Release Asset Manifests","x-canonical-documentation":{"domain":"deployments","resource":"Artifacts","subgroup":"Release Asset Manifests","name":"Update release asset manifest state","description":"Report manifest state. Requires project.files.write.","operationId":"updateReleaseAssetManifestState"}}},"/projects/{project_reference}/releases/{release_reference}/asset-manifest/assets":{"post":{"operationId":"writeReleaseAsset","tags":["deployments/Artifacts/Release Asset Manifests"],"summary":"Write release asset","description":"Store release asset. Requires project.files.write.","parameters":[{"schema":{"type":"string","description":"Project slug, ID, or other supported project reference."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","description":"Release ID or version specifier (for example, \"1.2.3\", or \"1.2\" for the newest 1.2.x).","example":"1.2.3"},"required":true,"name":"release_reference","in":"path"}],"responses":{"200":{"description":"Transformed asset stored after the API re-hashes the raw bytes and verifies the content hash","content":{"application/json":{"schema":{"type":"object","properties":{"stored":{"type":"boolean","enum":[true]},"existed":{"type":"boolean"}},"required":["stored","existed"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Release Asset Manifests","x-canonical-documentation":{"domain":"deployments","resource":"Artifacts","subgroup":"Release Asset Manifests","name":"Write release asset","description":"Store release asset. Requires project.files.write.","operationId":"writeReleaseAsset"}}},"/projects/{project_reference}/style-artifacts/current/builds":{"post":{"operationId":"startStyleArtifactBuild","tags":["deployments/Artifacts/Style artifacts"],"summary":"Start style artifact build","description":"Start a background build of the compiled CSS artifact for a branch, environment or release unless one is ready or building; returns the style artifact record. Requires project.files.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"style_profile_hash":{"type":"string","minLength":1,"description":"Style profile identifier used with the selector to find current metadata."},"branch":{"type":"string","minLength":1,"description":"Branch name. Exactly one of branch, environment_name, or release_id is required. Main may be implicit before its branch row exists; other branch and environment names must exist in the project or the request returns 404."},"environment_name":{"type":"string","minLength":1,"description":"Environment name. Exactly one selector is required."},"release_id":{"type":"string","format":"uuid","description":"Release UUID. Exactly one selector is required."},"force":{"type":"boolean","default":false,"description":"Queue a new build even when current metadata is ready or building."}},"required":["style_profile_hash"]}}}},"responses":{"200":{"description":"Current style artifact build state. A ready or building artifact is reused unless force is true; otherwise a background build is enqueued.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ready","missing","building","failed"],"description":"Current metadata state. Missing means no record exists; building does not confirm completion."},"artifact_hash":{"type":"string","description":"Registered CSS artifact hash, omitted when not available."},"asset_path":{"type":"string","description":"Registered CSS asset path, omitted when not available."},"etag":{"type":"string","description":"Registered CSS asset entity tag, omitted when not available."},"content_type":{"type":"string","description":"Registered CSS asset MIME type, omitted when not available."},"build_run_id":{"type":"string","minLength":1,"description":"Style build run identifier, when available."},"failure_reason":{"type":"string","description":"Persisted failure detail, omitted when not available."},"updated_at":{"type":"string","description":"Latest metadata update timestamp; omitted for missing metadata."}},"required":["status"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Style artifacts","x-canonical-documentation":{"domain":"deployments","resource":"Artifacts","subgroup":"Style artifacts","name":"Start style artifact build","description":"Start a background build of the compiled CSS artifact for a branch, environment or release unless one is ready or building; returns the style artifact record. Requires project.files.write.","operationId":"startStyleArtifactBuild"}}},"/projects/{project_reference}/style-artifacts/current":{"get":{"operationId":"getStyleArtifact","tags":["deployments/Artifacts/Style artifacts"],"summary":"Get style artifact","description":"Read the compiled CSS artifact record for a branch, environment or release to decide whether a build is needed; returns the style artifact record, with status missing when none exists. Requires project.files.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","minLength":1,"description":"Style profile identifier used with the selector to find current metadata."},"required":true,"description":"Style profile identifier used with the selector to find current metadata.","name":"style_profile_hash","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Branch name. Exactly one of branch, environment_name, or release_id is required. Main may be implicit before its branch row exists; other branch and environment names must exist in the project or the request returns 404."},"required":false,"description":"Branch name. Exactly one of branch, environment_name, or release_id is required. Main may be implicit before its branch row exists; other branch and environment names must exist in the project or the request returns 404.","name":"branch","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Environment name. Exactly one selector is required."},"required":false,"description":"Environment name. Exactly one selector is required.","name":"environment_name","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Release UUID. Exactly one selector is required."},"required":false,"description":"Release UUID. Exactly one selector is required.","name":"release_id","in":"query"}],"responses":{"200":{"description":"Current CSS artifact metadata for the selector and style profile: ready, building, failed, or missing. Nothing is built or uploaded.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ready","missing","building","failed"],"description":"Current metadata state. Missing means no record exists; building does not confirm completion."},"artifact_hash":{"type":"string","description":"Registered CSS artifact hash, omitted when not available."},"asset_path":{"type":"string","description":"Registered CSS asset path, omitted when not available."},"etag":{"type":"string","description":"Registered CSS asset entity tag, omitted when not available."},"content_type":{"type":"string","description":"Registered CSS asset MIME type, omitted when not available."},"build_run_id":{"type":"string","minLength":1,"description":"Style build run identifier, when available."},"failure_reason":{"type":"string","description":"Persisted failure detail, omitted when not available."},"updated_at":{"type":"string","description":"Latest metadata update timestamp; omitted for missing metadata."}},"required":["status"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Style artifacts","x-canonical-documentation":{"domain":"deployments","resource":"Artifacts","subgroup":"Style artifacts","name":"Get style artifact","description":"Read the compiled CSS artifact record for a branch, environment or release to decide whether a build is needed; returns the style artifact record, with status missing when none exists. Requires project.files.read.","operationId":"getStyleArtifact"}},"put":{"operationId":"updateStyleArtifact","tags":["deployments/Artifacts/Style artifacts"],"summary":"Update style artifact","description":"Record the state of the compiled CSS artifact for a branch, environment or release after a build; returns the style artifact record. Requires project.files.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"style_profile_hash":{"type":"string","minLength":1,"description":"Style profile identifier used with the selector to find current metadata."},"branch":{"type":"string","minLength":1,"description":"Branch name. Exactly one of branch, environment_name, or release_id is required. Main may be implicit before its branch row exists; other branch and environment names must exist in the project or the request returns 404."},"environment_name":{"type":"string","minLength":1,"description":"Environment name. Exactly one selector is required."},"release_id":{"type":"string","format":"uuid","description":"Release UUID. Exactly one selector is required."},"status":{"type":"string","enum":["building","ready","failed"],"default":"ready","description":"Metadata state. Ready requires artifact_hash; other states forbid it. Failed requires failure_reason."},"artifact_hash":{"type":"string","minLength":1,"description":"CSS artifact hash; required only for ready status and forbidden for other states."},"asset_path":{"type":"string","minLength":1,"description":"Registered CSS asset path. This operation does not upload the asset."},"content_type":{"type":"string","minLength":1,"description":"Registered MIME type of the CSS asset."},"etag":{"type":"string","minLength":1,"description":"Registered entity tag for the CSS asset."},"build_run_id":{"type":"string","minLength":1,"description":"Style build run identifier, when available."},"failure_reason":{"type":"string","minLength":1,"description":"Failure detail; required when registering failed status."}},"required":["style_profile_hash"]}}}},"responses":{"200":{"description":"Registered style artifact metadata","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ready","missing","building","failed"],"description":"Current metadata state. Missing means no record exists; building does not confirm completion."},"artifact_hash":{"type":"string","description":"Registered CSS artifact hash, omitted when not available."},"asset_path":{"type":"string","description":"Registered CSS asset path, omitted when not available."},"etag":{"type":"string","description":"Registered CSS asset entity tag, omitted when not available."},"content_type":{"type":"string","description":"Registered CSS asset MIME type, omitted when not available."},"build_run_id":{"type":"string","minLength":1,"description":"Style build run identifier, when available."},"failure_reason":{"type":"string","description":"Persisted failure detail, omitted when not available."},"updated_at":{"type":"string","description":"Latest metadata update timestamp; omitted for missing metadata."}},"required":["status"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Style artifacts","x-canonical-documentation":{"domain":"deployments","resource":"Artifacts","subgroup":"Style artifacts","name":"Update style artifact","description":"Record the state of the compiled CSS artifact for a branch, environment or release after a build; returns the style artifact record. Requires project.files.write.","operationId":"updateStyleArtifact"}}},"/dependency-artifacts/lookup":{"post":{"operationId":"lookupDependencyArtifacts","tags":["deployments/Artifacts/Dependency artifacts"],"summary":"Look up dependency artifacts","description":"Look up dependency artifacts. Requires files:read.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"artifacts":{"type":"array","items":{"type":"object","properties":{"origin_key":{"type":"string","enum":["npm:public"],"description":"Public npm registry identity; other origins are not accepted."},"package_name":{"type":"string","minLength":1,"maxLength":214,"pattern":"^(@[a-z0-9][a-z0-9._-]*\\/)?[a-z0-9][a-z0-9._-]*$","description":"Exact npm package name, including scope when present."},"exact_version":{"type":"string","minLength":1,"maxLength":128,"description":"Exact semantic version; ranges and tags are not accepted."},"subpath":{"type":"string","maxLength":512,"default":"","description":"Package-relative export subpath. Empty string selects the package root."},"target":{"type":"string","enum":["es2022"],"description":"JavaScript compilation target; currently es2022."},"profile":{"type":"string","enum":["standard-v1","react-v1","react-dom-v1"],"description":"react-v1 for react, react-dom-v1 for react-dom, standard-v1 otherwise. Selects externals and ingest revision."}},"required":["origin_key","package_name","exact_version","target","profile"],"additionalProperties":false},"minItems":1,"maxItems":100,"description":"One to 100 unique canonical package identities."}},"required":["artifacts"],"additionalProperties":false}}}},"responses":{"200":{"description":"Dependency artifact states.","content":{"application/json":{"schema":{"type":"object","properties":{"artifacts":{"type":"array","items":{"type":"object","properties":{"identity":{"type":"object","properties":{"origin_key":{"type":"string","enum":["npm:public"],"description":"Public npm registry identity; other origins are not accepted."},"package_name":{"type":"string","minLength":1,"maxLength":214,"pattern":"^(@[a-z0-9][a-z0-9._-]*\\/)?[a-z0-9][a-z0-9._-]*$","description":"Exact npm package name, including scope when present."},"exact_version":{"type":"string","minLength":1,"maxLength":128,"description":"Exact semantic version; ranges and tags are not accepted."},"subpath":{"type":"string","maxLength":512,"default":"","description":"Package-relative export subpath. Empty string selects the package root."},"target":{"type":"string","enum":["es2022"],"description":"JavaScript compilation target; currently es2022."},"profile":{"type":"string","enum":["standard-v1","react-v1","react-dom-v1"],"description":"react-v1 for react, react-dom-v1 for react-dom, standard-v1 otherwise. Selects externals and ingest revision."}},"required":["origin_key","package_name","exact_version","target","profile"],"additionalProperties":false,"description":"Requested identity with defaults applied."},"key_hash":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"Lowercase SHA-256 of the canonical artifact identity."},"status":{"type":"string","enum":["ready","missing","building","failed","denied"],"description":"Durable registry state; denied overrides build state when policy rejects the artifact."},"root_content_hash":{"type":["string","null"],"pattern":"^[0-9a-f]{64}$","description":"Stored root JavaScript asset SHA-256, or null when unavailable."},"graph_schema_version":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Graph publication format version; null when unavailable in lookup results."},"attempt_count":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Claimed build attempt number; stale publication attempts return 412. Null when no registry record exists."},"retry_after":{"type":["string","null"],"format":"date-time","description":"Retry eligibility timestamp; null or absent when no retry time is recorded."},"failure_code":{"type":["string","null"],"minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$","description":"Sanitized build failure or policy denial code; null for other lookup states."}},"required":["identity","key_hash","status","root_content_hash","graph_schema_version","attempt_count","retry_after","failure_code"]},"description":"Durable artifact states for exact public npm identities, one per requested identity in request order. Reading does not enqueue builds; missing artifacts remain missing."}},"required":["artifacts"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Requires a project-scoped veryfront-server service-account token with files:read.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-audience":"component-internal","x-documentation-source-tag":"Dependency artifacts","x-canonical-documentation":{"domain":"deployments","resource":"Artifacts","subgroup":"Dependency artifacts","name":"Look up dependency artifacts","description":"Look up dependency artifacts. Requires files:read.","operationId":"lookupDependencyArtifacts"}}},"/dependency-artifacts/{artifact_id}/attempts/{attempt_count}/result":{"post":{"operationId":"createDependencyArtifactBuildResult","tags":["deployments/Artifacts/Dependency artifacts"],"summary":"Create dependency artifact build result","description":"Record artifact build result. Requires files:write.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Registry artifact UUID assigned to the claimed build. The runtime must own the current artifact build attempt."},"required":true,"description":"Registry artifact UUID assigned to the claimed build. The runtime must own the current artifact build attempt.","name":"artifact_id","in":"path"},{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Current claimed build attempt number; stale attempts return 412."},"required":true,"description":"Current claimed build attempt number; stale attempts return 412.","name":"attempt_count","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"outcome":{"type":"string","enum":["ready"],"description":"Build result discriminant: ready publishes a verified graph; failed records a sanitized failure."},"graph":{"type":"object","properties":{"graph_schema_version":{"type":"integer","exclusiveMinimum":0,"description":"Graph publication format version."},"root_content_hash":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"Root JavaScript asset SHA-256; must appear in assets."},"assets":{"type":"array","items":{"type":"object","properties":{"content_hash":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"Lowercase SHA-256 of the immutable asset bytes."},"content_type":{"type":"string","enum":["text/javascript","text/css"],"description":"Uploaded asset media type; must match stored metadata."},"size":{"type":"integer","minimum":0,"description":"Asset byte length; must match stored metadata."}},"required":["content_hash","content_type","size"],"additionalProperties":false},"minItems":1,"maxItems":1024,"description":"One to 1024 unique uploaded assets forming the complete graph."}},"required":["graph_schema_version","root_content_hash","assets"],"additionalProperties":false,"description":"Complete graph whose uploaded asset metadata is verified before publication."}},"required":["outcome","graph"],"additionalProperties":false},{"type":"object","properties":{"outcome":{"type":"string","enum":["failed"],"description":"Build result discriminant: ready publishes a verified graph; failed records a sanitized failure."},"failure_code":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$","description":"Sanitized machine-readable build failure code."},"failure_message":{"type":"string","minLength":1,"maxLength":500,"description":"Optional sanitized failure message stored with the attempt; absent becomes null."},"retry_after":{"type":"string","format":"date-time","description":"Optional retry eligibility timestamp; absent becomes null."}},"required":["outcome","failure_code"],"additionalProperties":false}],"description":"Ready graphs must reference uploaded assets with matching media types and byte sizes."}}}},"responses":{"200":{"description":"Artifact build result accepted.","content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"boolean","enum":[true],"description":"The current build attempt accepted the result."},"state":{"type":"string","enum":["ready","failed"],"description":"Persisted build state: a complete verified graph is published for ready, or a sanitized failure recorded for failed."}},"required":["accepted","state"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Requires a project-scoped veryfront-server service-account token with files:write and a signed run ID; the runtime must own the current attempt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"Stale or unowned artifact build attempt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-audience":"component-internal","x-documentation-source-tag":"Dependency artifacts","x-canonical-documentation":{"domain":"deployments","resource":"Artifacts","subgroup":"Dependency artifacts","name":"Create dependency artifact build result","description":"Record artifact build result. Requires files:write.","operationId":"createDependencyArtifactBuildResult"}}},"/dependency-artifacts/{artifact_id}/attempts/{attempt_count}/assets/{content_hash}":{"put":{"operationId":"writeDependencyArtifactAsset","tags":["deployments/Artifacts/Dependency artifacts"],"summary":"Write dependency artifact asset","description":"Store dependency artifact asset. Requires files:write.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Registry artifact UUID assigned to the claimed build. The runtime must own the current artifact build attempt."},"required":true,"description":"Registry artifact UUID assigned to the claimed build. The runtime must own the current artifact build attempt.","name":"artifact_id","in":"path"},{"schema":{"type":"integer","exclusiveMinimum":0,"description":"Current claimed build attempt number; stale attempts return 412."},"required":true,"description":"Current claimed build attempt number; stale attempts return 412.","name":"attempt_count","in":"path"},{"schema":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"Lowercase SHA-256 of the immutable asset bytes. The URL hash must match the uploaded bytes."},"required":true,"description":"Lowercase SHA-256 of the immutable asset bytes. The URL hash must match the uploaded bytes.","name":"content_hash","in":"path"}],"requestBody":{"required":true,"content":{"*/*":{"schema":{"type":"string","format":"binary","maxLength":10485760,"description":"Immutable asset bytes. Maximum 10 MiB (10485760 bytes). Content-Type must be text/javascript or text/css; parameters are ignored. The URL content_hash must match the SHA-256 of these bytes."}}}},"responses":{"200":{"description":"Artifact asset stored.","content":{"application/json":{"schema":{"type":"object","properties":{"stored":{"type":"boolean","enum":[true],"description":"The immutable asset is available in storage."},"existed":{"type":"boolean","description":"True when the same content-addressed asset already existed."}},"required":["stored","existed"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Requires a project-scoped veryfront-server service-account token with files:write and a signed run ID; the runtime must own the current attempt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"412":{"description":"Stale or unowned artifact build attempt.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-audience":"component-internal","x-documentation-source-tag":"Dependency artifacts","x-canonical-documentation":{"domain":"deployments","resource":"Artifacts","subgroup":"Dependency artifacts","name":"Write dependency artifact asset","description":"Store dependency artifact asset. Requires files:write.","operationId":"writeDependencyArtifactAsset"}}},"/projects/{project_reference}/environments":{"get":{"operationId":"listEnvironments","tags":["runtime/Environments/Environments"],"summary":"List environments","description":"List environments. Requires project.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","description":"Cursor for pagination: an environment ID from this project. An unknown cursor is rejected."},"required":false,"description":"Cursor for pagination: an environment ID from this project. An unknown cursor is rejected.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Page size, 1 to 100. Defaults to 20."},"required":false,"description":"Page size, 1 to 100. Defaults to 20.","name":"limit","in":"query"},{"schema":{"type":"string","enum":["name","updated_at"],"description":"Sort field: \"name\" or \"updated_at\"."},"required":false,"description":"Sort field: \"name\" or \"updated_at\".","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"description":"Sort order: \"asc\" or \"desc\"."},"required":false,"description":"Sort order: \"asc\" or \"desc\".","name":"sort_order","in":"query"}],"responses":{"200":{"description":"Paginated list of environments for the project","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Environment"}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Environments","x-canonical-documentation":{"domain":"runtime","resource":"Environments","subgroup":"Environments","name":"List environments","description":"List environments. Requires project.read.","operationId":"listEnvironments"}},"post":{"operationId":"createEnvironment","tags":["runtime/Environments/Environments"],"summary":"Create environment","description":"Create an environment. Requires project.environments.manage.","parameters":[{"$ref":"#/components/parameters/ProjectReference"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Environment name (e.g., staging, production). New environments are private."}},"required":["name"]}}}},"responses":{"201":{"description":"Environment created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Environments","x-canonical-documentation":{"domain":"runtime","resource":"Environments","subgroup":"Environments","name":"Create environment","description":"Create an environment. Requires project.environments.manage.","operationId":"createEnvironment"}}},"/projects/{project_reference}/environments/{environment_id}":{"get":{"operationId":"getEnvironment","tags":["runtime/Environments/Environments"],"summary":"Get environment","description":"Get an environment. Requires project.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"uuid","description":"Environment ID"},"required":true,"description":"Environment ID","name":"environment_id","in":"path"}],"responses":{"200":{"description":"Environment details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Environments","x-canonical-documentation":{"domain":"runtime","resource":"Environments","subgroup":"Environments","name":"Get environment","description":"Get an environment. Requires project.read.","operationId":"getEnvironment"}},"patch":{"operationId":"updateEnvironment","tags":["runtime/Environments/Environments"],"summary":"Update environment","description":"Update an environment. Requires project.environments.manage.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"uuid","description":"Environment ID"},"required":true,"description":"Environment ID","name":"environment_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New environment name"},"protected":{"type":"boolean","description":"Whether the environment is protected"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"value":{"type":"string"}},"required":["key","value"]},"description":"Atomic variable upserts in this environment. Existing keys retain their IDs; omitted keys remain unchanged and returned values are masked. A non-empty list also requires project.env_vars.write."}}}}}},"responses":{"200":{"description":"Environment updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Environments","x-canonical-documentation":{"domain":"runtime","resource":"Environments","subgroup":"Environments","name":"Update environment","description":"Update an environment. Requires project.environments.manage.","operationId":"updateEnvironment"}},"delete":{"operationId":"deleteEnvironment","tags":["runtime/Environments/Environments"],"summary":"Delete environment","description":"Delete an environment. Requires project.environments.manage.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"uuid","description":"Environment ID"},"required":true,"description":"Environment ID","name":"environment_id","in":"path"}],"responses":{"200":{"description":"Environment deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Environments","x-canonical-documentation":{"domain":"runtime","resource":"Environments","subgroup":"Environments","name":"Delete environment","description":"Delete an environment. Requires project.environments.manage.","operationId":"deleteEnvironment"}}},"/projects/{project_reference}/environments/{environment_id}/domains":{"get":{"operationId":"listDomains","tags":["runtime/Environments/Environment Domains"],"summary":"List environment domains","description":"List environment domains. Requires project.read.","parameters":[{"schema":{"type":"string","description":"UUID of the project"},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","format":"uuid","description":"UUID of the environment"},"required":true,"description":"Environment ID","name":"environment_id","in":"path"},{"schema":{"type":"string","description":"Pagination cursor: a domain ID in this environment. An unknown cursor is rejected."},"required":false,"description":"Pagination cursor: a domain ID in this environment. An unknown cursor is rejected.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Results per page, 1 to 100. Defaults to 20."},"required":false,"description":"Results per page, 1 to 100. Defaults to 20.","name":"limit","in":"query"},{"schema":{"type":"string","enum":["name","updated_at"],"description":"Sort field. \"name\" sorts by the domain name, \"updated_at\" by the domain update timestamp."},"required":false,"description":"Sort field. \"name\" sorts by the domain name, \"updated_at\" by the domain update timestamp.","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"description":"Sort order: \"asc\" or \"desc\"."},"required":false,"description":"Sort order: \"asc\" or \"desc\".","name":"sort_order","in":"query"}],"responses":{"200":{"description":"Paginated list of domains","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"domain":{"type":"string"},"environment_id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"created_at":{"type":["string","null"]},"updated_at":{"type":["string","null"]}},"required":["id","domain","environment_id","project_id","created_at","updated_at"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Environment not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Environment Domains","x-canonical-documentation":{"domain":"runtime","resource":"Environments","subgroup":"Environment Domains","name":"List environment domains","description":"List environment domains. Requires project.read.","operationId":"listDomains"}},"post":{"operationId":"createDomain","tags":["runtime/Environments/Environment Domains"],"summary":"Create environment domain","description":"Add a custom domain. Requires project.domains.write.","parameters":[{"schema":{"type":"string","description":"UUID of the project"},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","format":"uuid","description":"UUID of the environment"},"required":true,"description":"Environment ID","name":"environment_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","minLength":1,"description":"Custom domain name to add to the environment"}},"required":["domain"]},"example":{"domain":"app.example.com"}}}},"responses":{"201":{"description":"Domain added successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"protected":{"type":"boolean"},"domains":{"type":"array","items":{"type":"string"}},"environment_variables":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"value":{"type":"string","enum":["********"]},"has_value":{"type":"boolean"}},"required":["id","key","value","has_value"]}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","protected","domains","environment_variables"]}}}},"400":{"description":"Invalid input - Domain format is invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden - User does not have permission to add domains or custom_domains feature not enabled","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Environment not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Resource limit exceeded - Custom domain quota reached","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Environment Domains","x-canonical-documentation":{"domain":"runtime","resource":"Environments","subgroup":"Environment Domains","name":"Create environment domain","description":"Add a custom domain. Requires project.domains.write.","operationId":"createDomain"}}},"/projects/{project_reference}/environments/{environment_id}/domains/{domain_reference}":{"get":{"operationId":"getDomain","tags":["runtime/Environments/Environment Domains"],"summary":"Get environment domain","description":"Get a custom domain. Requires project.read.","parameters":[{"schema":{"type":"string","description":"Project ID (UUID) or slug"},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","description":"Domain ID (UUID) or domain name (for example, app.example.com)."},"required":true,"name":"domain_reference","in":"path"},{"schema":{"type":"string","format":"uuid","description":"UUID of the environment"},"required":true,"description":"Environment ID","name":"environment_id","in":"path"}],"responses":{"200":{"description":"Domain details","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"domain":{"type":"string"},"environment_id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"created_at":{"type":["string","null"]},"updated_at":{"type":["string","null"]}},"required":["id","domain","environment_id","project_id","created_at","updated_at"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Environment or domain not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Environment Domains","x-canonical-documentation":{"domain":"runtime","resource":"Environments","subgroup":"Environment Domains","name":"Get environment domain","description":"Get a custom domain. Requires project.read.","operationId":"getDomain"}},"patch":{"operationId":"updateDomain","tags":["runtime/Environments/Environment Domains"],"summary":"Update environment domain","description":"Update a custom domain. Requires project.domains.write.","parameters":[{"schema":{"type":"string","description":"Project ID (UUID) or slug"},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","description":"Domain ID (UUID) or domain name (for example, app.example.com)."},"required":true,"name":"domain_reference","in":"path"},{"schema":{"type":"string","format":"uuid","description":"UUID of the environment"},"required":true,"description":"Environment ID","name":"environment_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","minLength":1,"description":"New domain name"}},"required":["domain"]}}}},"responses":{"200":{"description":"Domain updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"domain":{"type":"string"},"environment_id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"created_at":{"type":["string","null"]},"updated_at":{"type":["string","null"]}},"required":["id","domain","environment_id","project_id","created_at","updated_at"]}}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Environment or domain not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Environment Domains","x-canonical-documentation":{"domain":"runtime","resource":"Environments","subgroup":"Environment Domains","name":"Update environment domain","description":"Update a custom domain. Requires project.domains.write.","operationId":"updateDomain"}},"delete":{"operationId":"deleteDomain","tags":["runtime/Environments/Environment Domains"],"summary":"Delete environment domain","description":"Remove a custom domain. Requires project.domains.write.","parameters":[{"schema":{"type":"string","description":"Project ID (UUID) or slug"},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","description":"Domain ID (UUID) or domain name (for example, app.example.com)."},"required":true,"name":"domain_reference","in":"path"},{"schema":{"type":"string","format":"uuid","description":"UUID of the environment"},"required":true,"description":"Environment ID","name":"environment_id","in":"path"}],"responses":{"200":{"description":"Domain deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden - User does not have permission to delete domains. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Environment or domain not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Environment Domains","x-canonical-documentation":{"domain":"runtime","resource":"Environments","subgroup":"Environment Domains","name":"Delete environment domain","description":"Remove a custom domain. Requires project.domains.write.","operationId":"deleteDomain"}}},"/projects/{project_reference}/environments/{environment_id}/variables":{"get":{"operationId":"listEnvironmentVariables","tags":["runtime/Environments/Environment variables"],"summary":"List environment variables","description":"List the variables of an environment, with masked values. Requires project.read.","parameters":[{"schema":{"type":"string","description":"Project slug, ID, or other supported project reference."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Environment ID containing the variable."},"required":true,"description":"Environment ID containing the variable.","name":"environment_id","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Cursor for pagination (environment variable ID)."},"required":false,"description":"Cursor for pagination (environment variable ID).","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum number of environment variables to return. Defaults to 20 and is capped at 100."},"required":false,"description":"Maximum number of environment variables to return. Defaults to 20 and is capped at 100.","name":"limit","in":"query"},{"schema":{"type":"string","enum":["key","updated_at"],"default":"key","description":"Sort field. Defaults to \"key\"."},"required":false,"description":"Sort field. Defaults to \"key\".","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"asc","description":"Sort order. Defaults to \"asc\"."},"required":false,"description":"Sort order. Defaults to \"asc\".","name":"sort_order","in":"query"},{"schema":{"type":"string","description":"Comma-separated keys to list, at most 100 of at most 255 characters each. The filter applies before pagination, and a key that does not exist is not in data."},"required":false,"name":"keys","in":"query"}],"responses":{"200":{"description":"One page of the environment variables, values masked","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"value":{"type":"string","enum":["********"]},"has_value":{"type":"boolean"}},"required":["id","key","value","has_value"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Environment variables","x-canonical-documentation":{"domain":"runtime","resource":"Environments","subgroup":"Environment variables","name":"List environment variables","description":"List the variables of an environment, with masked values. Requires project.read.","operationId":"listEnvironmentVariables"}},"post":{"operationId":"createEnvironmentVariable","tags":["runtime/Environments/Environment variables"],"summary":"Create environment variable","description":"Create an environment variable; a key that exists already is a conflict. Requires project.env_vars.write.","parameters":[{"schema":{"type":"string","description":"Project slug, ID, or other supported project reference."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Environment ID containing the variable."},"required":true,"description":"Environment ID containing the variable.","name":"environment_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":1,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Environment variable key. Must start with a letter or underscore and contain only letters, numbers, and underscores."},"value":{"type":"string","description":"Environment variable value."}},"required":["key","value"]},"example":{"key":"DATABASE_URL","value":"postgresql://localhost:5432/mydb"}}}},"responses":{"201":{"description":"Environment variable created; the value is masked","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"value":{"type":"string","enum":["********"]},"has_value":{"type":"boolean"}},"required":["id","key","value","has_value"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Environment variables","x-canonical-documentation":{"domain":"runtime","resource":"Environments","subgroup":"Environment variables","name":"Create environment variable","description":"Create an environment variable; a key that exists already is a conflict. Requires project.env_vars.write.","operationId":"createEnvironmentVariable"}}},"/projects/{project_reference}/environments/{environment_id}/variables/{key}":{"get":{"operationId":"getEnvironmentVariable","tags":["runtime/Environments/Environment variables"],"summary":"Get environment variable","description":"Get the masked metadata of one environment variable. Requires project.read.","parameters":[{"schema":{"type":"string","description":"Project slug, ID, or other supported project reference."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Environment ID containing the variable."},"required":true,"description":"Environment ID containing the variable.","name":"environment_id","in":"path"},{"schema":{"type":"string","description":"Environment variable key."},"required":true,"description":"Environment variable key.","name":"key","in":"path"}],"responses":{"200":{"description":"Environment variable; the value is masked","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"value":{"type":"string","enum":["********"]},"has_value":{"type":"boolean"}},"required":["id","key","value","has_value"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Environment variables","x-canonical-documentation":{"domain":"runtime","resource":"Environments","subgroup":"Environment variables","name":"Get environment variable","description":"Get the masked metadata of one environment variable. Requires project.read.","operationId":"getEnvironmentVariable"}},"put":{"operationId":"writeEnvironmentVariable","tags":["runtime/Environments/Environment variables"],"summary":"Write environment variable","description":"Set one environment variable, creating it or replacing its value. Requires project.env_vars.write.","parameters":[{"schema":{"type":"string","description":"Project slug, ID, or other supported project reference."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Environment ID containing the variable."},"required":true,"description":"Environment ID containing the variable.","name":"environment_id","in":"path"},{"schema":{"type":"string","description":"Environment variable key."},"required":true,"description":"Environment variable key.","name":"key","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"string","description":"Environment variable value."}},"required":["value"]},"example":{"value":"postgresql://localhost:5432/mydb"}}}},"responses":{"200":{"description":"Environment variable created or replaced; the value is masked","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"value":{"type":"string","enum":["********"]},"has_value":{"type":"boolean"}},"required":["id","key","value","has_value"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Environment variables","x-canonical-documentation":{"domain":"runtime","resource":"Environments","subgroup":"Environment variables","name":"Write environment variable","description":"Set one environment variable, creating it or replacing its value. Requires project.env_vars.write.","operationId":"writeEnvironmentVariable"}},"patch":{"operationId":"updateEnvironmentVariable","tags":["runtime/Environments/Environment variables"],"summary":"Update environment variable","description":"Change the value or the key of one environment variable. Requires project.env_vars.write.","parameters":[{"schema":{"type":"string","description":"Project slug, ID, or other supported project reference."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Environment ID containing the variable."},"required":true,"description":"Environment ID containing the variable.","name":"environment_id","in":"path"},{"schema":{"type":"string","description":"Environment variable key."},"required":true,"description":"Environment variable key.","name":"key","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"new_key":{"type":"string","minLength":1,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"New environment variable key."},"value":{"type":"string","description":"Replacement environment variable value."}}},"example":{"value":"postgresql://localhost:5432/newdb"}}}},"responses":{"200":{"description":"Environment variable updated; the value is masked","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"},"value":{"type":"string","enum":["********"]},"has_value":{"type":"boolean"}},"required":["id","key","value","has_value"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Environment variables","x-canonical-documentation":{"domain":"runtime","resource":"Environments","subgroup":"Environment variables","name":"Update environment variable","description":"Change the value or the key of one environment variable. Requires project.env_vars.write.","operationId":"updateEnvironmentVariable"}},"delete":{"operationId":"deleteEnvironmentVariable","tags":["runtime/Environments/Environment variables"],"summary":"Delete environment variable","description":"Delete an environment variable. Requires project.env_vars.write.","parameters":[{"schema":{"type":"string","description":"Project slug, ID, or other supported project reference."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Environment ID containing the variable."},"required":true,"description":"Environment ID containing the variable.","name":"environment_id","in":"path"},{"schema":{"type":"string","description":"Environment variable key."},"required":true,"description":"Environment variable key.","name":"key","in":"path"}],"responses":{"200":{"description":"Environment variable deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Environment variables","x-canonical-documentation":{"domain":"runtime","resource":"Environments","subgroup":"Environment variables","name":"Delete environment variable","description":"Delete an environment variable. Requires project.env_vars.write.","operationId":"deleteEnvironmentVariable"}}},"/servers":{"get":{"operationId":"listServers","tags":["runtime/Servers/Servers"],"summary":"List servers","description":"List servers: REST lists your servers, or one project's with project_reference; GraphQL and MCP list the servers of one project.","parameters":[{"$ref":"#/components/parameters/PaginationCursor"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Items per page"},"required":false,"description":"Items per page","name":"limit","in":"query"},{"schema":{"type":"string","enum":["name","status","created_at"],"default":"created_at","description":"Sort field. Defaults to \"created_at\". The \"name\" field sorts by hostname."},"required":false,"description":"Sort field. Defaults to \"created_at\". The \"name\" field sorts by hostname.","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort order. Defaults to \"desc\"."},"required":false,"description":"Sort order. Defaults to \"desc\".","name":"sort_order","in":"query"},{"schema":{"type":"string","description":"Project ID or slug. When set, the operation acts on that project’s servers with the project checks (project.read to read, project.runtime.manage to create or delete) instead of on the servers you own."},"required":false,"name":"project_reference","in":"query"}],"responses":{"200":{"description":"One page of the servers you own, or of the project’s servers","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Server"}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"Invalid pagination or sorting options. With project_reference, also a cursor outside the project’s current server list.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"API-key read scope denied; with project_reference, also project access denied","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"With project_reference: project not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account servers","x-canonical-documentation":{"domain":"runtime","resource":"Servers","subgroup":"Servers","name":"List servers","description":"List servers: REST lists your servers, or one project's with project_reference; GraphQL and MCP list the servers of one project.","operationId":"listServers"}},"post":{"operationId":"createServer","tags":["runtime/Servers/Servers"],"summary":"Create server","description":"Create a dedicated server for an environment. Requires project.runtime.manage.","parameters":[{"schema":{"type":"string","description":"Project ID or slug. When set, the operation acts on that project’s servers with the project checks (project.read to read, project.runtime.manage to create or delete) instead of on the servers you own."},"required":false,"name":"project_reference","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"environment_id":{"type":"string","format":"uuid","description":"Environment UUID to link the server to"}},"required":["environment_id"]}}}},"responses":{"201":{"description":"Server created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Server"}}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Server capacity limit reached","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Environment not found, or with project_reference: project not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account servers","x-canonical-documentation":{"domain":"runtime","resource":"Servers","subgroup":"Servers","name":"Create server","description":"Create a dedicated server for an environment. Requires project.runtime.manage.","operationId":"createServer"}}},"/projects/{project_reference}/environments/{environment_id}/servers":{"post":{"operationId":"createEnvironmentServer","tags":["runtime/Servers/Servers"],"summary":"Create server in environment","description":"Create a dedicated server for an environment. Requires project.runtime.manage.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"uuid","description":"Environment ID to create a dedicated veryfront-server instance for"},"required":true,"description":"Environment ID to create a dedicated veryfront-server instance for","name":"environment_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"201":{"description":"Server created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Server"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Environment Servers","x-canonical-documentation":{"domain":"runtime","resource":"Servers","subgroup":"Servers","name":"Create server in environment","description":"Create a dedicated server for an environment. Requires project.runtime.manage.","operationId":"createEnvironmentServer"}}},"/servers/{server_id}":{"get":{"operationId":"getServer","tags":["runtime/Servers/Servers"],"summary":"Get server","description":"Get a server.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"server_id","in":"path"},{"schema":{"type":"string","description":"Project ID or slug. When set, the operation acts on that project’s servers with the project checks (project.read to read, project.runtime.manage to create or delete) instead of on the servers you own."},"required":false,"name":"project_reference","in":"query"}],"responses":{"200":{"description":"Server owned by the caller, or the project’s server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Server"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Linked-project capability, project access, or API-key read scope denied","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Server not found, not owned by the caller or not in the project","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account servers","x-canonical-documentation":{"domain":"runtime","resource":"Servers","subgroup":"Servers","name":"Get server","description":"Get a server.","operationId":"getServer"}},"delete":{"operationId":"deleteServer","tags":["runtime/Servers/Servers"],"summary":"Delete server","description":"Start deleting a server. API keys need delete scope.","parameters":[{"schema":{"type":"string","format":"uuid","description":"ID of a server you own. Deleting it requires project.runtime.manage on every project linked to the server. If none are linked, no project capability is required."},"required":true,"description":"ID of a server you own. Deleting it requires project.runtime.manage on every project linked to the server. If none are linked, no project capability is required.","name":"server_id","in":"path"},{"schema":{"type":"string","description":"Project ID or slug. When set, the operation acts on that project’s servers with the project checks (project.read to read, project.runtime.manage to create or delete) instead of on the servers you own."},"required":false,"name":"project_reference","in":"query"}],"responses":{"200":{"description":"Server marked for deletion. This does not confirm completed deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Linked-project or project capability, or API-key delete scope, denied","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Server not found, not owned by the caller or not in the project","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account servers","x-canonical-documentation":{"domain":"runtime","resource":"Servers","subgroup":"Servers","name":"Delete server","description":"Start deleting a server. API keys need delete scope.","operationId":"deleteServer"}}},"/servers/{server_id}/environments/{environment_id}":{"post":{"operationId":"createServerEnvironmentLink","tags":["runtime/Servers/Server Environments"],"summary":"Link environment to server","description":"Link a server environment. Requires project.runtime.manage.","parameters":[{"schema":{"type":"string","format":"uuid","description":"ID of a server you own. Linking and unlinking require project.runtime.manage on every project currently linked to the server. If none are linked, no project capability is required. Linking also requires project.runtime.manage on the environment’s project. Unlinking also requires API-key delete scope."},"required":true,"description":"ID of a server you own. Linking and unlinking require project.runtime.manage on every project currently linked to the server. If none are linked, no project capability is required. Linking also requires project.runtime.manage on the environment’s project. Unlinking also requires API-key delete scope.","name":"server_id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"environment_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Environment linked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Server"}}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Server or environment not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Server Environments","x-canonical-documentation":{"domain":"runtime","resource":"Servers","subgroup":"Server Environments","name":"Link environment to server","description":"Link a server environment. Requires project.runtime.manage.","operationId":"createServerEnvironmentLink"}},"delete":{"operationId":"deleteServerEnvironmentLink","tags":["runtime/Servers/Server Environments"],"summary":"Unlink environment from server","description":"Unlink a server environment. Requires project.runtime.manage; API keys also need delete scope.","parameters":[{"schema":{"type":"string","format":"uuid","description":"ID of a server you own. Linking and unlinking require project.runtime.manage on every project currently linked to the server. If none are linked, no project capability is required. Linking also requires project.runtime.manage on the environment’s project. Unlinking also requires API-key delete scope."},"required":true,"description":"ID of a server you own. Linking and unlinking require project.runtime.manage on every project currently linked to the server. If none are linked, no project capability is required. Linking also requires project.runtime.manage on the environment’s project. Unlinking also requires API-key delete scope.","name":"server_id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"environment_id","in":"path"}],"responses":{"200":{"description":"Environment unlinked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Linked-project capability or API-key delete scope denied","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Server not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Server Environments","x-canonical-documentation":{"domain":"runtime","resource":"Servers","subgroup":"Server Environments","name":"Unlink environment from server","description":"Unlink a server environment. Requires project.runtime.manage; API keys also need delete scope.","operationId":"deleteServerEnvironmentLink"}}},"/sandboxes":{"get":{"operationId":"listSandboxes","tags":["runtime/Sandboxes/Sandbox Lifecycle"],"summary":"List sandboxes","description":"List sandboxes.","parameters":[{"schema":{"type":"string","description":"Project UUID or slug whose billed sandboxes are listed. Omit it to list your private sandboxes."},"required":false,"description":"Project UUID or slug whose billed sandboxes are listed. Omit it to list your private sandboxes.","name":"project_reference","in":"query"},{"schema":{"type":"string","enum":["project","private"]},"required":false,"name":"access_scope","in":"query"},{"schema":{"type":"string","description":"Cursor for pagination. Uses the sandbox ID."},"required":false,"description":"Cursor for pagination. Uses the sandbox ID.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum sandboxes to return. Defaults to 20 and is capped at 100."},"required":false,"description":"Maximum sandboxes to return. Defaults to 20 and is capped at 100.","name":"limit","in":"query"},{"schema":{"type":"string","enum":["created_at","status"],"default":"created_at","description":"Sort field. Defaults to created_at."},"required":false,"description":"Sort field. Defaults to created_at.","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort order. Defaults to desc."},"required":false,"description":"Sort order. Defaults to desc.","name":"sort_order","in":"query"}],"responses":{"200":{"description":"Paginated project sandboxes, or the caller’s private sandboxes when no project is given.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Sandbox"}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Sandbox Lifecycle","x-canonical-documentation":{"domain":"runtime","resource":"Sandboxes","subgroup":"Sandbox Lifecycle","name":"List sandboxes","description":"List sandboxes.","operationId":"listSandboxes"}},"post":{"operationId":"createSandbox","tags":["runtime/Sandboxes/Sandbox Lifecycle"],"summary":"Create sandbox","description":"Create a sandbox. Requires project.sandboxes.manage.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"access_scope":{"type":"string","enum":["project","private"],"description":"Private sandboxes require creator credentials or a creator-owned MCP OAuth grant."},"project_reference":{"type":"string","description":"Project UUID or slug to bill. When set, the project owner is billed."},"environment_id":{"type":"string","format":"uuid","description":"Environment whose variables are copied once into the sandbox; it also identifies the billing project."},"ttl_mode":{"type":"string","enum":["default","duration","always_on"],"description":"Sandbox lifetime policy. `default` uses the platform’s idle and maximum lifetime limits."},"ttl_hours":{"type":"integer","exclusiveMinimum":0,"maximum":24,"description":"Required when ttl_mode is duration. Number of hours before cleanup, up to 24."}},"required":["access_scope"]}}}},"responses":{"201":{"description":"Sandbox created and billed to the project identified by `project_reference` or `environment_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Sandbox Lifecycle","x-canonical-documentation":{"domain":"runtime","resource":"Sandboxes","subgroup":"Sandbox Lifecycle","name":"Create sandbox","description":"Create a sandbox. Requires project.sandboxes.manage.","operationId":"createSandbox"}}},"/sandboxes/{sandbox_id}":{"get":{"operationId":"getSandbox","tags":["runtime/Sandboxes/Sandbox Lifecycle"],"summary":"Get sandbox","description":"Get a sandbox. Requires project.sandboxes.manage.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Sandbox UUID, as returned by createSandbox."},"required":true,"description":"Sandbox UUID, as returned by createSandbox.","name":"sandbox_id","in":"path"}],"responses":{"200":{"description":"Sandbox status, endpoint, and billing project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Sandbox Lifecycle","x-canonical-documentation":{"domain":"runtime","resource":"Sandboxes","subgroup":"Sandbox Lifecycle","name":"Get sandbox","description":"Get a sandbox. Requires project.sandboxes.manage.","operationId":"getSandbox"}},"patch":{"operationId":"updateSandboxLifetime","tags":["runtime/Sandboxes/Sandbox Lifecycle"],"summary":"Update sandbox lifetime","description":"Update sandbox lifetime. Requires project.sandboxes.manage.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Sandbox UUID, as returned by createSandbox."},"required":true,"description":"Sandbox UUID, as returned by createSandbox.","name":"sandbox_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ttl_mode":{"type":"string","enum":["default","duration","always_on"],"description":"Sandbox lifetime policy. `default` uses the platform’s idle and maximum lifetime limits."},"ttl_hours":{"type":"integer","exclusiveMinimum":0,"maximum":24,"description":"Required when ttl_mode is duration. Number of hours before cleanup, up to 24."}},"required":["ttl_mode"]}}}},"responses":{"200":{"description":"Sandbox updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sandbox"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Sandbox Lifecycle","x-canonical-documentation":{"domain":"runtime","resource":"Sandboxes","subgroup":"Sandbox Lifecycle","name":"Update sandbox lifetime","description":"Update sandbox lifetime. Requires project.sandboxes.manage.","operationId":"updateSandboxLifetime"}},"delete":{"operationId":"deleteSandbox","tags":["runtime/Sandboxes/Sandbox Lifecycle"],"summary":"Delete sandbox","description":"Delete a sandbox. Requires project.sandboxes.manage.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Sandbox UUID, as returned by createSandbox."},"required":true,"description":"Sandbox UUID, as returned by createSandbox.","name":"sandbox_id","in":"path"}],"responses":{"200":{"description":"Sandbox marked for deletion; its workspace files are deleted with it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Sandbox Lifecycle","x-canonical-documentation":{"domain":"runtime","resource":"Sandboxes","subgroup":"Sandbox Lifecycle","name":"Delete sandbox","description":"Delete a sandbox. Requires project.sandboxes.manage.","operationId":"deleteSandbox"}}},"/sandboxes/capabilities":{"get":{"operationId":"getSandboxCapabilities","tags":["runtime/Sandboxes/Sandbox Lifecycle"],"summary":"Get sandbox capabilities","description":"Get sandbox creation options and API limits, using caller eligibility for a selected billing project or legacy platform discovery when omitted.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Billing project UUID or slug for caller creation eligibility. Omit for legacy platform feature discovery. Creation rechecks capacity."},"required":false,"description":"Billing project UUID or slug for caller creation eligibility. Omit for legacy platform feature discovery. Creation rechecks capacity.","name":"project_reference","in":"query"}],"responses":{"200":{"description":"Platform features and API limits, or caller creation eligibility when a billing project is selected.","content":{"application/json":{"schema":{"type":"object","properties":{"private_creation":{"type":"boolean"},"private_always_on":{"type":"boolean"},"coding_agent_terminal":{"type":"boolean"},"limits":{"type":"object","properties":{"max_ttl_hours":{"type":"integer","exclusiveMinimum":0},"max_command_timeout_seconds":{"type":"integer","exclusiveMinimum":0},"max_background_timeout_seconds":{"type":"integer","exclusiveMinimum":0},"max_command_output_bytes":{"type":"integer","exclusiveMinimum":0},"max_page_size":{"type":"integer","exclusiveMinimum":0},"max_file_bytes":{"type":"integer","exclusiveMinimum":0},"max_write_files":{"type":"integer","exclusiveMinimum":0}},"required":["max_ttl_hours","max_command_timeout_seconds","max_background_timeout_seconds","max_command_output_bytes","max_page_size","max_file_bytes","max_write_files"]},"defaults":{"type":"object","properties":{"command_timeout_seconds":{"type":"integer","exclusiveMinimum":0},"background_timeout_seconds":{"type":"integer","exclusiveMinimum":0},"page_size":{"type":"integer","exclusiveMinimum":0}},"required":["command_timeout_seconds","background_timeout_seconds","page_size"]}},"required":["private_creation","private_always_on","coding_agent_terminal","limits","defaults"],"description":"Sandbox creation options and API limits."}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Sandbox Lifecycle","x-canonical-documentation":{"domain":"runtime","resource":"Sandboxes","subgroup":"Sandbox Lifecycle","name":"Get sandbox capabilities","description":"Get sandbox creation options and API limits, using caller eligibility for a selected billing project or legacy platform discovery when omitted.","operationId":"getSandboxCapabilities"}}},"/sandboxes/{sandbox_id}/commands":{"get":{"operationId":"listSandboxBackgroundCommands","tags":["runtime/Sandboxes/Sandbox Commands"],"summary":"List sandbox background commands","description":"List background commands. Requires project.sandboxes.manage.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Sandbox UUID, as returned by createSandbox."},"required":true,"description":"Sandbox UUID, as returned by createSandbox.","name":"sandbox_id","in":"path"},{"schema":{"type":"string","description":"Opaque cursor pointing at the next page. Omit it to read the first page."},"required":false,"description":"Opaque cursor pointing at the next page. Omit it to read the first page.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum number of commands to return. Defaults to 20 and is capped at 100."},"required":false,"description":"Maximum number of commands to return. Defaults to 20 and is capped at 100.","name":"limit","in":"query"}],"responses":{"200":{"description":"Paginated background commands, read from the sandbox data plane.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"command_id":{"type":"string"},"command":{"type":"string"},"signal":{"type":["string","null"]},"heartbeat_status":{"type":"string","enum":["disabled","healthy","degraded"]},"last_heartbeat_at":{"type":["string","null"]},"last_heartbeat_error":{"type":["string","null"]},"heartbeat_failure_count":{"type":"integer","minimum":0},"status":{"type":"string","enum":["pending","running","completed","failed","canceled"]},"exit_code":{"type":["integer","null"]},"started_at":{"type":["string","null"]},"finished_at":{"type":["string","null"]}},"required":["command_id","command","signal","heartbeat_status","last_heartbeat_at","last_heartbeat_error","heartbeat_failure_count","status","exit_code","started_at","finished_at"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Sandbox Commands","x-canonical-documentation":{"domain":"runtime","resource":"Sandboxes","subgroup":"Sandbox Commands","name":"List sandbox background commands","description":"List background commands. Requires project.sandboxes.manage.","operationId":"listSandboxBackgroundCommands"}},"post":{"operationId":"startSandboxBackgroundCommand","tags":["runtime/Sandboxes/Sandbox Commands"],"summary":"Start sandbox background command","description":"Start a background command. Requires project.sandboxes.manage.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Sandbox UUID, as returned by createSandbox."},"required":true,"description":"Sandbox UUID, as returned by createSandbox.","name":"sandbox_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxBackgroundCommandInput"}}}},"responses":{"200":{"description":"Background command metadata, returned immediately while the command keeps running.","content":{"application/json":{"schema":{"type":"object","properties":{"command_id":{"type":"string"},"command":{"type":"string"},"signal":{"type":["string","null"]},"heartbeat_status":{"type":"string","enum":["disabled","healthy","degraded"]},"last_heartbeat_at":{"type":["string","null"]},"last_heartbeat_error":{"type":["string","null"]},"heartbeat_failure_count":{"type":"integer","minimum":0},"status":{"type":"string","enum":["pending","running","completed","failed","canceled"]},"exit_code":{"type":["integer","null"]},"started_at":{"type":["string","null"]},"finished_at":{"type":["string","null"]}},"required":["command_id","command","signal","heartbeat_status","last_heartbeat_at","last_heartbeat_error","heartbeat_failure_count","status","exit_code","started_at","finished_at"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Sandbox Commands","x-canonical-documentation":{"domain":"runtime","resource":"Sandboxes","subgroup":"Sandbox Commands","name":"Start sandbox background command","description":"Start a background command. Requires project.sandboxes.manage.","operationId":"startSandboxBackgroundCommand"}}},"/sandboxes/{sandbox_id}/commands/{command_id}":{"get":{"operationId":"getSandboxBackgroundCommand","tags":["runtime/Sandboxes/Sandbox Commands"],"summary":"Get sandbox background command","description":"Get a background command. Requires project.sandboxes.manage.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Sandbox UUID, as returned by createSandbox."},"required":true,"description":"Sandbox UUID, as returned by createSandbox.","name":"sandbox_id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Background command ID, as returned by startSandboxBackgroundCommand."},"required":true,"description":"Background command ID, as returned by startSandboxBackgroundCommand.","name":"command_id","in":"path"}],"responses":{"200":{"description":"Background command.","content":{"application/json":{"schema":{"type":"object","properties":{"command_id":{"type":"string"},"command":{"type":"string"},"signal":{"type":["string","null"]},"heartbeat_status":{"type":"string","enum":["disabled","healthy","degraded"]},"last_heartbeat_at":{"type":["string","null"]},"last_heartbeat_error":{"type":["string","null"]},"heartbeat_failure_count":{"type":"integer","minimum":0},"status":{"type":"string","enum":["pending","running","completed","failed","canceled"]},"exit_code":{"type":["integer","null"]},"started_at":{"type":["string","null"]},"finished_at":{"type":["string","null"]}},"required":["command_id","command","signal","heartbeat_status","last_heartbeat_at","last_heartbeat_error","heartbeat_failure_count","status","exit_code","started_at","finished_at"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Sandbox Commands","x-canonical-documentation":{"domain":"runtime","resource":"Sandboxes","subgroup":"Sandbox Commands","name":"Get sandbox background command","description":"Get a background command. Requires project.sandboxes.manage.","operationId":"getSandboxBackgroundCommand"}}},"/sandboxes/{sandbox_id}/commands/{command_id}/output":{"get":{"operationId":"getSandboxBackgroundCommandOutput","tags":["runtime/Sandboxes/Sandbox Commands"],"summary":"Get sandbox background command output","description":"Get background command output. Requires project.sandboxes.manage.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Sandbox UUID, as returned by createSandbox."},"required":true,"description":"Sandbox UUID, as returned by createSandbox.","name":"sandbox_id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Background command ID, as returned by startSandboxBackgroundCommand."},"required":true,"description":"Background command ID, as returned by startSandboxBackgroundCommand.","name":"command_id","in":"path"}],"responses":{"200":{"description":"Stdout and stderr of the background command.","content":{"application/json":{"schema":{"type":"object","properties":{"command_id":{"type":"string"},"command":{"type":"string"},"signal":{"type":["string","null"]},"heartbeat_status":{"type":"string","enum":["disabled","healthy","degraded"]},"last_heartbeat_at":{"type":["string","null"]},"last_heartbeat_error":{"type":["string","null"]},"heartbeat_failure_count":{"type":"integer","minimum":0},"status":{"type":"string","enum":["pending","running","completed","failed","canceled"]},"exit_code":{"type":["integer","null"]},"started_at":{"type":["string","null"]},"finished_at":{"type":["string","null"]},"stdout":{"type":"string","description":"Standard output of the background command."},"stderr":{"type":"string","description":"Standard error of the background command."},"stdout_truncated":{"type":"boolean","description":"Whether the runtime truncated standard output."},"stderr_truncated":{"type":"boolean","description":"Whether the runtime truncated standard error."}},"required":["command_id","command","signal","heartbeat_status","last_heartbeat_at","last_heartbeat_error","heartbeat_failure_count","status","exit_code","started_at","finished_at","stdout","stderr","stdout_truncated","stderr_truncated"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Sandbox Commands","x-canonical-documentation":{"domain":"runtime","resource":"Sandboxes","subgroup":"Sandbox Commands","name":"Get sandbox background command output","description":"Get background command output. Requires project.sandboxes.manage.","operationId":"getSandboxBackgroundCommandOutput"}}},"/sandboxes/{sandbox_id}/commands/{command_id}/cancel":{"post":{"operationId":"cancelSandboxBackgroundCommand","tags":["runtime/Sandboxes/Sandbox Commands"],"summary":"Cancel sandbox background command","description":"Cancel a background command. Requires project.sandboxes.manage.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Sandbox UUID, as returned by createSandbox."},"required":true,"description":"Sandbox UUID, as returned by createSandbox.","name":"sandbox_id","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Background command ID, as returned by startSandboxBackgroundCommand."},"required":true,"description":"Background command ID, as returned by startSandboxBackgroundCommand.","name":"command_id","in":"path"}],"responses":{"200":{"description":"Background command.","content":{"application/json":{"schema":{"type":"object","properties":{"command_id":{"type":"string"},"command":{"type":"string"},"signal":{"type":["string","null"]},"heartbeat_status":{"type":"string","enum":["disabled","healthy","degraded"]},"last_heartbeat_at":{"type":["string","null"]},"last_heartbeat_error":{"type":["string","null"]},"heartbeat_failure_count":{"type":"integer","minimum":0},"status":{"type":"string","enum":["pending","running","completed","failed","canceled"]},"exit_code":{"type":["integer","null"]},"started_at":{"type":["string","null"]},"finished_at":{"type":["string","null"]}},"required":["command_id","command","signal","heartbeat_status","last_heartbeat_at","last_heartbeat_error","heartbeat_failure_count","status","exit_code","started_at","finished_at"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Sandbox Commands","x-canonical-documentation":{"domain":"runtime","resource":"Sandboxes","subgroup":"Sandbox Commands","name":"Cancel sandbox background command","description":"Cancel a background command. Requires project.sandboxes.manage.","operationId":"cancelSandboxBackgroundCommand"}}},"/sandboxes/{sandbox_id}/commands/run":{"post":{"operationId":"runSandboxCommand","tags":["runtime/Sandboxes/Sandbox Commands"],"summary":"Run sandbox command","description":"Run a sandbox command. Requires project.sandboxes.manage.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Sandbox UUID, as returned by createSandbox."},"required":true,"description":"Sandbox UUID, as returned by createSandbox.","name":"sandbox_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxCommandInput"}}}},"responses":{"200":{"description":"Result of the short-lived command.","content":{"application/json":{"schema":{"type":"object","properties":{"stdout":{"type":"string"},"stderr":{"type":"string"},"exit_code":{"type":"integer"}},"required":["stdout","stderr","exit_code"],"description":"Result of the command, run to completion."}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Sandbox Commands","x-canonical-documentation":{"domain":"runtime","resource":"Sandboxes","subgroup":"Sandbox Commands","name":"Run sandbox command","description":"Run a sandbox command. Requires project.sandboxes.manage.","operationId":"runSandboxCommand"}}},"/sandboxes/{sandbox_id}/commands/stream":{"post":{"operationId":"streamSandboxCommand","tags":["runtime/Sandboxes/Sandbox Commands"],"summary":"Stream sandbox command","description":"Stream a sandbox command. Requires project.sandboxes.manage.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Sandbox UUID, as returned by createSandbox."},"required":true,"description":"Sandbox UUID, as returned by createSandbox.","name":"sandbox_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxCommandInput"}}}},"responses":{"200":{"description":"Upstream NDJSON command stream, preserved as sent by the sandbox: one event per line.","content":{"application/x-ndjson":{"schema":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["stdout"]},"data":{"type":"string"}},"required":["type","data"]},{"type":"object","properties":{"type":{"type":"string","enum":["stderr"]},"data":{"type":"string"}},"required":["type","data"]},{"type":"object","properties":{"type":{"type":"string","enum":["exit"]},"exit_code":{"type":"integer","description":"Exit code of the command."}},"required":["type","exit_code"]},{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"data":{"type":"string"}},"required":["type","data"]},{"type":"object","properties":{"type":{"type":"string","enum":["heartbeat"]}},"required":["type"]}],"description":"One command stream event per line: output chunks, heartbeats, then the exit code."}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Sandbox Commands","x-canonical-documentation":{"domain":"runtime","resource":"Sandboxes","subgroup":"Sandbox Commands","name":"Stream sandbox command","description":"Stream a sandbox command. Requires project.sandboxes.manage.","operationId":"streamSandboxCommand"}}},"/sandboxes/{sandbox_id}/environment":{"get":{"operationId":"getSandboxEnvironment","tags":["runtime/Sandboxes/Sandbox Environment"],"summary":"Get sandbox environment snapshot","description":"Get the sandbox environment. Requires project.sandboxes.manage.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Sandbox UUID, as returned by createSandbox."},"required":true,"description":"Sandbox UUID, as returned by createSandbox.","name":"sandbox_id","in":"path"}],"responses":{"200":{"description":"Environment variable snapshot copied into the sandbox: variable names with redacted values.","content":{"application/json":{"schema":{"type":"object","properties":{"env":{"type":"object","additionalProperties":{"type":"string"},"description":"Environment variable names copied into the sandbox, with redacted values."}},"required":["env"]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Sandbox Environment","x-canonical-documentation":{"domain":"runtime","resource":"Sandboxes","subgroup":"Sandbox Environment","name":"Get sandbox environment snapshot","description":"Get the sandbox environment. Requires project.sandboxes.manage.","operationId":"getSandboxEnvironment"}}},"/sandboxes/{sandbox_id}/heartbeat":{"post":{"operationId":"heartbeatSandbox","tags":["runtime/Sandboxes/Sandbox Health"],"summary":"Update sandbox activity","description":"Record sandbox activity. Requires project.sandboxes.manage.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Sandbox UUID, as returned by createSandbox."},"required":true,"description":"Sandbox UUID, as returned by createSandbox.","name":"sandbox_id","in":"path"}],"responses":{"200":{"description":"Activity recorded to prevent idle cleanup. Fixed expiry is unchanged and the runtime is not restarted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Sandbox Health","x-canonical-documentation":{"domain":"runtime","resource":"Sandboxes","subgroup":"Sandbox Health","name":"Update sandbox activity","description":"Record sandbox activity. Requires project.sandboxes.manage.","operationId":"heartbeatSandbox"}}},"/sandboxes/{sandbox_id}/healthz":{"get":{"operationId":"checkSandboxHealth","tags":["runtime/Sandboxes/Sandbox Health"],"summary":"Check sandbox health","description":"Check sandbox health. Requires project.sandboxes.manage.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Sandbox UUID, as returned by createSandbox."},"required":true,"description":"Sandbox UUID, as returned by createSandbox.","name":"sandbox_id","in":"path"}],"responses":{"200":{"description":"Health probe: whether the sandbox runtime responds.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","description":"Health: whether the sandbox runtime responds. Readiness: whether it is ready for work."},"status":{"type":"string","enum":["pending","provisioning","running","error","deleting"]},"reason":{"type":["string","null"]}},"required":["ok","status","reason"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Sandbox Health","x-canonical-documentation":{"domain":"runtime","resource":"Sandboxes","subgroup":"Sandbox Health","name":"Check sandbox health","description":"Check sandbox health. Requires project.sandboxes.manage.","operationId":"checkSandboxHealth"}}},"/sandboxes/{sandbox_id}/readyz":{"get":{"operationId":"checkSandboxReadiness","tags":["runtime/Sandboxes/Sandbox Health"],"summary":"Check sandbox readiness","description":"Check sandbox readiness. Requires project.sandboxes.manage.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Sandbox UUID, as returned by createSandbox."},"required":true,"description":"Sandbox UUID, as returned by createSandbox.","name":"sandbox_id","in":"path"}],"responses":{"200":{"description":"Readiness probe: whether the sandbox runtime is ready for work.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","description":"Health: whether the sandbox runtime responds. Readiness: whether it is ready for work."},"status":{"type":"string","enum":["pending","provisioning","running","error","deleting"]},"reason":{"type":["string","null"]}},"required":["ok","status","reason"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Sandbox Health","x-canonical-documentation":{"domain":"runtime","resource":"Sandboxes","subgroup":"Sandbox Health","name":"Check sandbox readiness","description":"Check sandbox readiness. Requires project.sandboxes.manage.","operationId":"checkSandboxReadiness"}}},"/sandboxes/{sandbox_id}/terminal":{"get":{"operationId":"openSandboxTerminal","tags":["runtime/Sandboxes/Sandbox Terminal"],"summary":"Open sandbox terminal","description":"Open a sandbox terminal. Requires project.sandboxes.manage.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Sandbox UUID, as returned by createSandbox."},"required":true,"description":"Sandbox UUID, as returned by createSandbox.","name":"sandbox_id","in":"path"}],"responses":{"200":{"description":"Terminal shell page. The browser opens a WebSocket on the same path, which the API forwards to the sandbox runtime.","content":{"text/html":{"schema":{"type":"string","description":"Terminal shell page (text/html)."}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Sandbox Terminal","x-canonical-documentation":{"domain":"runtime","resource":"Sandboxes","subgroup":"Sandbox Terminal","name":"Open sandbox terminal","description":"Open a sandbox terminal. Requires project.sandboxes.manage.","operationId":"openSandboxTerminal"}}},"/projects/{project_reference}/cache/entries":{"get":{"operationId":"listCacheEntries","tags":["runtime/Cache/Project Cache"],"summary":"List cache entries","description":"Lists cache entry keys and expiry, optionally filtered by a glob pattern. Results follow Redis scan order, so pages can repeat a key and page_info.prev is always null. Requires project.cache.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[a-zA-Z0-9_:.*\\-/]+$","description":"Glob pattern over keys, such as `transform:*`: 1 to 512 key characters, with * for any sequence. Defaults to `*`."},"required":false,"description":"Glob pattern over keys, such as `transform:*`: 1 to 512 key characters, with * for any sequence. Defaults to `*`.","name":"pattern","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Opaque page_info.next from a previous page, bound to the same project and pattern. Expires after five minutes."},"required":false,"description":"Opaque page_info.next from a previous page, bound to the same project and pattern. Expires after five minutes.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Entries per page, 1 to 100. Defaults to 20."},"required":false,"description":"Entries per page, 1 to 100. Defaults to 20.","name":"limit","in":"query"}],"responses":{"200":{"description":"A page of cache entries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CacheEntryList"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Cache","x-canonical-documentation":{"domain":"runtime","resource":"Cache","subgroup":"Project Cache","name":"List cache entries","description":"Lists cache entry keys and expiry, optionally filtered by a glob pattern. Results follow Redis scan order, so pages can repeat a key and page_info.prev is always null. Requires project.cache.read.","operationId":"listCacheEntries"}},"delete":{"operationId":"deleteCacheEntries","tags":["runtime/Cache/Project Cache"],"summary":"Delete cache entries","description":"Deletes every cache entry whose key matches the required glob pattern. Pattern `*` clears the project cache. Requires project.cache.write; API keys also need delete scope.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[a-zA-Z0-9_:.*\\-/]+$","description":"Glob pattern over keys. Required; `*` deletes every entry in the project cache."},"required":true,"description":"Glob pattern over keys. Required; `*` deletes every entry in the project cache.","name":"pattern","in":"query"}],"responses":{"200":{"description":"Every entry matching the pattern was deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Cache","x-canonical-documentation":{"domain":"runtime","resource":"Cache","subgroup":"Project Cache","name":"Delete cache entries","description":"Deletes every cache entry whose key matches the required glob pattern. Pattern `*` clears the project cache. Requires project.cache.write; API keys also need delete scope.","operationId":"deleteCacheEntries"}}},"/projects/{project_reference}/cache/entries/{key}":{"get":{"operationId":"getCacheEntry","tags":["runtime/Cache/Project Cache"],"summary":"Get cache entry","description":"Reads one cache entry. A missing or expired key returns found=false with a null value, not an error. Requires project.cache.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[a-zA-Z0-9_:.\\-/]+$","description":"Cache key, percent-encoded (`/` as `%2F`). 1 to 512 characters."},"required":true,"description":"Cache key, 1 to 512 characters: letters, digits, underscore, colon, dot, hyphen and slash. No \".\" or \"..\" segments between slashes.","name":"key","in":"path"}],"responses":{"200":{"description":"The cache entry or a miss.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CacheEntry"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Cache","x-canonical-documentation":{"domain":"runtime","resource":"Cache","subgroup":"Project Cache","name":"Get cache entry","description":"Reads one cache entry. A missing or expired key returns found=false with a null value, not an error. Requires project.cache.read.","operationId":"getCacheEntry"}},"put":{"operationId":"writeCacheEntry","tags":["runtime/Cache/Project Cache"],"summary":"Write cache entry","description":"Creates or replaces one cache entry. ttl_seconds defaults to 300. Requires project.cache.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[a-zA-Z0-9_:.\\-/]+$","description":"Cache key, percent-encoded (`/` as `%2F`). 1 to 512 characters."},"required":true,"description":"Cache key, 1 to 512 characters: letters, digits, underscore, colon, dot, hyphen and slash. No \".\" or \"..\" segments between slashes.","name":"key","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"string","description":"UTF-8 string value. Values over 1 KB are stored compressed."},"ttl_seconds":{"type":"integer","minimum":1,"maximum":86400,"description":"Seconds until the entry expires, 1 to 86400. Defaults to 300 when omitted; the previous TTL is never kept."}},"required":["value"]}}}},"responses":{"200":{"description":"The written entry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CacheEntrySummary"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Cache","x-canonical-documentation":{"domain":"runtime","resource":"Cache","subgroup":"Project Cache","name":"Write cache entry","description":"Creates or replaces one cache entry. ttl_seconds defaults to 300. Requires project.cache.write.","operationId":"writeCacheEntry"}},"delete":{"operationId":"deleteCacheEntry","tags":["runtime/Cache/Project Cache"],"summary":"Delete cache entry","description":"Deletes one cache entry. Idempotent: an absent key returns status absent. Requires project.cache.write; API keys also need delete scope.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[a-zA-Z0-9_:.\\-/]+$","description":"Cache key, percent-encoded (`/` as `%2F`). 1 to 512 characters."},"required":true,"description":"Cache key, 1 to 512 characters: letters, digits, underscore, colon, dot, hyphen and slash. No \".\" or \"..\" segments between slashes.","name":"key","in":"path"}],"responses":{"200":{"description":"The entry is gone: deleted, or no entry existed for the key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Cache","x-canonical-documentation":{"domain":"runtime","resource":"Cache","subgroup":"Project Cache","name":"Delete cache entry","description":"Deletes one cache entry. Idempotent: an absent key returns status absent. Requires project.cache.write; API keys also need delete scope.","operationId":"deleteCacheEntry"}}},"/projects/{project_reference}/cache/entries/read":{"post":{"operationId":"readCacheEntries","tags":["runtime/Cache/Project Cache"],"summary":"Read cache entries","description":"Reads up to 100 cache entries in request order. Misses carry found=false. Returns 413 PAYLOAD_TOO_LARGE when the values together exceed 10 MiB. Requires project.cache.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[a-zA-Z0-9_:.\\-/]+$","description":"Cache key, 1 to 512 characters: letters, digits, underscore, colon, dot, hyphen and slash. No \".\" or \"..\" segments between slashes."},"minItems":1,"maxItems":100,"description":"1 to 100 distinct cache keys."}},"required":["keys"]}}}},"responses":{"200":{"description":"One result per requested key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CacheEntryBatch"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Cache","x-canonical-documentation":{"domain":"runtime","resource":"Cache","subgroup":"Project Cache","name":"Read cache entries","description":"Reads up to 100 cache entries in request order. Misses carry found=false. Returns 413 PAYLOAD_TOO_LARGE when the values together exceed 10 MiB. Requires project.cache.read.","operationId":"readCacheEntries"}}},"/projects/{project_reference}/cache/entries/write":{"post":{"operationId":"writeCacheEntries","tags":["runtime/Cache/Project Cache"],"summary":"Write cache entries","description":"Creates or replaces up to 100 cache entries in one transaction: all are written or none. Requires project.cache.write.","parameters":[{"$ref":"#/components/parameters/ProjectReference"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[a-zA-Z0-9_:.\\-/]+$","description":"Cache key, 1 to 512 characters: letters, digits, underscore, colon, dot, hyphen and slash. No \".\" or \"..\" segments between slashes."},"value":{"type":"string","description":"UTF-8 string value."},"ttl_seconds":{"type":"integer","minimum":1,"maximum":86400,"description":"Seconds until the entry expires, 1 to 86400. Defaults to 300 when omitted; the previous TTL is never kept."}},"required":["key","value"]},"minItems":1,"maxItems":100,"description":"1 to 100 entries with distinct keys. Written in one transaction; any invalid entry rejects the request."}},"required":["entries"]}}}},"responses":{"200":{"description":"The written entries in request order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CacheEntryWriteBatch"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Cache","x-canonical-documentation":{"domain":"runtime","resource":"Cache","subgroup":"Project Cache","name":"Write cache entries","description":"Creates or replaces up to 100 cache entries in one transaction: all are written or none. Requires project.cache.write.","operationId":"writeCacheEntries"}}},"/projects/{project_reference}/logs":{"get":{"operationId":"listProjectLogs","tags":["observability/Logs/Log entries"],"summary":"List log entries","description":"List project log entries. Requires project.logs.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"date-time","description":"Start time (RFC 3339). Defaults to 1 hour ago. Logs are kept for 31 days and one query spans at most 30 days; an older start or a wider range returns 400. Cannot be combined with cursor."},"required":false,"description":"Start time (RFC 3339). Defaults to 1 hour ago. Logs are kept for 31 days and one query spans at most 30 days; an older start or a wider range returns 400. Cannot be combined with cursor.","name":"start","in":"query"},{"schema":{"type":"string","format":"date-time","description":"End time (RFC 3339). Defaults to now. Cannot be combined with cursor."},"required":false,"description":"End time (RFC 3339). Defaults to now. Cannot be combined with cursor.","name":"end","in":"query"},{"schema":{"type":"string","description":"Opaque page_info.next from a previous page. It continues the original window and sort order; repeat the same filters with every cursor."},"required":false,"description":"Opaque page_info.next from a previous page. It continues the original window and sort order; repeat the same filters with every cursor.","name":"cursor","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":1000,"default":100,"description":"Max entries to return (default: 100, max: 1000)"},"required":false,"description":"Max entries to return (default: 100, max: 1000)","name":"limit","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"description":"Sort order by timestamp. Defaults to \"desc\", newest first. Entries that share a timestamp keep one stable order."},"required":false,"description":"Sort order by timestamp. Defaults to \"desc\", newest first. Entries that share a timestamp keep one stable order.","name":"sort_order","in":"query"},{"schema":{"type":"string","enum":["error","warn","info","debug"],"description":"Filter by log level"},"required":false,"description":"Filter by log level","name":"level","in":"query"},{"schema":{"type":"string","maxLength":200,"description":"Free-text search over the fields each entry shows"},"required":false,"description":"Free-text search over the fields each entry shows","name":"search","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9._-]+$","description":"Exact runtime environment tag, for example preview or production. Untagged telemetry is excluded."},"required":false,"description":"Exact runtime environment tag, for example preview or production. Untagged telemetry is excluded.","name":"environment","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":253,"pattern":"^[A-Za-z0-9.-]+(?::[0-9]+)?$","description":"Exact request host (without scheme or path), for example demo.preview.veryfront.com. Untagged telemetry is excluded."},"required":false,"description":"Exact request host (without scheme or path), for example demo.preview.veryfront.com. Untagged telemetry is excluded.","name":"host","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._-]+$","description":"Exact release ID on emitted logs; untagged logs are excluded."},"required":false,"description":"Exact release ID on emitted logs; untagged logs are excluded.","name":"release_id","in":"query"},{"schema":{"type":"string","enum":["veryfront-server","veryfront-api","veryfront-proxy"],"description":"Filter by service: veryfront-server, veryfront-api or veryfront-proxy."},"required":false,"description":"Filter by service: veryfront-server, veryfront-api or veryfront-proxy.","name":"service","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9._-]+$","description":"Filter by exact trace ID to correlate logs with a distributed trace."},"required":false,"description":"Filter by exact trace ID to correlate logs with a distributed trace.","name":"trace_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._-]+$","description":"Filter by exact request ID."},"required":false,"description":"Filter by exact request ID.","name":"request_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._-]+$","description":"Filter by exact run ID to see every service line that belongs to one run."},"required":false,"description":"Filter by exact run ID to see every service line that belongs to one run.","name":"run_id","in":"query"},{"schema":{"type":"string","enum":["timestamp"],"description":"Sort field. Defaults to \"timestamp\"."},"required":false,"name":"sort_by","in":"query"}],"responses":{"200":{"description":"Recent project log entries from the runtime (veryfront-server), the API (veryfront-api) and the proxy (veryfront-proxy). Only lines stamped with the project id are returned; API and proxy lines carry only request fields; each entry carries run_id when the line belongs to a run. Page with page_info.next: a page can hold fewer entries than limit, or none, and still carry it.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"string"},"level":{"type":"string"},"message":{"type":"string"},"service":{"type":"string"},"trace_id":{"type":"string"},"request_id":{"type":"string"},"run_id":{"type":"string"},"environment":{"type":"string"},"host":{"type":"string"},"release_id":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"}}},"required":["timestamp","level","message","service"]},"description":"Log entries in (timestamp, tie key) order. A page can hold fewer entries than limit, or none, and still carry page_info.next."},"page_info":{"$ref":"#/components/schemas/PageInfo"},"stats":{"type":"object","properties":{"bytes_processed":{"type":"number"},"lines_processed":{"type":"number"},"query_time_ms":{"type":"number"}},"required":["bytes_processed","lines_processed","query_time_ms"]}},"required":["data","page_info","stats"]}}}},"400":{"description":"Invalid log query parameters, including a time range beyond retention","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden — project.logs.read capability required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Too many log entries share one timestamp to page through them; add a filter","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Log provider error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service unavailable — log service not configured or unreachable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project logs","x-canonical-documentation":{"domain":"observability","resource":"Logs","subgroup":"Log entries","name":"List log entries","description":"List project log entries. Requires project.logs.read.","operationId":"listProjectLogs"}}},"/projects/{project_reference}/traces/{trace_id}/spans":{"get":{"operationId":"listProjectTraceSpans","tags":["observability/Traces/Trace spans"],"summary":"List trace spans","description":"List trace spans. Requires project.logs.read.","parameters":[{"schema":{"type":"string","description":"Project slug or UUID. The resolved project is used to scope all trace reads server-side."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","description":"Trace ID from Grafana Cloud Tempo."},"required":true,"name":"trace_id","in":"path"},{"schema":{"type":"string","description":"Opaque continuation from page_info.next or page_info.prev."},"required":false,"description":"Opaque continuation from page_info.next or page_info.prev.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":200,"description":"Max spans to return (default: 200, max: 1000)."},"required":false,"description":"Max spans to return (default: 200, max: 1000).","name":"limit","in":"query"},{"schema":{"type":"string","enum":["ok","error","unset","unknown"],"description":"Optional span status filter. Use ok, error, unset, or unknown."},"required":false,"description":"Optional span status filter. Use ok, error, unset, or unknown.","name":"status","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"asc","description":"Order by span start time. Defaults to \"asc\"."},"required":false,"description":"Order by span start time. Defaults to \"asc\".","name":"sort_order","in":"query"}],"responses":{"200":{"description":"Project-visible spans of the trace ordered by start time; page with the cursor. Set status=error to retrieve every error span.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"span_id":{"type":"string"},"parent_span_id":{"type":["string","null"]},"name":{"type":"string"},"service":{"type":"string"},"started_at":{"type":"string"},"ended_at":{"type":["string","null"]},"duration_ms":{"type":"number"},"status":{"type":"string","enum":["ok","error","unset","unknown"]},"status_message":{"type":["string","null"]},"attributes":{"type":"object","additionalProperties":{"type":"string"}},"events":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"timestamp":{"type":"string"},"attributes":{"type":"object","additionalProperties":{"type":"string"}}},"required":["name","timestamp","attributes"]}}},"required":["span_id","parent_span_id","name","service","started_at","ended_at","duration_ms","status","status_message","attributes","events"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project traces","x-canonical-documentation":{"domain":"observability","resource":"Traces","subgroup":"Trace spans","name":"List trace spans","description":"List trace spans. Requires project.logs.read.","operationId":"listProjectTraceSpans"}}},"/projects/{project_reference}/traces/{trace_id}":{"get":{"operationId":"getProjectTrace","tags":["observability/Traces/Project traces"],"summary":"Get trace","description":"Get a trace. Requires project.logs.read.","parameters":[{"schema":{"type":"string","description":"Project slug or UUID. The resolved project is used to scope all trace reads server-side."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","description":"Trace ID from Grafana Cloud Tempo."},"required":true,"name":"trace_id","in":"path"}],"responses":{"200":{"description":"Project-scoped trace detail from Grafana Cloud Tempo. `spans` holds at most 200 entries: the root span, error spans and their ancestors, then remaining spans. When `span_count` is larger, list the rest with GET /projects/{project_reference}/traces/{trace_id}/spans (status=error returns every error span).","content":{"application/json":{"schema":{"type":"object","properties":{"trace_id":{"type":"string"},"root_span_name":{"type":"string"},"root_service":{"type":"string"},"started_at":{"type":"string"},"duration_ms":{"type":"number"},"status":{"type":"string","enum":["ok","error","unset","unknown"]},"span_count":{"type":"number"},"services":{"type":"array","items":{"type":"string"}},"project_id":{"type":"string"},"project_slug":{"type":"string"},"environment":{"type":"string"},"host":{"type":"string"},"root_span_id":{"type":["string","null"]},"spans":{"type":"array","items":{"type":"object","properties":{"span_id":{"type":"string"},"parent_span_id":{"type":["string","null"]},"name":{"type":"string"},"service":{"type":"string"},"started_at":{"type":"string"},"ended_at":{"type":["string","null"]},"duration_ms":{"type":"number"},"status":{"type":"string","enum":["ok","error","unset","unknown"]},"status_message":{"type":["string","null"]},"attributes":{"type":"object","additionalProperties":{"type":"string"}},"events":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"timestamp":{"type":"string"},"attributes":{"type":"object","additionalProperties":{"type":"string"}}},"required":["name","timestamp","attributes"]}}},"required":["span_id","parent_span_id","name","service","started_at","ended_at","duration_ms","status","status_message","attributes","events"]}}},"required":["trace_id","root_span_name","root_service","started_at","duration_ms","status","span_count","services","project_id","root_span_id","spans"]}}}},"400":{"description":"Invalid trace identifier","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden — project.logs.read capability required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project or trace not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"External trace provider error from Grafana Cloud Tempo.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Trace service unavailable or Grafana Cloud Tempo read path is not configured.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project traces","x-canonical-documentation":{"domain":"observability","resource":"Traces","subgroup":"Project traces","name":"Get trace","description":"Get a trace. Requires project.logs.read.","operationId":"getProjectTrace"}}},"/projects/{project_reference}/traces":{"get":{"operationId":"listProjectTraces","tags":["observability/Traces/Trace Search"],"summary":"Query traces","description":"Query project traces. Requires project.logs.read.","parameters":[{"schema":{"type":"string","description":"Project slug or UUID. The resolved project is used to scope all trace reads server-side."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9._-]+$","description":"Exact runtime environment tag, for example preview or production. Untagged telemetry is excluded."},"required":false,"description":"Exact runtime environment tag, for example preview or production. Untagged telemetry is excluded.","name":"environment","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":253,"pattern":"^[A-Za-z0-9.-]+(?::[0-9]+)?$","description":"Exact request host (without scheme or path), for example demo.preview.veryfront.com. Untagged telemetry is excluded."},"required":false,"description":"Exact request host (without scheme or path), for example demo.preview.veryfront.com. Untagged telemetry is excluded.","name":"host","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Start time. ISO 8601 timestamp accepted by the Veryfront API. The backend converts it to the unix-second format required by Grafana Cloud Tempo. Traces are kept for 30 days and one search spans at most 30 days; an older start or a wider range returns 400."},"required":false,"description":"Start time. ISO 8601 timestamp accepted by the Veryfront API. The backend converts it to the unix-second format required by Grafana Cloud Tempo. Traces are kept for 30 days and one search spans at most 30 days; an older start or a wider range returns 400.","name":"start","in":"query"},{"schema":{"type":"string","format":"date-time","description":"End time. ISO 8601 timestamp accepted by the Veryfront API. The backend converts it to the unix-second format required by Grafana Cloud Tempo. Traces are kept for 30 days and one search spans at most 30 days; an older start or a wider range returns 400."},"required":false,"description":"End time. ISO 8601 timestamp accepted by the Veryfront API. The backend converts it to the unix-second format required by Grafana Cloud Tempo. Traces are kept for 30 days and one search spans at most 30 days; an older start or a wider range returns 400.","name":"end","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20,"description":"Max traces to return (default: 20, max: 100)."},"required":false,"description":"Max traces to return (default: 20, max: 100).","name":"limit","in":"query"},{"schema":{"type":"string","maxLength":200,"description":"Optional OpenTelemetry service.name filter, for example veryfront-api, veryfront-studio, or veryfront-server."},"required":false,"description":"Optional OpenTelemetry service.name filter, for example veryfront-api, veryfront-studio, or veryfront-server.","name":"service","in":"query"},{"schema":{"type":"string","enum":["ok","error","unset"],"description":"Optional Tempo status filter. Use ok, error, or unset. error matches traces with an error span of the project or without project context anywhere in the trace, as trace detail reports."},"required":false,"description":"Optional Tempo status filter. Use ok, error, or unset. error matches traces with an error span of the project or without project context anywhere in the trace, as trace detail reports.","name":"status","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"description":"Optional minimum trace duration in milliseconds."},"required":false,"description":"Optional minimum trace duration in milliseconds.","name":"min_duration_ms","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Optional run ID. Returns traces with a span whose run.id, parent.run.id, or agent.run.id is this run, or that contain its runtime control-plane request."},"required":false,"description":"Optional run ID. Returns traces with a span whose run.id, parent.run.id, or agent.run.id is this run, or that contain its runtime control-plane request.","name":"run_id","in":"query"},{"schema":{"type":"string","enum":["timestamp","duration","status","service"],"default":"timestamp","description":"Field to order the returned traces by. Defaults to timestamp; ties break by trace ID ascending. MCP and GraphQL preserve the search's newest-first nanosecond order when both sort controls are omitted."},"required":false,"description":"Field to order the returned traces by. Defaults to timestamp; ties break by trace ID ascending. MCP and GraphQL preserve the search's newest-first nanosecond order when both sort controls are omitted.","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort direction. Defaults to desc."},"required":false,"description":"Sort direction. Defaults to desc.","name":"sort_order","in":"query"}],"responses":{"200":{"description":"Compact, project-scoped summaries of recent Grafana Cloud Tempo traces","content":{"application/json":{"schema":{"type":"object","properties":{"traces":{"type":"array","items":{"type":"object","properties":{"trace_id":{"type":"string"},"root_span_name":{"type":"string"},"root_service":{"type":"string"},"started_at":{"type":"string"},"duration_ms":{"type":"number"},"status":{"type":"string","enum":["ok","error","unset","unknown"]},"span_count":{"type":"number"},"services":{"type":"array","items":{"type":"string"}},"project_id":{"type":"string"},"project_slug":{"type":"string"},"environment":{"type":"string"},"host":{"type":"string"}},"required":["trace_id","root_span_name","root_service","started_at","duration_ms","status","span_count","services","project_id"]}},"stats":{"type":"object","properties":{"query_time_ms":{"type":"number"}},"required":["query_time_ms"]}},"required":["traces","stats"]}}}},"400":{"description":"Invalid trace query parameters, including a time range beyond retention","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden — project.logs.read capability required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"External trace provider error from Grafana Cloud Tempo.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Trace service unavailable or Grafana Cloud Tempo read path is not configured.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project traces","x-canonical-documentation":{"domain":"observability","resource":"Traces","subgroup":"Trace Search","name":"Query traces","description":"Query project traces. Requires project.logs.read.","operationId":"listProjectTraces"}}},"/projects/{project_reference}/metrics/query":{"post":{"operationId":"queryProjectMetrics","tags":["observability/Metrics/Metric series"],"summary":"Query metrics","description":"Query project metrics. Requires project.metrics.read.","parameters":[{"schema":{"type":"string","description":"Project slug or UUID. The resolved project is used to scope all metric reads server-side."},"required":true,"name":"project_reference","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"metric":{"type":"string","minLength":1,"maxLength":200,"description":"Prometheus metric name. Raw PromQL is not accepted."},"start":{"type":"string","format":"date-time","description":"Start time (RFC 3339). Defaults to 1 hour ago. Metrics are kept for 395 days and one query spans at most 31 days; an older start or a wider range returns 400."},"end":{"type":"string","format":"date-time","description":"End time (RFC 3339). Defaults to now."},"step":{"type":"string","minLength":1,"maxLength":20,"default":"60s","description":"Prometheus query step, for example 60s."},"aggregation":{"type":"string","enum":["none","sum","avg","min","max","count"],"default":"none","description":"Aggregation to apply to the project-scoped metric selector."},"labels":{"type":"object","additionalProperties":{"type":"string"},"description":"Optional allowlisted label filters such as environment, service_name or status_code. environment is the project environment on every metric: its name, matched case-insensitively, or preview for a branch. ai_gateway_* metrics carry it for calls made by a project run. Unknown, platform (deployment_environment) and project-scope labels are rejected."}},"required":["metric"]}}}},"responses":{"200":{"description":"Project-scoped Prometheus-compatible metric series. The result is never partial: a result over a limit returns 413.","content":{"application/json":{"schema":{"type":"object","properties":{"series":{"type":"array","items":{"type":"object","properties":{"metric":{"type":"string"},"labels":{"type":"object","additionalProperties":{"type":"string"}},"points":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"string"},"value":{"type":"number"}},"required":["timestamp","value"]}}},"required":["metric","labels","points"]}},"stats":{"type":"object","properties":{"query_time_ms":{"type":"number"}},"required":["query_time_ms"]}},"required":["series","stats"]}}}},"400":{"description":"Invalid metric query parameters, including a time range beyond retention","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing project.metrics.read capability","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"The result would not be complete: more than 100 series, a series with more than 11,000 points, or an upstream body over 8 MiB. Add a label filter, choose an aggregation, or use a coarser step or a shorter range.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"External metric provider error from the Prometheus-compatible read path","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Metric service unavailable or Prometheus-compatible read path is not configured","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project metrics","x-canonical-documentation":{"domain":"observability","resource":"Metrics","subgroup":"Metric series","name":"Query metrics","description":"Query project metrics. Requires project.metrics.read.","operationId":"queryProjectMetrics"}}},"/projects/{project_reference}/alerts":{"get":{"operationId":"listProjectAlerts","tags":["observability/Alerts/Project alerts"],"summary":"List alerts","description":"List project alerts. Requires project.logs.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"$ref":"#/components/parameters/PaginationCursor"},{"$ref":"#/components/parameters/PaginationLimit"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Only alerts in one of these statuses (firing, resolved). Comma-separated and/or repeated."},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"desc lists the newest alert first."},"required":false,"description":"desc lists the newest alert first.","name":"sort_order","in":"query"}],"responses":{"200":{"description":"Alert episodes from the last 30 days of retained state history, newest first, including episodes already firing when that history begins, firing and resolved. An alert is one firing of a Veryfront alert rule for this project, such as failing agent or task runs, with the run error code and links to the project error logs and traces for its window. Only alerts labelled with this project are returned.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Identifies this firing of the alert."},"rule_id":{"type":"string","description":"UID of the Grafana alert rule, for example project-agent-run-failures."},"title":{"type":"string"},"status":{"type":"string","enum":["firing","resolved"]},"error_code":{"type":["string","null"],"description":"Terminal error code of the failed runs; null for rules without one."},"run_kind":{"type":["string","null"],"description":"Kind of the runs the alert is about, when the rule tells them apart."},"run_status":{"type":["string","null"],"description":"Status of the unfinished runs the alert is about."},"started_at":{"type":["string","null"],"description":"When the alert fired; null when it fired before the 30 days of retained history."},"resolved_at":{"type":["string","null"]},"_links":{"type":"object","properties":{"logs":{"type":"object","properties":{"href":{"type":"string"}},"required":["href"]},"traces":{"type":"object","properties":{"href":{"type":"string"}},"required":["href"]}},"description":"Investigation links clipped to retained telemetry; omitted when the episode is outside the available window."}},"required":["id","rule_id","title","status","error_code","run_kind","run_status","started_at","resolved_at","_links"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Bad gateway","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project alerts","x-canonical-documentation":{"domain":"observability","resource":"Alerts","subgroup":"Project alerts","name":"List alerts","description":"List project alerts. Requires project.logs.read.","operationId":"listProjectAlerts"}}},"/errors":{"get":{"operationId":"listErrorTypes","summary":"List error types","description":"List API error types.","tags":["observability/Error types/Error types"],"parameters":[{"schema":{"type":"string","enum":["AUTH","RESOURCE","VALIDATION","DATABASE","SUBSCRIPTION","INTEGRATION","INTERNAL"],"description":"Only error types of this category: AUTH, RESOURCE, VALIDATION, DATABASE, SUBSCRIPTION, INTEGRATION, INTERNAL. An unknown value returns 400."},"required":false,"name":"category","in":"query"}],"responses":{"200":{"description":"Every known API error type with its slug, title, HTTP status, and category, sorted by slug. The list is not paginated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListErrorsResponse"}}}},"400":{"description":"Unknown category","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Error metadata","x-canonical-documentation":{"domain":"observability","resource":"Error types","subgroup":"Error types","name":"List error types","description":"List API error types.","operationId":"listErrorTypes"}}},"/errors/{error_type_slug}":{"get":{"operationId":"getErrorType","summary":"Get error type","description":"Get an API error type.","tags":["observability/Error types/Error types"],"parameters":[{"schema":{"type":"string","description":"Error slug identifier (e.g. \"insufficient-credits\"). Returns solution steps and related errors."},"required":true,"description":"Error slug identifier (e.g. \"insufficient-credits\"). Returns solution steps and related errors.","name":"error_type_slug","in":"path"}],"responses":{"200":{"description":"Error type details as JSON, including solution steps and related errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDetail"}}}},"302":{"description":"Redirect when Accept contains text/html but not application/json; media-range quality values are not parsed","headers":{"Location":{"description":"URL of the error documentation.","schema":{"type":"string","format":"uri"}}}},"404":{"description":"Error type not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Error metadata","x-canonical-documentation":{"domain":"observability","resource":"Error types","subgroup":"Error types","name":"Get error type","description":"Get an API error type.","operationId":"getErrorType"}}},"/account/invites":{"get":{"operationId":"listAccountInvites","tags":["identity-access/Users/Account users"],"summary":"List account invites","description":"List the pending invitations on projects the caller owns, grouped per invitee with their projects and roles.","parameters":[{"schema":{"type":"string","description":"Cursor for pagination (account invite row ID)"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["created_at","email"],"default":"created_at","description":"Sort field. Defaults to \"created_at\"."},"required":false,"name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort order. Defaults to \"desc\"."},"required":false,"name":"sort_order","in":"query"}],"responses":{"200":{"description":"Aggregated pending account invites","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["active","pending"]},"user_id":{"type":["string","null"],"format":"uuid"},"invite_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"email":{"type":"string","format":"email"},"name":{"type":["string","null"]},"avatar_src":{"type":["string","null"]},"role":{"type":"string"},"seat_status":{"type":"string","enum":["active","reserved"]},"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["owner","admin","editor","viewer"]}},"required":["id","slug","name","role"]}},"created_at":{"type":["string","null"]}},"required":["id","status","user_id","invite_ids","email","name","avatar_src","role","seat_status","projects"]},"description":"Pending invitations across all projects owned by the authenticated user."},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account directory","x-canonical-documentation":{"domain":"identity-access","resource":"Users","subgroup":"Account users","name":"List account invites","description":"List the pending invitations on projects the caller owns, grouped per invitee with their projects and roles.","operationId":"listAccountInvites"}}},"/accounts/{account_id}/members":{"get":{"operationId":"listAccountMembers","tags":["identity-access/Users/Account users"],"summary":"List account members","description":"List the members of an account with their roles, oldest first. Requires account.members.read.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"},{"$ref":"#/components/parameters/PaginationCursor"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum entries per page. Integer from 1 to 100; defaults to 20."},"required":false,"description":"Maximum entries per page. Integer from 1 to 100; defaults to 20.","name":"limit","in":"query"}],"responses":{"200":{"description":"Members of the account","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AccountMember"},"description":"Account members, oldest first."},"page_info":{"type":"object","properties":{"self":{"type":["string","null"],"description":"Cursor pointing to the current page"},"first":{"type":"null","description":"First page cursor (always null for cursor-based pagination)"},"next":{"type":["string","null"],"description":"Cursor for the next page (null if no more pages)"},"prev":{"type":["string","null"],"description":"Cursor for the previous page (null if on first page)"}},"required":["self","first","next","prev"]}},"required":["data","page_info"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account Members","x-canonical-documentation":{"domain":"identity-access","resource":"Users","subgroup":"Account users","name":"List account members","description":"List the members of an account with their roles, oldest first. Requires account.members.read.","operationId":"listAccountMembers"}}},"/account/users":{"get":{"operationId":"listAccountUsers","tags":["identity-access/Users/Account users"],"summary":"List people on projects you own","description":"List the people on projects the caller owns, grouped per person with their projects and roles; they are project collaborators, not account members.","parameters":[{"schema":{"type":"string","description":"Cursor for pagination (account user row ID)"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["name","type","project_count"],"description":"Sort field. Omitted, the caller comes first, then people are ordered by role, email and ID. With a sort field, ties break by ID ascending."},"required":false,"name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"asc","description":"Sort order. Defaults to \"asc\"."},"required":false,"name":"sort_order","in":"query"}],"responses":{"200":{"description":"People on projects the caller owns, grouped per person","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["active","pending"]},"user_id":{"type":["string","null"],"format":"uuid"},"invite_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"email":{"type":"string","format":"email"},"name":{"type":["string","null"]},"avatar_src":{"type":["string","null"]},"role":{"type":"string"},"seat_status":{"type":"string","enum":["active","reserved"]},"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["owner","admin","editor","viewer"]}},"required":["id","slug","name","role"]}},"created_at":{"type":["string","null"]}},"required":["id","status","user_id","invite_ids","email","name","avatar_src","role","seat_status","projects"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account directory","x-canonical-documentation":{"domain":"identity-access","resource":"Users","subgroup":"Account users","name":"List people on projects you own","description":"List the people on projects the caller owns, grouped per person with their projects and roles; they are project collaborators, not account members.","operationId":"listAccountUsers"}}},"/account/users/{user_id}/analytics/ai-usage":{"get":{"operationId":"getAccountMemberAiUsageAnalytics","tags":["identity-access/Users/Account users"],"summary":"Get account member AI usage analytics","description":"Return one current member's AI credit usage across the authorized account's projects, from the project ledger. Requires account.billing.read.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Current member in the authorized account. This reads the project ledger, not the member personal account or quota rollups. API keys and runtime service credentials are refused."},"required":true,"description":"Current member in the authorized account. This reads the project ledger, not the member personal account or quota rollups. API keys and runtime service credentials are refused.","name":"user_id","in":"path"},{"$ref":"#/components/parameters/UsageQueryPreset"},{"$ref":"#/components/parameters/UsageQueryFrom"},{"$ref":"#/components/parameters/UsageQueryTo"},{"$ref":"#/components/parameters/UsageQueryTimezone"},{"$ref":"#/components/parameters/UsageQueryGranularity"},{"$ref":"#/components/parameters/UsageQueryGroupBy"},{"$ref":"#/components/parameters/UsageQueryCompare"}],"responses":{"200":{"description":"Recorded member AI usage billed to the authorized account, with bounded time controls and optional grouping/comparison.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"object","properties":{"credits_used":{"type":"number","description":"Total credits used."},"requests":{"type":"number","description":"Total AI requests."},"input_tokens":{"type":"number","description":"Total input tokens."},"output_tokens":{"type":"number","description":"Total output tokens."},"cache_creation_input_tokens":{"type":"number","description":"Total cache creation input tokens."},"cache_read_input_tokens":{"type":"number","description":"Total cache read input tokens."},"previous":{"type":"object","properties":{"credits_used":{"type":"number","description":"Total credits used."},"requests":{"type":"number","description":"Total AI requests."},"input_tokens":{"type":"number","description":"Total input tokens."},"output_tokens":{"type":"number","description":"Total output tokens."},"cache_creation_input_tokens":{"type":"number","description":"Total cache creation input tokens."},"cache_read_input_tokens":{"type":"number","description":"Total cache read input tokens."}},"required":["credits_used","requests","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens"]}},"required":["credits_used","requests","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens"]},"timeframe":{"type":"object","properties":{"from":{"type":"string","format":"date-time","description":"Inclusive start."},"to":{"type":"string","format":"date-time","description":"Exclusive end."},"timezone":{"type":"string"},"granularity":{"type":"string","enum":["hour","day","week","month"]},"bucket_count":{"type":"integer","minimum":0},"previous":{"type":"object","properties":{"from":{"type":"string","format":"date-time","description":"Inclusive start."},"to":{"type":"string","format":"date-time","description":"Exclusive end."},"timezone":{"type":"string"},"granularity":{"type":"string","enum":["hour","day","week","month"]},"bucket_count":{"type":"integer","minimum":0}},"required":["from","to","timezone","granularity","bucket_count"]}},"required":["from","to","timezone","granularity","bucket_count"]},"series":{"type":"array","items":{"type":"object","properties":{"bucket_start":{"type":"string","description":"Bucket start timestamp."},"credits_used":{"type":"number","description":"Credits used in the bucket."},"requests":{"type":"number","description":"AI requests in the bucket."},"input_tokens":{"type":"number","description":"Input tokens in the bucket."},"output_tokens":{"type":"number","description":"Output tokens in the bucket."},"cache_creation_input_tokens":{"type":"number","description":"Cache creation input tokens in the bucket."},"cache_read_input_tokens":{"type":"number","description":"Cache read input tokens in the bucket."},"projects":{"type":"array","items":{"type":"object","properties":{"project_id":{"type":["string","null"],"format":"uuid","description":"Project ID, or null for unscoped usage."},"project_name":{"type":"string","description":"Project display name."},"project_slug":{"type":["string","null"],"description":"Project slug, or null when unavailable."},"credits_used":{"type":"number","description":"Credits used by this project."},"requests":{"type":"number","description":"AI requests billed to this project."},"input_tokens":{"type":"number","description":"Input tokens billed to this project."},"output_tokens":{"type":"number","description":"Output tokens billed to this project."},"cache_creation_input_tokens":{"type":"number","description":"Cache creation input tokens billed to this project."},"cache_read_input_tokens":{"type":"number","description":"Cache read input tokens billed to this project."}},"required":["project_id","project_name","project_slug","credits_used","requests","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens"]}},"groups":{"type":"array","items":{"type":"object","properties":{"credits_used":{"type":"number","description":"Total credits used."},"requests":{"type":"number","description":"Total AI requests."},"input_tokens":{"type":"number","description":"Total input tokens."},"output_tokens":{"type":"number","description":"Total output tokens."},"cache_creation_input_tokens":{"type":"number","description":"Total cache creation input tokens."},"cache_read_input_tokens":{"type":"number","description":"Total cache read input tokens."},"dimensions":{"type":"object","properties":{"project_id":{"type":["string","null"],"format":"uuid"},"model":{"type":["string","null"]},"model_provider":{"type":["string","null"]},"api_key_id":{"type":["string","null"],"format":"uuid"},"api_key_kind":{"type":"string","enum":["api_key","no_api_key","other_keys","deleted_keys","unattributed"],"description":"Key-listing reports distinguish named keys, other/deleted keys, keyless and unattributed usage."},"member_id":{"type":["string","null"],"format":"uuid"},"member_kind":{"type":"string","enum":["member","former_member","deleted_users","automations","unattributed"],"description":"Project-member reports distinguish named people, deleted users, automations and unattributed usage."}}}},"required":["credits_used","requests","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens","dimensions"]}}},"required":["bucket_start","credits_used","requests","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens","projects"]}},"projects":{"type":"array","items":{"type":"object","properties":{"project_id":{"type":["string","null"],"format":"uuid","description":"Project ID, or null for unscoped usage."},"project_name":{"type":"string","description":"Project display name."},"project_slug":{"type":["string","null"],"description":"Project slug, or null when unavailable."},"credits_used":{"type":"number","description":"Credits used by this project."},"requests":{"type":"number","description":"AI requests billed to this project."},"input_tokens":{"type":"number","description":"Input tokens billed to this project."},"output_tokens":{"type":"number","description":"Output tokens billed to this project."},"cache_creation_input_tokens":{"type":"number","description":"Cache creation input tokens billed to this project."},"cache_read_input_tokens":{"type":"number","description":"Cache read input tokens billed to this project."}},"required":["project_id","project_name","project_slug","credits_used","requests","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens"]}},"models":{"type":"array","items":{"type":"object","properties":{"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded credential funding; omitted when unknown. Credits always reflect the historical ledger."},"model":{"type":"string","description":"Canonical or normalized AI model identifier."},"canonical_model_id":{"type":"string","description":"Canonical catalog model identifier."},"model_provider":{"type":"string","description":"Model vendor id. Known values: `anthropic`, `openai`, `google`, `mistral`, `moonshotai`, `deepseek`, `qwen`, `zai`, `unknown`. Other vendor ids may appear; clients must accept any string.","example":"anthropic"},"inference_provider":{"type":"string","description":"Inference provider handling the request. Known values: `veryfront-cloud`, `unknown`. Other values may appear; clients must accept any string.","example":"veryfront-cloud"},"credits_used":{"type":"number","description":"Credits used by this model."},"requests":{"type":"number","description":"AI requests billed to this model."},"input_tokens":{"type":"number","description":"Input tokens billed to this model."},"output_tokens":{"type":"number","description":"Output tokens billed to this model."},"cache_creation_input_tokens":{"type":"number","description":"Cache creation input tokens billed to this model."},"cache_read_input_tokens":{"type":"number","description":"Cache read input tokens billed to this model."},"provider_cost_usd":{"type":"number","description":"Model provider cost in USD for this model."},"veryfront_charge_usd":{"type":"number","description":"Veryfront charge in USD for this model."},"cost_attribution":{"type":"string","enum":["estimated"],"description":"Present when historical cost attribution was recovered from persisted credits."}},"required":["model","model_provider","inference_provider","credits_used","requests","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens"]}},"serving":{"type":"array","items":{"type":"object","properties":{"host":{"type":["string","null"],"description":"Catalog ID of the deployment host, not a provider hostname or URL. Null means no deployment was recorded, including older usage, calls without a catalog deployment, and aggregated channel usage. Null does not indicate where inference ran."},"tier":{"type":["string","null"],"description":"Sovereignty tier as a catalog ID. Clients must accept unknown values as tiers can be added. Null means no tier was recorded and does not indicate where inference ran. The API does not infer a tier from billing or other fields.","example":"eu-resident"},"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded funding for this spend group; omitted when provenance is unknown."},"credits":{"type":"number","description":"Credits debited in the timeframe."},"usd":{"type":"number","description":"Customer-billed USD for those credits."},"requests":{"type":"number","description":"Number of provider calls recorded."},"input_tokens":{"type":"number","description":"Input tokens."},"output_tokens":{"type":"number","description":"Output tokens."},"cache_read_tokens":{"type":"number","description":"Tokens read from the prompt cache."},"cache_creation_tokens":{"type":"number","description":"Tokens written to the prompt cache."}},"required":["host","tier","credits","usd","requests","input_tokens","output_tokens","cache_read_tokens","cache_creation_tokens"]},"description":"The same spend cut by the deployment that served it. Ordered by spend descending, then by request count descending, then by host, then by tier; the row whose `host` and `tier` are both null is always last, because it is the absence of a record rather than a deployment. Additive: it neither replaces nor re-slices any other field. Omitted where the serving breakdown is not enabled; `models` is unchanged by it."},"scope":{"type":"object","properties":{"kind":{"type":"string","enum":["account"]},"account_id":{"type":"string","format":"uuid","description":"The authorized billing account, independent of the caller identity."},"member_id":{"type":"string","format":"uuid"}},"required":["kind","account_id","member_id"]},"group_by":{"type":"array","items":{"type":"string","enum":["project","model","api_key","member"]}},"attribution":{"type":"object","properties":{"enabled":{"type":"boolean"},"recording_since":{"type":["string","null"]}},"required":["enabled","recording_since"]}},"required":["summary","timeframe","series","projects","models","scope","attribution"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account directory","x-canonical-documentation":{"domain":"identity-access","resource":"Users","subgroup":"Account users","name":"Get account member AI usage analytics","description":"Return one current member's AI credit usage across the authorized account's projects, from the project ledger. Requires account.billing.read.","operationId":"getAccountMemberAiUsageAnalytics"}}},"/accounts/{account_id}/members/{user_id}":{"patch":{"operationId":"updateAccountMember","tags":["identity-access/Users/Account users"],"summary":"Update account member","description":"Change an account member's role. Requires account.members.manage.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"user_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["owner","admin","member"],"description":"Member role. Promoting to or demoting from owner requires account ownership authority. The account must retain at least one owner. Setting the current role succeeds without a change."}},"required":["role"]}}}},"responses":{"200":{"description":"The updated member","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountMember"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account Members","x-canonical-documentation":{"domain":"identity-access","resource":"Users","subgroup":"Account users","name":"Update account member","description":"Change an account member's role. Requires account.members.manage.","operationId":"updateAccountMember"}},"delete":{"operationId":"deleteAccountMember","tags":["identity-access/Users/Account users"],"summary":"Delete account member","description":"Remove a member from the account, or leave it yourself; removing another member requires account.members.manage. Requires account.read; API keys also need delete scope.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Member to remove. Members may remove themselves. Removing another member requires account.members.manage. Removing another owner requires account ownership authority. The account must retain at least one owner. Removing an absent member returns 404. Projects and financial history are not touched."},"required":true,"description":"Member to remove. Members may remove themselves. Removing another member requires account.members.manage. Removing another owner requires account ownership authority. The account must retain at least one owner. Removing an absent member returns 404. Projects and financial history are not touched.","name":"user_id","in":"path"}],"responses":{"200":{"description":"Membership removed. Projects and financial history are not touched.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account Members","x-canonical-documentation":{"domain":"identity-access","resource":"Users","subgroup":"Account users","name":"Delete account member","description":"Remove a member from the account, or leave it yourself; removing another member requires account.members.manage. Requires account.read; API keys also need delete scope.","operationId":"deleteAccountMember"}}},"/projects/{project_reference}/members":{"get":{"operationId":"listProjectMembers","tags":["identity-access/Users/Project members"],"summary":"List project members","description":"Lists the project's members with their role and resolved capabilities, one page at a time by user ID cursor. Requires project.members.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"uuid","description":"Cursor from page_info.next: the user ID of the last member on the previous page. Omit it to read the first page."},"required":false,"description":"Cursor from page_info.next: the user ID of the last member on the previous page. Omit it to read the first page.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum entries per page. Integer from 1 to 100; defaults to 20."},"required":false,"description":"Maximum entries per page. Integer from 1 to 100; defaults to 20.","name":"limit","in":"query"}],"responses":{"200":{"description":"One page of project members, ordered by user ID","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string","format":"uuid","description":"User ID of the project member."},"email":{"type":"string","description":"Email address of the member."},"name":{"type":["string","null"],"description":"Display name of the member; null when the member has none."},"avatar_src":{"type":["string","null"],"description":"Avatar URL of the member; null when the member has none."},"role":{"type":"string","enum":["owner","admin","editor","viewer"],"description":"Project role of the member: owner, admin, editor or viewer."},"capabilities":{"type":"array","items":{"type":"string","enum":["project.read","project.settings.manage","project.delete","project.members.read","project.members.manage","project.invites.read","project.invites.manage","project.files.read","project.files.write","project.realtime.connect","project.realtime.write","project.files.admin","project.uploads.read","project.uploads.write","project.uploads.admin","project.knowledge.read","project.knowledge.write","project.releases.read","project.releases.write","project.deployments.read","project.deployments.write","project.deploy.execute","project.runtime.manage","project.channels.read","project.channels.write","project.sandboxes.manage","project.domains.write","project.environments.manage","project.env_vars.write","project.runs.read","project.runs.write","project.runs.admin","project.agents.read","project.agents.write","project.evals.read","project.evals.write","project.evals.run","project.conversations.read","project.conversations.write","project.conversations.create","project.integrations.read","project.integrations.connect","project.integrations.configure","project.api_keys.read","project.api_keys.manage","project.cache.read","project.cache.write","project.logs.read","project.metrics.read","project.resources.read"]},"description":"Project capabilities the role grants, as the permission checks resolve them."}},"required":["user_id","email","name","avatar_src","role","capabilities"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"Invalid limit, or a cursor that names no member of this project","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden - insufficient permissions","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Members","x-canonical-documentation":{"domain":"identity-access","resource":"Users","subgroup":"Project members","name":"List project members","description":"Lists the project's members with their role and resolved capabilities, one page at a time by user ID cursor. Requires project.members.read.","operationId":"listProjectMembers"}}},"/projects/{project_reference}/members/{user_id}":{"get":{"operationId":"getProjectMember","tags":["identity-access/Users/Project members"],"summary":"Get project member","description":"Returns one member of the project with role, capabilities and the read-only AI budget projection. Requires project.members.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"uuid","description":"User ID of the project member."},"required":true,"description":"User ID of the project member.","name":"user_id","in":"path"}],"responses":{"200":{"description":"The project member with the read-only AI budget projection","content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"string","format":"uuid","description":"User ID of the project member."},"email":{"type":"string","description":"Email address of the member."},"name":{"type":["string","null"],"description":"Display name of the member; null when the member has none."},"avatar_src":{"type":["string","null"],"description":"Avatar URL of the member; null when the member has none."},"role":{"type":"string","enum":["owner","admin","editor","viewer"],"description":"Project role of the member: owner, admin, editor or viewer."},"capabilities":{"type":"array","items":{"type":"string","enum":["project.read","project.settings.manage","project.delete","project.members.read","project.members.manage","project.invites.read","project.invites.manage","project.files.read","project.files.write","project.realtime.connect","project.realtime.write","project.files.admin","project.uploads.read","project.uploads.write","project.uploads.admin","project.knowledge.read","project.knowledge.write","project.releases.read","project.releases.write","project.deployments.read","project.deployments.write","project.deploy.execute","project.runtime.manage","project.channels.read","project.channels.write","project.sandboxes.manage","project.domains.write","project.environments.manage","project.env_vars.write","project.runs.read","project.runs.write","project.runs.admin","project.agents.read","project.agents.write","project.evals.read","project.evals.write","project.evals.run","project.conversations.read","project.conversations.write","project.conversations.create","project.integrations.read","project.integrations.connect","project.integrations.configure","project.api_keys.read","project.api_keys.manage","project.cache.read","project.cache.write","project.logs.read","project.metrics.read","project.resources.read"]},"description":"Project capabilities the role grants, as the permission checks resolve them."},"budget":{"$ref":"#/components/schemas/SubjectBudget"},"budget_status":{"$ref":"#/components/schemas/SubjectBudgetStatus"}},"required":["user_id","email","name","avatar_src","role","capabilities","budget","budget_status"]}}}},"400":{"description":"Invalid user ID","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden - insufficient permissions","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project or member not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Members","x-canonical-documentation":{"domain":"identity-access","resource":"Users","subgroup":"Project members","name":"Get project member","description":"Returns one member of the project with role, capabilities and the read-only AI budget projection. Requires project.members.read.","operationId":"getProjectMember"}},"patch":{"operationId":"updateProjectMember","tags":["identity-access/Users/Project members"],"summary":"Update project member","description":"Changes a non-owner member's role to admin, editor or viewer; the owner changes only through updateProjectOwner. Requires project.members.manage.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"uuid","description":"User ID of the project member."},"required":true,"description":"User ID of the project member.","name":"user_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["admin","editor","viewer"],"description":"New role: admin, editor or viewer. Owner promotion uses updateProjectOwner."}},"required":["role"]}}}},"responses":{"200":{"description":"The member with the new role","content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"string","format":"uuid","description":"User ID of the project member."},"email":{"type":"string","description":"Email address of the member."},"name":{"type":["string","null"],"description":"Display name of the member; null when the member has none."},"avatar_src":{"type":["string","null"],"description":"Avatar URL of the member; null when the member has none."},"role":{"type":"string","enum":["owner","admin","editor","viewer"],"description":"Project role of the member: owner, admin, editor or viewer."},"capabilities":{"type":"array","items":{"type":"string","enum":["project.read","project.settings.manage","project.delete","project.members.read","project.members.manage","project.invites.read","project.invites.manage","project.files.read","project.files.write","project.realtime.connect","project.realtime.write","project.files.admin","project.uploads.read","project.uploads.write","project.uploads.admin","project.knowledge.read","project.knowledge.write","project.releases.read","project.releases.write","project.deployments.read","project.deployments.write","project.deploy.execute","project.runtime.manage","project.channels.read","project.channels.write","project.sandboxes.manage","project.domains.write","project.environments.manage","project.env_vars.write","project.runs.read","project.runs.write","project.runs.admin","project.agents.read","project.agents.write","project.evals.read","project.evals.write","project.evals.run","project.conversations.read","project.conversations.write","project.conversations.create","project.integrations.read","project.integrations.connect","project.integrations.configure","project.api_keys.read","project.api_keys.manage","project.cache.read","project.cache.write","project.logs.read","project.metrics.read","project.resources.read"]},"description":"Project capabilities the role grants, as the permission checks resolve them."}},"required":["user_id","email","name","avatar_src","role","capabilities"]}}}},"400":{"description":"Invalid user ID or role, or the member is the current owner; use updateProjectOwner","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden - insufficient permissions, or the project is system-managed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project or member not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Members","x-canonical-documentation":{"domain":"identity-access","resource":"Users","subgroup":"Project members","name":"Update project member","description":"Changes a non-owner member's role to admin, editor or viewer; the owner changes only through updateProjectOwner. Requires project.members.manage.","operationId":"updateProjectMember"}},"delete":{"operationId":"deleteProjectMember","tags":["identity-access/Users/Project members"],"summary":"Delete project member","description":"Removes a member from the project; the last owner cannot be removed, so transfer ownership first. Requires project.members.manage; API keys also need delete scope.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"uuid","description":"User ID of the project member."},"required":true,"description":"User ID of the project member.","name":"user_id","in":"path"}],"responses":{"200":{"description":"Member removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Invalid user ID","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden - insufficient permissions, or the member is the last owner. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project or member not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Members","x-canonical-documentation":{"domain":"identity-access","resource":"Users","subgroup":"Project members","name":"Delete project member","description":"Removes a member from the project; the last owner cannot be removed, so transfer ownership first. Requires project.members.manage; API keys also need delete scope.","operationId":"deleteProjectMember"}}},"/projects/{project_reference}/owner":{"patch":{"operationId":"updateProjectOwner","tags":["identity-access/Users/Project members"],"summary":"Update project owner","description":"Transfers project ownership from the calling owner to another existing member and demotes the previous owner to admin. Requires project.members.manage.","parameters":[{"$ref":"#/components/parameters/ProjectReference"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"string","format":"uuid","description":"Existing member who becomes owner; must differ from the current owner. The previous owner becomes admin."}},"required":["user_id"]}}}},"responses":{"200":{"description":"The new owner. Previous owners become admins, and the new owner member AI budget is removed.","content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"string","format":"uuid","description":"User ID of the project member."},"email":{"type":"string","description":"Email address of the member."},"name":{"type":["string","null"],"description":"Display name of the member; null when the member has none."},"avatar_src":{"type":["string","null"],"description":"Avatar URL of the member; null when the member has none."},"role":{"type":"string","enum":["owner","admin","editor","viewer"],"description":"Project role of the member: owner, admin, editor or viewer."},"capabilities":{"type":"array","items":{"type":"string","enum":["project.read","project.settings.manage","project.delete","project.members.read","project.members.manage","project.invites.read","project.invites.manage","project.files.read","project.files.write","project.realtime.connect","project.realtime.write","project.files.admin","project.uploads.read","project.uploads.write","project.uploads.admin","project.knowledge.read","project.knowledge.write","project.releases.read","project.releases.write","project.deployments.read","project.deployments.write","project.deploy.execute","project.runtime.manage","project.channels.read","project.channels.write","project.sandboxes.manage","project.domains.write","project.environments.manage","project.env_vars.write","project.runs.read","project.runs.write","project.runs.admin","project.agents.read","project.agents.write","project.evals.read","project.evals.write","project.evals.run","project.conversations.read","project.conversations.write","project.conversations.create","project.integrations.read","project.integrations.connect","project.integrations.configure","project.api_keys.read","project.api_keys.manage","project.cache.read","project.cache.write","project.logs.read","project.metrics.read","project.resources.read"]},"description":"Project capabilities the role grants, as the permission checks resolve them."}},"required":["user_id","email","name","avatar_src","role","capabilities"]}}}},"400":{"description":"Invalid user ID, the project has no current owner, or the user already owns it","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden - insufficient permissions, the caller is not the current owner, or the project is system-managed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Project or member not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Payload too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project Ownership","x-canonical-documentation":{"domain":"identity-access","resource":"Users","subgroup":"Project members","name":"Update project owner","description":"Transfers project ownership from the calling owner to another existing member and demotes the previous owner to admin. Requires project.members.manage.","operationId":"updateProjectOwner"}}},"/me":{"get":{"operationId":"getCurrentUser","tags":["identity-access/Users/Current user"],"summary":"Get current user","description":"Return the profile of the signed-in user; GraphQL and MCP also return the profile of the user who owns an API key.","responses":{"200":{"description":"Current user profile","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Authenticated user ID"},"email":{"type":"string","format":"email","description":"User email address"},"name":{"type":"string","description":"User display name"},"avatar_src":{"type":"string","description":"User avatar image URL"},"role":{"type":"array","items":{"type":"string"},"description":"User roles"},"approved":{"type":"boolean","description":"Whether the user is approved"},"subscription":{"anyOf":[{"type":"object","properties":{"billing_mode":{"type":"string","enum":["stripe"]},"plan_type":{"type":"string","enum":["free","pro","enterprise"],"description":"Canonical plan resolved from the configured plan price ID"},"id":{"type":"string","format":"uuid","description":"Subscription ID"},"user_id":{"type":"string","format":"uuid","description":"User that owns the subscription"},"line_items":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["plan","seat","server","sandbox"],"description":"Subscription line item kind"},"quantity":{"type":"number","description":"Line item quantity"}},"required":["kind","quantity"]},"description":"Subscription line items"},"expires_at":{"type":["string","null"],"description":"Current billing period end, or null for a non-expiring grant"},"created_at":{"type":"string","description":"Subscription creation timestamp"},"canceled_at":{"type":["string","null"],"description":"Subscription cancellation timestamp"}},"required":["plan_type","id","user_id","line_items","expires_at"]},{"type":"object","properties":{"billing_mode":{"type":"string","enum":["external"]},"plan_type":{"type":"string","enum":["free","pro","enterprise"],"description":"Canonical tier configured by the installation administrator"},"id":{"type":"string","format":"uuid","description":"Subscription ID"},"user_id":{"type":"string","format":"uuid","description":"User that owns the subscription"},"line_items":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["plan","seat","server","sandbox"],"description":"Subscription line item kind"},"quantity":{"type":"number","description":"Line item quantity"}},"required":["kind","quantity"]},"description":"Subscription line items"},"expires_at":{"type":["string","null"],"description":"Current billing period end, or null for a non-expiring grant"},"created_at":{"type":"string","description":"Subscription creation timestamp"},"canceled_at":{"type":["string","null"],"description":"Subscription cancellation timestamp"},"entitlements":{"type":"object","properties":{"server_limit":{"type":"integer","minimum":0,"maximum":9007199254740991},"seat_limit":{"type":"integer","exclusiveMinimum":0,"minimum":-9007199254740991,"maximum":9007199254740991}},"required":["server_limit","seat_limit"],"additionalProperties":false},"status":{"type":"string"},"current_period_start":{"type":["string","null"]},"current_period_end":{"type":["string","null"]}},"required":["billing_mode","plan_type","user_id","line_items","expires_at","entitlements"]}],"description":"Active paid subscription, when present."}},"required":["id"]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Current user","x-canonical-documentation":{"domain":"identity-access","resource":"Users","subgroup":"Current user","name":"Get current user","description":"Return the profile of the signed-in user; GraphQL and MCP also return the profile of the user who owns an API key.","operationId":"getCurrentUser"}}},"/accounts":{"get":{"operationId":"listAccounts","tags":["identity-access/Accounts/Accounts"],"summary":"List accounts","description":"List the personal and team accounts the caller belongs to, oldest first, with the caller's role and capabilities in each.","parameters":[{"$ref":"#/components/parameters/PaginationCursor"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum entries per page. Integer from 1 to 100; defaults to 20."},"required":false,"description":"Maximum entries per page. Integer from 1 to 100; defaults to 20.","name":"limit","in":"query"},{"schema":{"type":"string","maxLength":63,"pattern":"^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$","description":"Return only the account with this exact slug."},"required":false,"description":"Return only the account with this exact slug.","name":"slug","in":"query"}],"responses":{"200":{"description":"Accounts the caller belongs to","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AccountWithMembership"},"description":"Accounts the caller belongs to, oldest first, with the caller role in each."},"page_info":{"type":"object","properties":{"self":{"type":["string","null"],"description":"Cursor pointing to the current page"},"first":{"type":"null","description":"First page cursor (always null for cursor-based pagination)"},"next":{"type":["string","null"],"description":"Cursor for the next page (null if no more pages)"},"prev":{"type":["string","null"],"description":"Cursor for the previous page (null if on first page)"}},"required":["self","first","next","prev"]}},"required":["data","page_info"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Accounts","x-canonical-documentation":{"domain":"identity-access","resource":"Accounts","subgroup":"Accounts","name":"List accounts","description":"List the personal and team accounts the caller belongs to, oldest first, with the caller's role and capabilities in each.","operationId":"listAccounts"}},"post":{"operationId":"createAccount","tags":["identity-access/Accounts/Accounts"],"summary":"Create account","description":"Create a team account that the caller owns.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"slug":{"type":"string","maxLength":63,"pattern":"^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$","description":"Unique account slug. Omit to derive it deterministically from the name. A duplicate slug is rejected as already existing; creation does not replay the existing account. Filter the account list by slug to find it."}},"required":["name"]}}}},"responses":{"201":{"description":"Account created; the caller is its owner","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AccountWithMembership"},{"type":"object","properties":{"kind":{"type":"string","enum":["personal","team"],"description":"Created account kind; always team."},"membership":{"type":"object","properties":{"role":{"type":"string","enum":["owner","admin","member"],"description":"The calling user owns the created team account and receives the owner role."},"capabilities":{"type":"array","items":{"type":"string","enum":["account.read","account.settings.manage","account.members.read","account.members.manage","account.invitations.read","account.invitations.manage","account.projects.read","account.projects.create","account.billing.read","account.billing.manage","account.ownership.transfer","account.delete"]}}},"required":["role","capabilities"],"description":"The caller's own membership in this account, including their resolved role and capabilities."}}}]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The unique slug is already in use; creation does not replay existing accounts.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Accounts","x-canonical-documentation":{"domain":"identity-access","resource":"Accounts","subgroup":"Accounts","name":"Create account","description":"Create a team account that the caller owns.","operationId":"createAccount"}}},"/accounts/{account_id}":{"get":{"operationId":"getAccount","tags":["identity-access/Accounts/Accounts"],"summary":"Get account","description":"Return an account with the caller's role and capabilities in it. Requires account.read.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"}],"responses":{"200":{"description":"The account and the caller’s membership","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountWithMembership"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Accounts","x-canonical-documentation":{"domain":"identity-access","resource":"Accounts","subgroup":"Accounts","name":"Get account","description":"Return an account with the caller's role and capabilities in it. Requires account.read.","operationId":"getAccount"}},"patch":{"operationId":"updateAccount","tags":["identity-access/Accounts/Accounts"],"summary":"Update account","description":"Change an account's name or slug. Requires account.settings.manage.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"New account name. Omitted, the current name remains unchanged."},"slug":{"type":"string","maxLength":63,"pattern":"^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$","description":"New account slug. Omitted, the current slug remains unchanged; a duplicate returns 409."}},"additionalProperties":false}}}},"responses":{"200":{"description":"Updated account","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AccountWithMembership"},{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Account UUID remains unchanged when account details are updated."}}}]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Accounts","x-canonical-documentation":{"domain":"identity-access","resource":"Accounts","subgroup":"Accounts","name":"Update account","description":"Change an account's name or slug. Requires account.settings.manage.","operationId":"updateAccount"}}},"/accounts/{account_id}/invitations/{invitation_id}/resend":{"post":{"operationId":"resendAccountInvitation","tags":["identity-access/Invitations/Invitations"],"summary":"Resend account invitation","description":"Resend an account invitation with a fresh token. Requires account.invitations.manage.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"invitation_id","in":"path"}],"responses":{"200":{"description":"The invitation and whether the email was accepted for sending. The previous token is invalidated.","content":{"application/json":{"schema":{"type":"object","properties":{"invitation":{"$ref":"#/components/schemas/AccountInvitation"},"email_sent":{"type":"boolean","description":"Whether the email service accepted the notification send."}},"required":["invitation","email_sent"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Invitations","x-canonical-documentation":{"domain":"identity-access","resource":"Invitations","subgroup":"Invitations","name":"Resend account invitation","description":"Resend an account invitation with a fresh token. Requires account.invitations.manage.","operationId":"resendAccountInvitation"}}},"/accounts/{account_id}/invitations":{"get":{"operationId":"listAccountInvitations","tags":["identity-access/Invitations/Invitations"],"summary":"List account invitations","description":"List account invitations. Requires account.invitations.read.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"},{"$ref":"#/components/parameters/PaginationCursor"},{"$ref":"#/components/parameters/PaginationLimit"},{"schema":{"type":"string","enum":["pending","accepted","revoked","expired","all"],"default":"pending"},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"Invitations of the account","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AccountInvitation"},"description":"Account invitations, newest first, filtered by status. Pending is the default. Acceptance tokens are never included."},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Invitations","x-canonical-documentation":{"domain":"identity-access","resource":"Invitations","subgroup":"Invitations","name":"List account invitations","description":"List account invitations. Requires account.invitations.read.","operationId":"listAccountInvitations"}},"post":{"operationId":"createAccountInvitation","tags":["identity-access/Invitations/Invitations"],"summary":"Create account invitation","description":"Create account invitation. Requires account.invitations.manage.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email","description":"Invitation recipient email. Only one pending invitation is allowed per email; another creation returns 409 until it is revoked or expires. Creation does not send email or reserve a seat; tier and seat capacity are checked when a new member accepts."},"role":{"type":"string","enum":["admin","member"],"default":"admin","description":"Invited administrator or member role. Defaults to administrator for existing clients."}},"required":["email"]}}}},"responses":{"201":{"description":"Invitation created; the token is returned only here","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountInvitationCreated"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Invitations","x-canonical-documentation":{"domain":"identity-access","resource":"Invitations","subgroup":"Invitations","name":"Create account invitation","description":"Create account invitation. Requires account.invitations.manage.","operationId":"createAccountInvitation"}}},"/accounts/-/invitations/preview":{"post":{"operationId":"previewAccountInvitation","tags":["identity-access/Invitations/Invitations"],"summary":"Preview account invitation","description":"Preview account invitation.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":20,"maxLength":200,"description":"Invitation token to preview. Requires a user session with the matching current email. Preview does not change invitation state or reserve a seat. Unknown, revoked, or wrong-recipient tokens return 404; expired or no longer authorized invitations return 409."}},"required":["token"]}}}},"responses":{"200":{"description":"Invitation details for the matching recipient","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountInvitationPreview"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Invitations","x-canonical-documentation":{"domain":"identity-access","resource":"Invitations","subgroup":"Invitations","name":"Preview account invitation","description":"Preview account invitation.","operationId":"previewAccountInvitation"}}},"/projects/{project_reference}/invitations":{"get":{"operationId":"listProjectInvitations","tags":["identity-access/Invitations/Invitations"],"summary":"List invitations","description":"List the invitations. Requires project.invites.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum invitations per page. Integer from 1 to 100; defaults to 20."},"required":false,"description":"Maximum invitations per page. Integer from 1 to 100; defaults to 20.","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Opaque page_info.next from the previous page. A cursor this list did not issue fails with invalid_input."},"required":false,"description":"Opaque page_info.next from the previous page. A cursor this list did not issue fails with invalid_input.","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of pending invitations","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Invitation ID."},"project_id":{"type":"string","format":"uuid","description":"ID of the project the invitation is for."},"email":{"type":"string","description":"Email address the invitation was sent to."},"role":{"type":"string","enum":["admin","editor","viewer"],"description":"Role the invitation grants: admin, editor or viewer."},"created_at":{"type":["string","null"],"description":"When the invitation was created (RFC 3339), or null if not recorded."}},"required":["id","project_id","email","role","created_at"]},"description":"Pending invitations for the project, newest first."},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"invalid_input: invalid limit or cursor","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"unauthenticated","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"not_found: project not found or not visible","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"internal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Invitations","x-canonical-documentation":{"domain":"identity-access","resource":"Invitations","subgroup":"Invitations","name":"List invitations","description":"List the invitations. Requires project.invites.read.","operationId":"listProjectInvitations"}},"post":{"operationId":"createProjectInvitation","tags":["identity-access/Invitations/Invitations"],"summary":"Create invitation","description":"Create an invitation. Requires project.invites.manage.","parameters":[{"$ref":"#/components/parameters/ProjectReference"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectInvitationInput"}}}},"responses":{"200":{"description":"An existing user was added to the project","content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","enum":["member_added","invitation_created"],"description":"member_added when the email already belongs to a user, who is added to the project (or has their role changed); invitation_created when a pending invitation was stored."},"invitation":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Invitation ID."},"project_id":{"type":"string","format":"uuid","description":"ID of the project the invitation is for."},"email":{"type":"string","description":"Email address the invitation was sent to."},"role":{"type":"string","enum":["admin","editor","viewer"],"description":"Role the invitation grants: admin, editor or viewer."},"created_at":{"type":["string","null"],"description":"When the invitation was created (RFC 3339), or null if not recorded."}},"required":["id","project_id","email","role","created_at"],"description":"The pending invitation; null when outcome is member_added."},"user_id":{"type":["string","null"],"format":"uuid","description":"The added user; set only when outcome is member_added."},"email_sent":{"type":"boolean","description":"Whether the email service accepted the notification send. False when sending is unavailable or fails; it does not confirm inbox delivery."}},"required":["outcome","invitation","user_id","email_sent"]}}}},"201":{"description":"A pending invitation was created","content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","enum":["member_added","invitation_created"],"description":"member_added when the email already belongs to a user, who is added to the project (or has their role changed); invitation_created when a pending invitation was stored."},"invitation":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Invitation ID."},"project_id":{"type":"string","format":"uuid","description":"ID of the project the invitation is for."},"email":{"type":"string","description":"Email address the invitation was sent to."},"role":{"type":"string","enum":["admin","editor","viewer"],"description":"Role the invitation grants: admin, editor or viewer."},"created_at":{"type":["string","null"],"description":"When the invitation was created (RFC 3339), or null if not recorded."}},"required":["id","project_id","email","role","created_at"],"description":"The pending invitation; null when outcome is member_added."},"user_id":{"type":["string","null"],"format":"uuid","description":"The added user; set only when outcome is member_added."},"email_sent":{"type":"boolean","description":"Whether the email service accepted the notification send. False when sending is unavailable or fails; it does not confirm inbox delivery."}},"required":["outcome","invitation","user_id","email_sent"]}}}},"400":{"description":"invalid_input: invalid email or role","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"unauthenticated","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"limit_exceeded: no collaboration seat available","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"forbidden: the project is system-managed or the credential cannot write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"not_found: project not found or not visible","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"internal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Invitations","x-canonical-documentation":{"domain":"identity-access","resource":"Invitations","subgroup":"Invitations","name":"Create invitation","description":"Create an invitation. Requires project.invites.manage.","operationId":"createProjectInvitation"}}},"/invitations":{"get":{"operationId":"listInvitations","tags":["identity-access/Invitations/Invitations"],"summary":"List invitations across projects","description":"List invitations across projects.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum invitations per page. Integer from 1 to 100; defaults to 20."},"required":false,"description":"Maximum invitations per page. Integer from 1 to 100; defaults to 20.","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Opaque page_info.next from the previous page with the same sort. A cursor this list did not issue fails with invalid_input."},"required":false,"description":"Opaque page_info.next from the previous page with the same sort. A cursor this list did not issue fails with invalid_input.","name":"cursor","in":"query"},{"schema":{"type":"string","enum":["created_at","email"],"default":"created_at","description":"Sort field: created_at (default; missing values last) or email. Ties break by id ascending."},"required":false,"description":"Sort field: created_at (default; missing values last) or email. Ties break by id ascending.","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"asc or desc (default)."},"required":false,"description":"asc or desc (default).","name":"sort_order","in":"query"}],"responses":{"200":{"description":"A page of pending invitations.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Invitation ID."},"project_id":{"type":"string","format":"uuid","description":"ID of the project the invitation is for."},"email":{"type":"string","description":"Email address the invitation was sent to."},"role":{"type":"string","enum":["admin","editor","viewer"],"description":"Role the invitation grants: admin, editor or viewer."},"created_at":{"type":["string","null"],"description":"When the invitation was created (RFC 3339), or null if not recorded."},"project":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Project ID; always equals project_id."},"slug":{"type":"string","description":"Project slug."},"name":{"type":"string","description":"Project name."}},"required":["id","slug","name"],"description":"The project the invitation is for."}},"required":["id","project_id","email","role","created_at","project"]},"description":"Pending invitations across projects the caller owns, with the owning project attached to each invitation. Invitations for people who are already members are excluded."},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"invalid_input: invalid limit, sort or cursor","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"unauthenticated: a user session is required; API keys and service accounts are refused.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"internal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Invitations","x-canonical-documentation":{"domain":"identity-access","resource":"Invitations","subgroup":"Invitations","name":"List invitations across projects","description":"List invitations across projects.","operationId":"listInvitations"}}},"/projects/{project_reference}/invitations/{invitation_id}":{"get":{"operationId":"getProjectInvitation","tags":["identity-access/Invitations/Invitations"],"summary":"Get invitation","description":"Return an invitation. Requires project.invites.read.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"uuid","description":"Invitation ID."},"required":true,"description":"Invitation ID.","name":"invitation_id","in":"path"}],"responses":{"200":{"description":"The invitation","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Invitation ID."},"project_id":{"type":"string","format":"uuid","description":"ID of the project the invitation is for."},"email":{"type":"string","description":"Email address the invitation was sent to."},"role":{"type":"string","enum":["admin","editor","viewer"],"description":"Role the invitation grants: admin, editor or viewer."},"created_at":{"type":["string","null"],"description":"When the invitation was created (RFC 3339), or null if not recorded."}},"required":["id","project_id","email","role","created_at"]}}}},"400":{"description":"invalid_input: invalid invitation ID","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"unauthenticated","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"not_found: project or invitation not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"internal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Invitations","x-canonical-documentation":{"domain":"identity-access","resource":"Invitations","subgroup":"Invitations","name":"Get invitation","description":"Return an invitation. Requires project.invites.read.","operationId":"getProjectInvitation"}},"delete":{"operationId":"deleteProjectInvitation","tags":["identity-access/Invitations/Invitations"],"summary":"Delete invitation","description":"Delete an invitation. Requires project.invites.manage; API keys also need delete scope.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"uuid","description":"Invitation ID."},"required":true,"description":"Invitation ID.","name":"invitation_id","in":"path"}],"responses":{"200":{"description":"The invitation was revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"invalid_input: invalid invitation ID","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"unauthenticated","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"forbidden: the project is system-managed or the credential cannot delete. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"not_found: project or invitation not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"internal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Invitations","x-canonical-documentation":{"domain":"identity-access","resource":"Invitations","subgroup":"Invitations","name":"Delete invitation","description":"Delete an invitation. Requires project.invites.manage; API keys also need delete scope.","operationId":"deleteProjectInvitation"}}},"/accounts/{account_id}/invitations/{invitation_id}":{"delete":{"operationId":"deleteAccountInvitation","tags":["identity-access/Invitations/Invitations"],"summary":"Delete account invitation","description":"Delete account invitation. Requires account.invitations.manage; API keys also need delete scope.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Invitation to revoke. Expired or already revoked invitations succeed. Accepted invitations return 409; remove the account membership instead."},"required":true,"description":"Invitation to revoke. Expired or already revoked invitations succeed. Accepted invitations return 409; remove the account membership instead.","name":"invitation_id","in":"path"}],"responses":{"200":{"description":"Invitation revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden. API keys also require delete scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Invitations","x-canonical-documentation":{"domain":"identity-access","resource":"Invitations","subgroup":"Invitations","name":"Delete account invitation","description":"Delete account invitation. Requires account.invitations.manage; API keys also need delete scope.","operationId":"deleteAccountInvitation"}}},"/accounts/-/invitations/accept":{"post":{"operationId":"acceptAccountInvitation","tags":["identity-access/Invitations/Invitations"],"summary":"Accept account invitation","description":"Accept account invitation.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":20,"maxLength":200,"description":"Invitation acceptance token. Requires a user session; API keys are refused. Fresh acceptance requires the matching current email. Repeating acceptance returns the existing membership for the same accepting user, if that membership still exists. Unknown or revoked tokens return 404; a fresh request with a mismatched email returns 403. Expired or no longer authorized invitations return 409."}},"required":["token"]}}}},"responses":{"200":{"description":"Already a member; the existing membership","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountWithMembership"}}}},"201":{"description":"Membership created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountWithMembership"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Invitations","x-canonical-documentation":{"domain":"identity-access","resource":"Invitations","subgroup":"Invitations","name":"Accept account invitation","description":"Accept account invitation.","operationId":"acceptAccountInvitation"}}},"/projects/{project_reference}/invitations/{invitation_id}/resend":{"post":{"operationId":"resendProjectInvitation","tags":["identity-access/Invitations/Invitations"],"summary":"Resend invitation","description":"Resend an invitation. Requires project.invites.manage.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"schema":{"type":"string","format":"uuid","description":"Invitation ID."},"required":true,"description":"Invitation ID.","name":"invitation_id","in":"path"}],"responses":{"200":{"description":"The invitation and whether the email was accepted for sending","content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","enum":["member_added","invitation_created"],"description":"member_added when the email already belongs to a user, who is added to the project (or has their role changed); invitation_created when a pending invitation was stored."},"invitation":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Invitation ID."},"project_id":{"type":"string","format":"uuid","description":"ID of the project the invitation is for."},"email":{"type":"string","description":"Email address the invitation was sent to."},"role":{"type":"string","enum":["admin","editor","viewer"],"description":"Role the invitation grants: admin, editor or viewer."},"created_at":{"type":["string","null"],"description":"When the invitation was created (RFC 3339), or null if not recorded."}},"required":["id","project_id","email","role","created_at"],"description":"The pending invitation; null when outcome is member_added."},"user_id":{"type":["string","null"],"format":"uuid","description":"The added user; set only when outcome is member_added."},"email_sent":{"type":"boolean","description":"Whether the email service accepted the notification send. False when sending is unavailable or fails; it does not confirm inbox delivery."}},"required":["outcome","invitation","user_id","email_sent"]}}}},"400":{"description":"invalid_input: invalid invitation ID","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"unauthenticated","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"forbidden: the project is system-managed or the credential cannot write","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"not_found: project or invitation not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"internal","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Invitations","x-canonical-documentation":{"domain":"identity-access","resource":"Invitations","subgroup":"Invitations","name":"Resend invitation","description":"Resend an invitation. Requires project.invites.manage.","operationId":"resendProjectInvitation"}}},"/api-keys":{"get":{"operationId":"listApiKeys","tags":["identity-access/API keys/API keys"],"summary":"List API keys","description":"List the caller's API keys, or the keys bound to one project, newest first; every surface returns active keys unless status selects expired, revoked or all.","parameters":[{"schema":{"type":"string","description":"Project ID or slug. Listing the keys bound to a project requires project.api_keys.read. Omit to list the caller's own keys; a project-scoped API-key caller retains its enforced project when this field is omitted."},"required":false,"description":"Project ID or slug. Listing the keys bound to a project requires project.api_keys.read. Omit to list the caller's own keys; a project-scoped API-key caller retains its enforced project when this field is omitted.","name":"project_reference","in":"query"},{"schema":{"type":"string","enum":["active","expired","revoked","all"],"default":"active"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","enum":["created_at","name","last_used_at"],"default":"created_at","description":"Sort field. Defaults to \"created_at\"."},"required":false,"name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort order. Defaults to \"desc\"."},"required":false,"name":"sort_order","in":"query"},{"$ref":"#/components/parameters/PaginationCursor"},{"$ref":"#/components/parameters/PaginationLimit"}],"responses":{"200":{"description":"Paginated list of API keys","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"project_id":{"type":["string","null"],"format":"uuid"},"user_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"key_prefix":{"type":"string"},"last_used_at":{"type":["string","null"]},"expires_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"status":{"type":"string","enum":["active","expired","revoked"]},"revoked_at":{"type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"}},"scope":{"type":"string","enum":["account","project"],"description":"Whether the key is restricted to one project or applies to the account. An account-wide key acts with its owner’s project roles, limited by the key’s scopes. Unlike project-scoped keys, it can inherit the owner’s administrative authority: `write` can allow API key creation, and `delete` can allow project deletion."},"inference_limits":{"$ref":"#/components/schemas/ApiKeyInferenceLimitsSummary"}},"required":["id","project_id","user_id","name","key_prefix","last_used_at","expires_at","created_at","updated_at","status","revoked_at","scopes","scope","inference_limits"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"API keys","x-canonical-documentation":{"domain":"identity-access","resource":"API keys","subgroup":"API keys","name":"List API keys","description":"List the caller's API keys, or the keys bound to one project, newest first; every surface returns active keys unless status selects expired, revoked or all.","operationId":"listApiKeys"}},"post":{"operationId":"createApiKey","tags":["identity-access/API keys/API keys"],"summary":"Create API key","description":"Create an API key and return its secret once.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"project_reference":{"type":"string","description":"Project ID or slug. Creating a project-scoped key requires project.api_keys.manage. Omit for a user-level key; a project-scoped API-key caller retains its enforced project when this field is omitted."},"name":{"type":"string","minLength":1,"maxLength":255},"scopes":{"type":"array","items":{"type":"string","examples":["*","read","write","delete","releases:read","releases:write","releases:delete","releases:*","deployments:read","deployments:write","deployments:delete","deployments:*","projects:read","projects:write","projects:delete","projects:*","components:read","components:write","components:delete","components:*","files:read","files:write","files:delete","files:*","uploads:read","uploads:write","uploads:delete","uploads:*","users:read","users:write","users:delete","users:*","pages:read","pages:write","pages:delete","pages:*","cache:read","cache:write","cache:delete","cache:*","runs:read","runs:write","runs:delete","runs:*","integrations:read","integrations:write","integrations:delete","integrations:*","conversations:read","conversations:write","conversations:delete","conversations:*","agents:read","agents:write","agents:delete","agents:*","runtime:read","runtime:write","runtime:delete","runtime:*","sandboxes:read","sandboxes:write","sandboxes:delete","sandboxes:*"]},"description":"Requested permissions. Schema examples list all currently supported values. Omitted or empty scopes default to read-only (read). Project keys remain restricted by their project and creation permission."},"expires_at":{"type":"string"}},"required":["name"]}}}},"responses":{"201":{"description":"API key created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"project_id":{"type":["string","null"],"format":"uuid"},"user_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"key":{"type":"string"},"key_prefix":{"type":"string"},"expires_at":{"type":["string","null"]},"created_at":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"scope":{"type":"string","enum":["account","project"],"description":"Whether the key is restricted to one project or applies to the account. An account-wide key acts with its owner’s project roles, limited by the key’s scopes. Unlike project-scoped keys, it can inherit the owner’s administrative authority: `write` can allow API key creation, and `delete` can allow project deletion."}},"required":["id","project_id","user_id","name","key","key_prefix","expires_at","created_at","scopes","scope"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"API keys","x-canonical-documentation":{"domain":"identity-access","resource":"API keys","subgroup":"API keys","name":"Create API key","description":"Create an API key and return its secret once.","operationId":"createApiKey"}}},"/api-keys/{api_key_id}":{"get":{"operationId":"getApiKey","tags":["identity-access/API keys/API keys"],"summary":"Get API key","description":"Return one API key's metadata, status and scopes, without its secret.","parameters":[{"schema":{"type":"string","format":"uuid","description":"API key ID."},"required":true,"description":"API key ID.","name":"api_key_id","in":"path"}],"responses":{"200":{"description":"API key details","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"project_id":{"type":["string","null"],"format":"uuid"},"user_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"key_prefix":{"type":"string"},"last_used_at":{"type":["string","null"]},"expires_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"status":{"type":"string","enum":["active","expired","revoked"]},"revoked_at":{"type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"}},"scope":{"type":"string","enum":["account","project"],"description":"Whether the key is restricted to one project or applies to the account. An account-wide key acts with its owner’s project roles, limited by the key’s scopes. Unlike project-scoped keys, it can inherit the owner’s administrative authority: `write` can allow API key creation, and `delete` can allow project deletion."},"budget":{"$ref":"#/components/schemas/SubjectBudget"},"budget_status":{"$ref":"#/components/schemas/SubjectBudgetStatus"}},"required":["id","project_id","user_id","name","key_prefix","last_used_at","expires_at","created_at","updated_at","status","revoked_at","scopes","scope","budget","budget_status"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"API key not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"API keys","x-canonical-documentation":{"domain":"identity-access","resource":"API keys","subgroup":"API keys","name":"Get API key","description":"Return one API key's metadata, status and scopes, without its secret.","operationId":"getApiKey"}},"patch":{"operationId":"updateApiKey","tags":["identity-access/API keys/API keys"],"summary":"Update API key","description":"Change an API key's name or expiry.","parameters":[{"schema":{"type":"string","format":"uuid","description":"API key ID."},"required":true,"description":"API key ID.","name":"api_key_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"expires_at":{"type":["string","null"]}}}}}},"responses":{"200":{"description":"API key updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"project_id":{"type":["string","null"],"format":"uuid"},"user_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"key_prefix":{"type":"string"},"last_used_at":{"type":["string","null"]},"expires_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"status":{"type":"string","enum":["active","expired","revoked"]},"revoked_at":{"type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"}},"scope":{"type":"string","enum":["account","project"],"description":"Whether the key is restricted to one project or applies to the account. An account-wide key acts with its owner’s project roles, limited by the key’s scopes. Unlike project-scoped keys, it can inherit the owner’s administrative authority: `write` can allow API key creation, and `delete` can allow project deletion."}},"required":["id","project_id","user_id","name","key_prefix","last_used_at","expires_at","created_at","updated_at","status","revoked_at","scopes","scope"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"API key not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"API keys","x-canonical-documentation":{"domain":"identity-access","resource":"API keys","subgroup":"API keys","name":"Update API key","description":"Change an API key's name or expiry.","operationId":"updateApiKey"}},"delete":{"operationId":"deleteApiKey","tags":["identity-access/API keys/API keys"],"summary":"Delete API key","description":"Revoke an API key so that it can no longer authenticate; the key stays listed with status revoked.","parameters":[{"schema":{"type":"string","format":"uuid","description":"API key ID."},"required":true,"description":"API key ID.","name":"api_key_id","in":"path"}],"responses":{"200":{"description":"API key deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"API key not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"API keys","x-canonical-documentation":{"domain":"identity-access","resource":"API keys","subgroup":"API keys","name":"Delete API key","description":"Revoke an API key so that it can no longer authenticate; the key stays listed with status revoked.","operationId":"deleteApiKey"}}},"/auth/{provider}":{"get":{"operationId":"startSignIn","tags":["identity-access/Authentication/Sign-in"],"security":[],"summary":"Start sign-in with an identity provider","description":"Start identity provider authentication.","parameters":[{"schema":{"type":"string","enum":["github","google","microsoft"],"description":"Identity provider.","example":"github"},"required":true,"name":"provider","in":"path"},{"schema":{"type":"string","maxLength":4096,"description":"Application URL after sign-in. The session is delivered in a cookie or token query parameter according to the redirect target."},"required":false,"description":"Application URL after sign-in. The session is delivered in a cookie or token query parameter according to the redirect target.","name":"redirect_uri","in":"query"},{"schema":{"type":"string","maxLength":8192,"description":"Provider callback code. Open the provider sign-in URL without it to start authorization; the provider returns code and state to this same URL."},"required":false,"description":"Provider callback code. Open the provider sign-in URL without it to start authorization; the provider returns code and state to this same URL.","name":"code","in":"query"},{"schema":{"type":"string","maxLength":4096,"description":"CSRF state token (maximum 4096 characters)"},"required":false,"description":"CSRF state token (maximum 4096 characters)","name":"state","in":"query"},{"schema":{"type":"string","maxLength":8192,"description":"OAuth error code (for example, access_denied when user cancels)."},"required":false,"description":"OAuth error code (for example, access_denied when user cancels).","name":"error","in":"query"},{"schema":{"type":"string","description":"Human-readable error description"},"required":false,"description":"Human-readable error description","name":"error_description","in":"query"},{"schema":{"type":"string","description":"Google callbacks only: issuer metadata. Ignored otherwise."},"required":false,"description":"Google callbacks only: issuer metadata. Ignored otherwise.","name":"iss","in":"query"},{"schema":{"type":"string","description":"Google callbacks only: granted scopes metadata. Ignored otherwise."},"required":false,"description":"Google callbacks only: granted scopes metadata. Ignored otherwise.","name":"scope","in":"query"},{"schema":{"type":"string","description":"Google callbacks only: account index metadata. Ignored otherwise."},"required":false,"description":"Google callbacks only: account index metadata. Ignored otherwise.","name":"authuser","in":"query"},{"schema":{"type":"string","description":"Google callbacks only: Workspace hosted-domain metadata. Ignored otherwise."},"required":false,"description":"Google callbacks only: Workspace hosted-domain metadata. Ignored otherwise.","name":"hd","in":"query"},{"schema":{"type":"string","description":"Google callbacks only: prompt metadata. Ignored otherwise."},"required":false,"description":"Google callbacks only: prompt metadata. Ignored otherwise.","name":"prompt","in":"query"}],"responses":{"302":{"description":"Redirect to the provider consent screen, or back to the application after the callback. The provider returns to the same /auth/{provider} URL with code and state; these callback URLs are registered with each provider and remain unchanged.","headers":{"Location":{"schema":{"type":"string","description":"Provider consent screen, or the application URL after the callback (with an OAuth error when it failed)."},"required":true,"description":"Provider consent screen, or the application URL after the callback (with an OAuth error when it failed)."}}},"400":{"description":"Sign-in refused: disabled provider, invalid redirect or state, or an unverified or conflicting provider account.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many authentication requests from this client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Unexpected sign-in failure","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"OAuth state or consumption outcome could not be confirmed. Retry after recovery or start a new authorization flow.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Sign-in","x-canonical-documentation":{"domain":"identity-access","resource":"Authentication","subgroup":"Sign-in","name":"Start sign-in with an identity provider","description":"Start identity provider authentication.","operationId":"startSignIn"}}},"/auth/magic-links":{"post":{"operationId":"createMagicLinkRequest","tags":["identity-access/Authentication/Sign-in"],"security":[],"summary":"Email a one-time sign-in link","description":"Email sign-in link.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Recipient of a one-time sign-in link. The emailed link opens GET /auth/magiclink. Requests are limited per email address and client IP; redemption requires the device-binding cookie from this browser.","example":"user@example.com"},"redirect_url":{"type":"string","maxLength":4096,"format":"uri","description":"Trusted URL to open after sign-in. Untrusted URLs fall back to the default."}},"required":["email"],"additionalProperties":false}}}},"responses":{"201":{"description":"Link sent; the device-binding cookie is set","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicLinkCreateResponse"},"example":{"success":true,"message":"Magic link sent"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Sign-in","x-canonical-documentation":{"domain":"identity-access","resource":"Authentication","subgroup":"Sign-in","name":"Email a one-time sign-in link","description":"Email sign-in link.","operationId":"createMagicLinkRequest"}}},"/auth/magiclink":{"get":{"operationId":"verifyMagicLink","tags":["identity-access/Authentication/Sign-in"],"description":"Verify a magic link.","security":[],"summary":"Verify a magic link","parameters":[{"schema":{"type":"string","description":"One-time JWT from the sign-in email. Redeem it in the browser with the device-binding cookie from the link request."},"required":true,"description":"One-time JWT from the sign-in email. Redeem it in the browser with the device-binding cookie from the link request.","name":"token","in":"query"},{"schema":{"type":"string","maxLength":4096,"format":"uri","description":"URL to redirect after verification"},"required":false,"description":"URL to redirect after verification","name":"redirect_url","in":"query"},{"schema":{"type":"string","maxLength":4096,"format":"uri","description":"URL to redirect after verification (camelCase alias)"},"required":false,"name":"redirectUrl","in":"query"}],"responses":{"302":{"description":"Redirect to the application with an auth cookie set, or to the sign-in page with a typed magic_link_* failure reason","headers":{"Location":{"schema":{"type":"string","description":"Application URL after sign-in, or the sign-in page carrying a magic_link_* failure reason."},"required":true,"description":"Application URL after sign-in, or the sign-in page carrying a magic_link_* failure reason."}}},"400":{"description":"Malformed request rejected by query validation before the handler runs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many verification attempts","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Unexpected verification failure","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Token consumption could not be confirmed; retry the request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Sign-in","x-canonical-documentation":{"domain":"identity-access","resource":"Authentication","subgroup":"Sign-in","name":"Verify a magic link","description":"Verify a magic link.","operationId":"verifyMagicLink"}},"head":{"operationId":"probeMagicLink","tags":["identity-access/Authentication/Sign-in"],"security":[],"summary":"Probe a magic link","description":"Check a magic link without redeeming it.","parameters":[{"schema":{"type":"string","description":"One-time JWT from the sign-in email. Redeem it in the browser with the device-binding cookie from the link request."},"required":true,"description":"One-time JWT from the sign-in email. Redeem it in the browser with the device-binding cookie from the link request.","name":"token","in":"query"},{"schema":{"type":"string","maxLength":4096,"format":"uri","description":"URL to redirect after verification"},"required":false,"description":"URL to redirect after verification","name":"redirect_url","in":"query"},{"schema":{"type":"string","maxLength":4096,"format":"uri","description":"URL to redirect after verification (camelCase alias)"},"required":false,"name":"redirectUrl","in":"query"}],"responses":{"200":{"description":"Empty response without redeeming the sign-in token, setting authentication cookies or spending the verification rate-limit budget."},"302":{"description":"Redirect to sign-in when magic-link authentication is disabled","headers":{"Location":{"schema":{"type":"string","description":"Application URL after sign-in, or the sign-in page carrying a magic_link_* failure reason."},"required":true,"description":"Application URL after sign-in, or the sign-in page carrying a magic_link_* failure reason."}}},"400":{"description":"Malformed query rejected before verification; HEAD responses have no content."},"500":{"description":"Unexpected probe failure; HEAD responses have no content."}},"x-documentation-source-tag":"Sign-in","x-canonical-documentation":{"domain":"identity-access","resource":"Authentication","subgroup":"Sign-in","name":"Probe a magic link","description":"Check a magic link without redeeming it.","operationId":"probeMagicLink"}}},"/auth/logout":{"post":{"operationId":"deleteSession","tags":["identity-access/Authentication/Sign-in"],"summary":"Sign out the current session","description":"End the current session.","responses":{"200":{"description":"Revokes a verified user-session JWT from the authToken cookie or Authorization: Bearer header, if present, and clears the auth cookie. API keys and non-session or unverifiable tokens are ignored, keeping logout idempotent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthLogoutResponse"}}}},"403":{"description":"Cookie authentication requires a trusted browser origin. Bearer authentication does not.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many authentication requests from this client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Unexpected sign-out failure","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Session revocation could not be confirmed; retry logout","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Sign-in","x-canonical-documentation":{"domain":"identity-access","resource":"Authentication","subgroup":"Sign-in","name":"Sign out the current session","description":"End the current session.","operationId":"deleteSession"}}},"/projects/{project_reference}/environments/{environment_name}/access-tokens":{"post":{"operationId":"createEnvironmentAccessToken","tags":["identity-access/Authentication/Tokens"],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"summary":"Create environment access token","description":"Create environment access token.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Project UUID or slug. Present the API key as Authorization: Bearer or X-API-Key; account-wide keys act as their owner and project-scoped keys stay within their own project."},"required":true,"name":"project_reference","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Environment name, for example production."},"required":true,"name":"environment_name","in":"path"}],"responses":{"200":{"description":"Environment access token issued","content":{"application/json":{"schema":{"type":"object","properties":{"access_token":{"type":"string","description":"Five-minute token for the selected protected project environment. It cannot authenticate API requests. Revoking the API key does not revoke an issued token; it remains valid until expiry."},"token_type":{"type":"string","enum":["Bearer"],"description":"Token type."},"expires_in_seconds":{"type":"integer","exclusiveMinimum":0,"description":"Seconds until the token expires."}},"required":["access_token","token_type","expires_in_seconds"]},"example":{"access_token":"eyJhbGciOiJSUzI1NiJ9.example","token_type":"Bearer","expires_in_seconds":300}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Unknown project or environment, a key for another project, or denied access.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Tokens","x-canonical-documentation":{"domain":"identity-access","resource":"Authentication","subgroup":"Tokens","name":"Create environment access token","description":"Create environment access token.","operationId":"createEnvironmentAccessToken"}}},"/auth/token":{"post":{"operationId":"createAccessToken","tags":["identity-access/Authentication/Tokens"],"summary":"Create access token from client credentials","description":"Issue client access token.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthTokenRequest"}}}},"responses":{"200":{"description":"Token successfully generated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthTokenResponse"}}}},"400":{"description":"Invalid request, invalid client credentials, or an unknown selected project.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many authentication requests from this client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Unexpected token exchange failure","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Tokens","x-canonical-documentation":{"domain":"identity-access","resource":"Authentication","subgroup":"Tokens","name":"Create access token from client credentials","description":"Issue client access token.","operationId":"createAccessToken"}}},"/.well-known/jwks.json":{"get":{"security":[],"operationId":"getJwks","tags":["identity-access/Authentication/Tokens"],"summary":"Get JSON Web Key Set","description":"Return public signing keys.","responses":{"200":{"description":"Public JSON Web Key Set","headers":{"Cache-Control":{"description":"Always public, max-age=300.","schema":{"type":"string","example":"public, max-age=300"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JwksResponse"},"example":{"keys":[{"kty":"RSA","kid":"veryfront-1","use":"sig","alg":"RS256","n":"u1SU1LfVLPHCozMxH2Mo","e":"AQAB"}]}}}},"500":{"description":"Server error while building JWKS","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Tokens","x-canonical-documentation":{"domain":"identity-access","resource":"Authentication","subgroup":"Tokens","name":"Get JSON Web Key Set","description":"Return public signing keys.","operationId":"getJwks"}}},"/oauth/grants":{"get":{"operationId":"listMcpAuthorizationGrants","tags":["identity-access/Authorization/Authorized apps"],"summary":"List authorized apps","description":"List authorized apps.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Active grants for the signed-in user","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"client":{"type":"object","properties":{"client_id":{"type":"string"},"client_name":{"type":["string","null"]},"client_uri":{"type":["string","null"]}},"required":["client_id","client_name","client_uri"]},"redirect_host":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"resource":{"type":"string"},"created_at":{"type":"string"},"last_used_at":{"type":["string","null"]},"private_sandbox_access":{"type":"boolean"}},"required":["id","client","redirect_host","scopes","resource","created_at","last_used_at","private_sandbox_access"]}},"page_info":{"type":"object","properties":{"self":{"type":["string","null"]},"first":{"type":["string","null"]},"next":{"type":["string","null"]},"prev":{"type":["string","null"]}},"required":["self","first","next","prev"]}},"required":["data","page_info"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"415":{"description":"Unsupported media type","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"OAuth Grants","x-canonical-documentation":{"domain":"identity-access","resource":"Authorization","subgroup":"Authorized apps","name":"List authorized apps","description":"List authorized apps.","operationId":"listMcpAuthorizationGrants"}}},"/oauth/grants/{id}":{"delete":{"operationId":"revokeMcpAuthorizationGrant","tags":["identity-access/Authorization/Authorized apps"],"summary":"Revoke an authorized app","description":"Revoke an authorized app.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Grant revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"415":{"description":"Unsupported media type","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"OAuth Grants","x-canonical-documentation":{"domain":"identity-access","resource":"Authorization","subgroup":"Authorized apps","name":"Revoke an authorized app","description":"Revoke an authorized app.","operationId":"revokeMcpAuthorizationGrant"}}},"/.well-known/oauth-authorization-server":{"get":{"security":[],"operationId":"getMcpAuthorizationServerMetadata","tags":["identity-access/Authorization/General OAuth"],"summary":"Discover OAuth authorization endpoints","description":"Discover OAuth authorization endpoints.","responses":{"200":{"description":"OAuth authorization server metadata","content":{"application/json":{"schema":{"type":"object","properties":{"issuer":{"type":"string","format":"uri"},"authorization_endpoint":{"type":"string","format":"uri"},"token_endpoint":{"type":"string","format":"uri"},"registration_endpoint":{"type":"string","format":"uri"},"revocation_endpoint":{"type":"string","format":"uri"},"response_types_supported":{"type":"array","items":{"type":"string"}},"grant_types_supported":{"type":"array","items":{"type":"string"}},"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"}},"revocation_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"}},"code_challenge_methods_supported":{"type":"array","items":{"type":"string"}},"scopes_supported":{"type":"array","items":{"type":"string"}},"authorization_response_iss_parameter_supported":{"type":"boolean"}},"required":["issuer","authorization_endpoint","token_endpoint","registration_endpoint","revocation_endpoint","response_types_supported","grant_types_supported","token_endpoint_auth_methods_supported","revocation_endpoint_auth_methods_supported","code_challenge_methods_supported","scopes_supported","authorization_response_iss_parameter_supported"]}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"OAuth Metadata","x-canonical-documentation":{"domain":"identity-access","resource":"Authorization","subgroup":"General OAuth","name":"Discover OAuth authorization endpoints","description":"Discover OAuth authorization endpoints.","operationId":"getMcpAuthorizationServerMetadata"}}},"/oauth/token":{"post":{"security":[],"operationId":"exchangeMcpOAuthToken","tags":["identity-access/Authorization/General OAuth"],"summary":"Exchange an authorization code or refresh an access token","description":"Exchange OAuth access credentials.","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"oneOf":[{"type":"object","properties":{"grant_type":{"type":"string","enum":["authorization_code"]},"client_id":{"type":"string","maxLength":200},"code":{"type":"string","maxLength":200},"redirect_uri":{"type":"string","maxLength":2048},"code_verifier":{"type":"string","pattern":"^[A-Za-z0-9._~-]{43,128}$"},"resource":{"type":"string","maxLength":2048}},"required":["grant_type","client_id","code","redirect_uri","code_verifier"]},{"type":"object","properties":{"grant_type":{"type":"string","enum":["refresh_token"]},"client_id":{"type":"string","maxLength":200},"refresh_token":{"type":"string","maxLength":200},"resource":{"type":"string","maxLength":2048},"scope":{"type":"string","enum":["mcp"]}},"required":["grant_type","client_id","refresh_token"]}]}}}},"responses":{"200":{"description":"MCP access and refresh tokens","content":{"application/json":{"schema":{"type":"object","properties":{"access_token":{"type":"string"},"refresh_token":{"type":"string"},"token_type":{"type":"string","enum":["Bearer"]},"expires_in":{"type":"number"},"scope":{"type":"string","enum":["mcp"]}},"required":["access_token","refresh_token","token_type","expires_in","scope"]}}}},"400":{"description":"Invalid OAuth request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"error_description":{"type":"string"}},"required":["error","error_description"]}}}},"500":{"description":"OAuth service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/OAuthServerProblem"}}}}},"x-documentation-source-tag":"OAuth Tokens","x-canonical-documentation":{"domain":"identity-access","resource":"Authorization","subgroup":"General OAuth","name":"Exchange an authorization code or refresh an access token","description":"Exchange OAuth access credentials.","operationId":"exchangeMcpOAuthToken"}}},"/oauth/register":{"post":{"security":[],"operationId":"registerMcpOAuthClient","tags":["identity-access/Authorization/General OAuth"],"summary":"Register a public OAuth client","description":"Register OAuth public client.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"redirect_uris":{"type":"array","items":{"type":"string","maxLength":2048},"minItems":1,"maxItems":20},"client_name":{"type":"string","minLength":1,"maxLength":200},"client_uri":{"type":"string","maxLength":2048,"format":"uri"},"software_id":{"type":"string","maxLength":200},"software_version":{"type":"string","maxLength":100},"token_endpoint_auth_method":{"type":"string","enum":["none"],"default":"none"},"grant_types":{"type":"array","items":{"type":"string","enum":["authorization_code","refresh_token"]},"default":["authorization_code","refresh_token"]},"response_types":{"type":"array","items":{"type":"string","enum":["code"]},"default":["code"]}},"required":["redirect_uris"]}}}},"responses":{"201":{"description":"Public client registration","content":{"application/json":{"schema":{"type":"object","properties":{"redirect_uris":{"type":"array","items":{"type":"string","maxLength":2048},"minItems":1,"maxItems":20},"client_name":{"type":"string","minLength":1,"maxLength":200},"client_uri":{"type":"string","maxLength":2048,"format":"uri"},"software_id":{"type":"string","maxLength":200},"software_version":{"type":"string","maxLength":100},"token_endpoint_auth_method":{"type":"string","enum":["none"],"default":"none"},"grant_types":{"type":"array","items":{"type":"string","enum":["authorization_code","refresh_token"]},"default":["authorization_code","refresh_token"]},"response_types":{"type":"array","items":{"type":"string","enum":["code"]},"default":["code"]},"client_id":{"type":"string"},"client_id_issued_at":{"type":"number"}},"required":["redirect_uris","client_id","client_id_issued_at"]}}}},"400":{"description":"Invalid OAuth request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"error_description":{"type":"string"}},"required":["error","error_description"]}}}},"500":{"description":"OAuth service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/OAuthServerProblem"}}}}},"x-documentation-source-tag":"OAuth Clients","x-canonical-documentation":{"domain":"identity-access","resource":"Authorization","subgroup":"General OAuth","name":"Register a public OAuth client","description":"Register OAuth public client.","operationId":"registerMcpOAuthClient"}}},"/oauth/revoke":{"post":{"security":[],"operationId":"revokeMcpOAuthToken","tags":["identity-access/Authorization/General OAuth"],"summary":"Revoke an OAuth token","description":"Revoke an OAuth token.","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"client_id":{"type":"string","maxLength":200},"token":{"type":"string","maxLength":200},"token_type_hint":{"type":"string"}},"required":["client_id","token"]}}}},"responses":{"200":{"description":"Revocation processed without disclosing token validity"},"400":{"description":"Invalid OAuth request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"error_description":{"type":"string"}},"required":["error","error_description"]}}}},"500":{"description":"OAuth service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/OAuthServerProblem"}}}}},"x-documentation-source-tag":"OAuth Tokens","x-canonical-documentation":{"domain":"identity-access","resource":"Authorization","subgroup":"General OAuth","name":"Revoke an OAuth token","description":"Revoke an OAuth token.","operationId":"revokeMcpOAuthToken"}}},"/oauth/authorize":{"get":{"security":[],"operationId":"authorizeMcpOAuthClient","tags":["identity-access/Authorization/General OAuth"],"summary":"Start OAuth authorization with PKCE","description":"Start OAuth authorization.","parameters":[{"schema":{"type":"string","enum":["code"]},"required":true,"name":"response_type","in":"query"},{"schema":{"type":"string","maxLength":200},"required":true,"name":"client_id","in":"query"},{"schema":{"type":"string","maxLength":2048},"required":true,"name":"redirect_uri","in":"query"},{"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"required":true,"name":"code_challenge","in":"query"},{"schema":{"type":"string","enum":["S256"]},"required":true,"name":"code_challenge_method","in":"query"},{"schema":{"type":"string","maxLength":2048},"required":false,"name":"resource","in":"query"},{"schema":{"type":"string","enum":["mcp"],"default":"mcp"},"required":false,"name":"scope","in":"query"},{"schema":{"type":"string","maxLength":2048},"required":false,"name":"state","in":"query"}],"responses":{"302":{"description":"Continue to Veryfront consent, or return an OAuth error to the validated callback with state and iss","headers":{"Location":{"schema":{"type":"string","description":"Veryfront consent page, or the validated client callback carrying an OAuth error, state and iss."},"required":true,"description":"Veryfront consent page, or the validated client callback carrying an OAuth error, state and iss."}}},"400":{"description":"Unknown client or unregistered redirect URI; never redirected","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/OAuthAuthorizationProblem"}}}},"500":{"description":"OAuth service unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/OAuthServerProblem"}}}}},"x-documentation-source-tag":"OAuth Authorization Requests","x-canonical-documentation":{"domain":"identity-access","resource":"Authorization","subgroup":"General OAuth","name":"Start OAuth authorization with PKCE","description":"Start OAuth authorization.","operationId":"authorizeMcpOAuthClient"}}},"/oauth/authorization-requests/{id}":{"get":{"operationId":"getMcpAuthorizationRequest","tags":["identity-access/Authorization/Consent"],"summary":"Read an OAuth authorization request","description":"Return OAuth consent request.","parameters":[{"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]+$"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"User-bound consent request","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"client":{"type":"object","properties":{"client_id":{"type":"string"},"client_name":{"type":["string","null"]},"client_uri":{"type":["string","null"]}},"required":["client_id","client_name","client_uri"]},"redirect_host":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"resource":{"type":"string"},"expires_at":{"type":"string"},"consent_token":{"type":"string"},"supports_private_sandbox_access":{"type":"boolean"}},"required":["id","client","redirect_host","scopes","resource","expires_at","consent_token"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"415":{"description":"Unsupported media type","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"OAuth Authorization Requests","x-canonical-documentation":{"domain":"identity-access","resource":"Authorization","subgroup":"Consent","name":"Read an OAuth authorization request","description":"Return OAuth consent request.","operationId":"getMcpAuthorizationRequest"}}},"/oauth/authorization-requests/{id}/decision":{"post":{"operationId":"decideMcpAuthorizationRequest","tags":["identity-access/Authorization/Consent"],"summary":"Approve or deny OAuth access","description":"Resolve OAuth access consent.","parameters":[{"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]+$"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approve","deny"]},"private_sandbox_access":{"type":"boolean"},"consent_token":{"type":"string","minLength":20,"maxLength":200}},"required":["decision","consent_token"],"additionalProperties":false}}}},"responses":{"200":{"description":"Registered client callback","content":{"application/json":{"schema":{"type":"object","properties":{"redirect_to":{"type":"string","format":"uri"}},"required":["redirect_to"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"415":{"description":"Unsupported media type","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"OAuth Authorization Requests","x-canonical-documentation":{"domain":"identity-access","resource":"Authorization","subgroup":"Consent","name":"Approve or deny OAuth access","description":"Resolve OAuth access consent.","operationId":"decideMcpAuthorizationRequest"}}},"/accounts/{account_id}/subscription":{"get":{"operationId":"getSubscription","tags":["billing-usage/Subscriptions/Subscription"],"summary":"Get subscription","description":"Read the plan, billing cycle, seats and add-ons of an account before changing or cancelling its subscription; returns the subscription with its seat usage. Requires account.billing.read.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"}],"responses":{"200":{"description":"Account subscriptions, limits and the selected subscription","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":["string","null"],"description":"Billing record ID. Null, or absent under external billing, when the account has no stored billing record."},"project_id":{"type":["string","null"],"description":"Project this subscription is scoped to, when applicable"},"line_items":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["plan","seat","server","sandbox"],"description":"Subscription line item kind"},"quantity":{"type":"number","description":"Line item quantity"},"recurring_interval":{"type":["string","null"],"enum":["monthly","yearly",null],"description":"Line item billing interval when price-classifiable"},"unit_amount":{"type":["number","null"],"description":"Line item unit amount in minor currency units"},"currency":{"type":["string","null"],"description":"Line item currency"}},"required":["kind","quantity"]},"description":"Subscription line items. Credits are one-time top-ups and are not included here."},"seat_usage":{"type":["object","null"],"properties":{"purchased":{"type":"integer","minimum":0},"active":{"type":"integer","minimum":0},"reserved":{"type":"integer","minimum":0},"available":{"type":"integer","minimum":0},"over_capacity":{"type":"boolean"},"used":{"type":"integer","minimum":0,"description":"Seats in use: active plus reserved"}},"required":["purchased","active","reserved","available","over_capacity"],"description":"Seat usage that seat changes and invitations are checked against, served on every read, including an account without a stored billing record. Null only while the account still has subscriptions without an owning account (migration.legacy_subscriptions above 0)."},"status":{"type":["string","null"],"description":"Subscription status"},"current_period_start":{"type":["string","null"],"description":"Current billing period start timestamp"},"current_period_end":{"type":["string","null"],"description":"Current billing period end timestamp"},"expires_at":{"type":["string","null"],"description":"Subscription expiration timestamp"},"canceled_at":{"type":["string","null"],"description":"Subscription cancellation timestamp"},"created_at":{"type":["string","null"],"description":"Billing record creation time. Null, or absent under external billing, when the account has no stored billing record."},"account_id":{"type":"string","format":"uuid"},"billing_mode":{"type":"string","enum":["stripe","external"]},"tier_id":{"type":"string"},"subscriptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"account_id":{"type":"string","format":"uuid"},"plan_type":{"type":"string"},"cycle":{"type":["string","null"],"enum":["monthly","yearly",null]},"provider_managed":{"type":"boolean"},"tier_id":{"type":"string"},"project_id":{"type":["string","null"],"format":"uuid"},"status":{"type":"string","enum":["active","canceling","canceled"]},"expires_at":{"type":["string","null"]},"canceled_at":{"type":["string","null"]},"created_at":{"type":"string"},"line_items":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"quantity":{"type":"integer"},"unit_amount":{"type":["number","null"]},"currency":{"type":["string","null"]}},"required":["kind","quantity","unit_amount","currency"]}}},"required":["id","account_id","plan_type","cycle","provider_managed","tier_id","project_id","status","expires_at","canceled_at","created_at","line_items"]}},"limits":{"type":"object","properties":{"projects":{"type":["number","null"]},"collaborators":{"type":["number","null"],"description":"Effective account seats, including owners, members, and direct project collaborators"},"collaborator_feature_max":{"type":["number","null"]}},"required":["projects","collaborators","collaborator_feature_max"]},"migration":{"type":"object","properties":{"legacy_subscriptions":{"type":"integer","minimum":0},"legacy_credit_transactions":{"type":"integer","minimum":0}},"required":["legacy_subscriptions","legacy_credit_transactions"]},"plan_type":{"type":"string","enum":["free","pro","enterprise"],"description":"Canonical plan resolved from the configured plan price ID, independent of billed amount"},"entitlements":{"type":"object","properties":{"server_limit":{"type":"integer","minimum":0,"maximum":9007199254740991},"seat_limit":{"type":"integer","exclusiveMinimum":0,"minimum":-9007199254740991,"maximum":9007199254740991}},"required":["server_limit","seat_limit"],"additionalProperties":false},"server_usage":{"type":"number","description":"Active dedicated server records for the account"},"sandbox_usage":{"type":"number","description":"Active sandbox records for the account"},"server_usage_details":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Server ID"},"short_id":{"type":"string","description":"Short server identifier"},"status":{"type":"string","enum":["pending","provisioning","running"],"description":"Active server status counted against add-on usage"},"environment_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Environment IDs linked to the server"},"environments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Environment ID linked to the server"},"name":{"type":"string","description":"Environment name"},"project_id":{"type":"string","format":"uuid","description":"Project ID that owns the environment"},"project_name":{"type":"string","description":"Project display name"},"project_slug":{"type":"string","description":"Project slug"}},"required":["id","name","project_id","project_name","project_slug"]},"description":"Linked environment labels across accessible projects"}},"required":["id","short_id","status","environment_ids","environments"]},"description":"Active server add-on usage with linked project and environment labels"},"cycle":{"type":["string","null"],"enum":["monthly","yearly",null],"description":"Billing cycle of the selected subscription. Null without a paid subscription."}},"required":["seat_usage","account_id","billing_mode","tier_id","subscriptions","limits","migration"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account billing","x-canonical-documentation":{"domain":"billing-usage","resource":"Subscriptions","subgroup":"Subscription","name":"Get subscription","description":"Read the plan, billing cycle, seats and add-ons of an account before changing or cancelling its subscription; returns the subscription with its seat usage. Requires account.billing.read.","operationId":"getSubscription"}},"patch":{"operationId":"updateSubscription","tags":["billing-usage/Subscriptions/Subscription"],"summary":"Update subscription","description":"Change the plan, billing cycle, seats or add-ons of an account; returns what changed, or a checkout URL when the change needs payment. Requires account.billing.manage.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["free","pro","enterprise"],"description":"Subscription tier to upgrade to."},"cycle":{"type":"string","enum":["monthly","yearly"],"description":"Billing cycle"},"quantity":{"type":"integer","minimum":1,"description":"Seat quantity for licensed subscriptions"},"server_quantity":{"type":["integer","null"],"minimum":0,"description":"Recurring server add-on quantity"},"sandbox_quantity":{"type":["integer","null"],"minimum":0,"description":"Recurring sandbox add-on quantity"},"success_url":{"type":"string","format":"uri","description":"URL to redirect to after successful payment"},"cancel_url":{"type":"string","format":"uri","description":"URL to redirect to if payment is canceled."}},"required":["type","cycle"]}}}},"responses":{"200":{"description":"What the update changed, or the checkout that completes it.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["subscription_updated","seats_updated","add_ons_updated","checkout_created"],"description":"What the update did. `checkout_created` means payment is required at `checkout_url`."},"amount":{"type":["string","null"],"pattern":"^-?\\d+(?:\\.\\d+)?$","description":"Exact decimal amount due, without a currency suffix. Null when no amount is due or known."},"currency":{"type":["string","null"],"description":"ISO 4217 currency of `amount` in upper case. Null without an amount."},"checkout_url":{"type":["string","null"],"format":"uri","description":"Stripe checkout session URL when payment is required. Null when the change was applied in place."}},"required":["status","amount","currency","checkout_url"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Seat reduction blocked until seat usage is reduced","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account billing","x-canonical-documentation":{"domain":"billing-usage","resource":"Subscriptions","subgroup":"Subscription","name":"Update subscription","description":"Change the plan, billing cycle, seats or add-ons of an account; returns what changed, or a checkout URL when the change needs payment. Requires account.billing.manage.","operationId":"updateSubscription"}}},"/accounts/{account_id}/subscription/cancel":{"post":{"operationId":"cancelSubscription","tags":["billing-usage/Subscriptions/Subscription"],"summary":"Cancel subscription","description":"Schedule the paid subscription of an account to end with its current billing period; returns the canceled subscription. Requires account.billing.manage.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"}],"responses":{"200":{"description":"Subscription canceled. Cancellation downgrades the account to the free tier.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"ID of the canceled subscription"},"status":{"type":"string","description":"Subscription status after the cancellation request"},"expires_at":{"type":["string","null"],"description":"End of the paid period, when the subscription ends. Cancellation downgrades the account to the free tier."},"canceled_at":{"type":["string","null"],"description":"When the cancellation was requested"}},"required":["id","status","expires_at","canceled_at"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"Billing provider could not verify or cancel the subscription","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account billing","x-canonical-documentation":{"domain":"billing-usage","resource":"Subscriptions","subgroup":"Subscription","name":"Cancel subscription","description":"Schedule the paid subscription of an account to end with its current billing period; returns the canceled subscription. Requires account.billing.manage.","operationId":"cancelSubscription"}}},"/accounts/{account_id}/billing-portal-sessions":{"post":{"operationId":"createBillingPortalSession","tags":["billing-usage/Subscriptions/Subscription"],"summary":"Create billing portal session","description":"Open a Stripe billing portal session where a person changes payment methods, tax details or the renewal of an account; returns the portal URL. Requires account.billing.manage.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"}],"responses":{"200":{"description":"Stripe billing portal session for the account subscription.","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Short-lived Stripe billing portal URL. Hand it to a person; it is not logged."}},"required":["url"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account billing","x-canonical-documentation":{"domain":"billing-usage","resource":"Subscriptions","subgroup":"Subscription","name":"Create billing portal session","description":"Open a Stripe billing portal session where a person changes payment methods, tax details or the renewal of an account; returns the portal URL. Requires account.billing.manage.","operationId":"createBillingPortalSession"}}},"/projects/{project_reference}/collaboration":{"get":{"operationId":"getProjectCollaboration","tags":["billing-usage/Subscriptions/Seats"],"summary":"Get available seats","description":"Get available seats. Requires project.read.","parameters":[{"schema":{"type":"string","example":"my-project"},"required":true,"name":"project_reference","in":"path"}],"responses":{"200":{"description":"Available seats and collaboration entitlement. Requires project.read.","content":{"application/json":{"schema":{"type":"object","properties":{"seats":{"type":"object","properties":{"purchased":{"type":"integer","minimum":1,"description":"Seat capacity provided by the project owner subscription or external entitlement."},"active":{"type":"integer","minimum":0,"description":"Distinct active users across all projects owned by this project owner."},"reserved":{"type":"integer","minimum":0,"description":"Distinct pending invitation emails across owner projects, excluding emails already represented by active users."},"available":{"type":"integer","minimum":0,"description":"Owner seat capacity minus active and reserved seats, clamped to zero."}},"required":["purchased","active","reserved","available"],"description":"Owner-wide seat usage, shared across every project owned by the same user."},"over_capacity":{"type":"boolean","description":"True when owner-wide active plus reserved seats exceed seat capacity."},"collaboration_allowed":{"type":"boolean","description":"Whether the project owner entitlement allows collaborators."},"can_invite":{"type":"boolean","description":"True when the owner entitlement allows collaborators and at least one seat is available. Does not indicate whether the requester may send invitations."}},"required":["seats","over_capacity","collaboration_allowed","can_invite"]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account Collaboration","x-canonical-documentation":{"domain":"billing-usage","resource":"Subscriptions","subgroup":"Seats","name":"Get available seats","description":"Get available seats. Requires project.read.","operationId":"getProjectCollaboration"}}},"/accounts/{account_id}/billing-details":{"get":{"operationId":"getBillingDetails","tags":["billing-usage/Billing/Billing details"],"summary":"Get billing details","description":"Read the name, email, phone, address and tax IDs that appear on the invoices of an account; returns empty details and customer_available false before the account has a billing customer. Requires account.billing.read.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"}],"responses":{"200":{"description":"Account billing details","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"},"phone":{"type":["string","null"]},"address":{"type":["object","null"],"properties":{"line1":{"type":["string","null"]},"line2":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"postal_code":{"type":["string","null"]},"country":{"type":["string","null"]}},"required":["line1","line2","city","state","postal_code","country"]},"tax_ids":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"value":{"type":["string","null"]}},"required":["id","type","value"]}},"customer_available":{"type":"boolean","description":"Whether this account has an existing billing customer"}},"required":["name","email","phone","address","tax_ids","customer_available"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account billing","x-canonical-documentation":{"domain":"billing-usage","resource":"Billing","subgroup":"Billing details","name":"Get billing details","description":"Read the name, email, phone, address and tax IDs that appear on the invoices of an account; returns empty details and customer_available false before the account has a billing customer. Requires account.billing.read.","operationId":"getBillingDetails"}},"patch":{"operationId":"updateBillingDetails","tags":["billing-usage/Billing/Billing details"],"summary":"Update billing details","description":"Change the name, email, phone or address on the invoices of an account, where an omitted field keeps its value and null clears it; returns the updated billing details. Requires account.billing.manage.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"},"phone":{"type":["string","null"]},"address":{"type":["object","null"],"properties":{"line1":{"type":["string","null"]},"line2":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"postal_code":{"type":["string","null"]},"country":{"type":["string","null"]}}}}}}}},"responses":{"200":{"description":"Updated billing details of the account.","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"},"phone":{"type":["string","null"]},"address":{"type":["object","null"],"properties":{"line1":{"type":["string","null"]},"line2":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"postal_code":{"type":["string","null"]},"country":{"type":["string","null"]}},"required":["line1","line2","city","state","postal_code","country"]},"tax_ids":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"value":{"type":["string","null"]}},"required":["id","type","value"]}},"customer_available":{"type":"boolean","description":"Whether this account has an existing billing customer"}},"required":["name","email","phone","address","tax_ids","customer_available"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account billing","x-canonical-documentation":{"domain":"billing-usage","resource":"Billing","subgroup":"Billing details","name":"Update billing details","description":"Change the name, email, phone or address on the invoices of an account, where an omitted field keeps its value and null clears it; returns the updated billing details. Requires account.billing.manage.","operationId":"updateBillingDetails"}}},"/accounts/{account_id}/invoices":{"get":{"operationId":"listInvoices","tags":["billing-usage/Billing/Invoices and payments"],"summary":"List invoices","description":"List the issued invoices of an account, or with kind upcoming the previews and drafts of what it will be charged next; returns one page of invoices with amounts in minor currency units. Requires account.billing.read.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"},{"schema":{"type":"string","enum":["issued","upcoming"],"default":"issued","description":"Which invoices to list. \"issued\" (default) lists finalized invoices. \"upcoming\" lists the preview of each active subscription, then draft invoices."},"required":false,"description":"Which invoices to list. \"issued\" (default) lists finalized invoices. \"upcoming\" lists the preview of each active subscription, then draft invoices.","name":"kind","in":"query"},{"schema":{"type":"string","enum":["date","amount","status"],"default":"date","description":"Sort field of the returned page. Defaults to \"date\" for issued invoices. Pages follow Stripe order, newest first; sorting orders the returned page only."},"required":false,"description":"Sort field of the returned page. Defaults to \"date\" for issued invoices. Pages follow Stripe order, newest first; sorting orders the returned page only.","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort order of the returned page. Defaults to \"desc\"."},"required":false,"description":"Sort order of the returned page. Defaults to \"desc\".","name":"sort_order","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum number of invoices to return, 1 to 100. Defaults to 20."},"required":false,"description":"Maximum number of invoices to return, 1 to 100. Defaults to 20.","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Opaque cursor pointing at the next page. Omit it to read the first page."},"required":false,"description":"Opaque cursor pointing at the next page. Omit it to read the first page.","name":"cursor","in":"query"}],"responses":{"200":{"description":"One page of issued or upcoming invoices of the account.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":["string","null"]},"status":{"type":["string","null"]},"description":{"type":["string","null"]},"amount_due":{"type":"number"},"amount_paid":{"type":"number"},"amount_total":{"type":"number"},"applied_balance_amount":{"type":"number"},"proration_amount":{"type":"number"},"recurring_amount":{"type":"number"},"currency":{"type":"string"},"issued_at":{"type":"string"},"hosted_invoice_url":{"type":["string","null"],"format":"uri"},"pdf_url":{"type":["string","null"],"format":"uri"}},"required":["id","number","status","description","amount_due","amount_paid","currency","issued_at","hosted_invoice_url","pdf_url"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account billing","x-canonical-documentation":{"domain":"billing-usage","resource":"Billing","subgroup":"Invoices and payments","name":"List invoices","description":"List the issued invoices of an account, or with kind upcoming the previews and drafts of what it will be charged next; returns one page of invoices with amounts in minor currency units. Requires account.billing.read.","operationId":"listInvoices"}}},"/accounts/{account_id}/payments":{"get":{"operationId":"listPayments","tags":["billing-usage/Billing/Invoices and payments"],"summary":"List payments","description":"List the payments an account has made, with their receipt links; returns one page of payments with amounts in minor currency units. Requires account.billing.read.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"},{"schema":{"type":"string","enum":["date","amount"],"default":"date","description":"Sort field of the returned page. Defaults to \"date\". Pages follow Stripe order, newest first; sorting orders the returned page only."},"required":false,"description":"Sort field of the returned page. Defaults to \"date\". Pages follow Stripe order, newest first; sorting orders the returned page only.","name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort order of the returned page. Defaults to \"desc\"."},"required":false,"description":"Sort order of the returned page. Defaults to \"desc\".","name":"sort_order","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum number of payments to return, 1 to 100. Defaults to 20."},"required":false,"description":"Maximum number of payments to return, 1 to 100. Defaults to 20.","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Opaque cursor pointing at the next page. Omit it to read the first page."},"required":false,"description":"Opaque cursor pointing at the next page. Omit it to read the first page.","name":"cursor","in":"query"}],"responses":{"200":{"description":"One page of payments of the account, with receipt links.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":["string","null"]},"paid":{"type":"boolean"},"amount":{"type":"number"},"currency":{"type":"string"},"created_at":{"type":"string"},"description":{"type":["string","null"]},"receipt_url":{"type":["string","null"],"format":"uri"},"invoice_id":{"type":["string","null"]},"payment_intent_id":{"type":["string","null"]}},"required":["id","status","paid","amount","currency","created_at","description","receipt_url","invoice_id","payment_intent_id"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account billing","x-canonical-documentation":{"domain":"billing-usage","resource":"Billing","subgroup":"Invoices and payments","name":"List payments","description":"List the payments an account has made, with their receipt links; returns one page of payments with amounts in minor currency units. Requires account.billing.read.","operationId":"listPayments"}}},"/accounts/{account_id}/payment-methods":{"get":{"operationId":"listPaymentMethods","tags":["billing-usage/Billing/Invoices and payments"],"summary":"List payment methods","description":"List the cards saved for an account and which one is the default; returns one page of payment methods, which are changed in the billing portal. Requires account.billing.read.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":100,"description":"Maximum number of payment methods to return, 1 to 100. Defaults to 100."},"required":false,"description":"Maximum number of payment methods to return, 1 to 100. Defaults to 100.","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Opaque cursor pointing at the next page. Omit it to read the first page."},"required":false,"description":"Opaque cursor pointing at the next page. Omit it to read the first page.","name":"cursor","in":"query"}],"responses":{"200":{"description":"One page of card payment methods of the account.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"brand":{"type":["string","null"]},"last4":{"type":["string","null"]},"exp_month":{"type":["number","null"]},"exp_year":{"type":["number","null"]},"is_default":{"type":"boolean"}},"required":["id","brand","last4","exp_month","exp_year","is_default"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account billing","x-canonical-documentation":{"domain":"billing-usage","resource":"Billing","subgroup":"Invoices and payments","name":"List payment methods","description":"List the cards saved for an account and which one is the default; returns one page of payment methods, which are changed in the billing portal. Requires account.billing.read.","operationId":"listPaymentMethods"}}},"/accounts/{account_id}/credits/balance":{"get":{"operationId":"getCreditBalance","tags":["billing-usage/Credits/Credits"],"summary":"Get credit balance","description":"Read how many credits an account has left in its monthly and purchased pools, with its monthly allocation and top-up price; returns the balance. Requires account.billing.read.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"}],"responses":{"200":{"description":"Account credit balance","content":{"application/json":{"schema":{"type":"object","properties":{"credit_price_eur":{"type":"number","minimum":0,"description":"EUR top-up price per credit for the effective subscription tier; not a per-usage charge or package price","example":0.15},"tier":{"type":"number","description":"Credits remaining in the monthly tier pool","example":50},"purchased":{"type":"number","description":"Credits remaining in the purchased pool","example":100},"total":{"type":"number","description":"Total credits remaining across all pools","example":150},"tier_limit":{"type":"number","description":"Monthly credit allocation for the effective account tier","example":50},"account_id":{"type":"string","format":"uuid"}},"required":["credit_price_eur","tier","purchased","total","tier_limit","account_id"],"description":"Credit balance of the authenticated user by pool, with the effective tier top-up rate in EUR. Reading it grants an eligible missing monthly allocation first."}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account billing","x-canonical-documentation":{"domain":"billing-usage","resource":"Credits","subgroup":"Credits","name":"Get credit balance","description":"Read how many credits an account has left in its monthly and purchased pools, with its monthly allocation and top-up price; returns the balance. Requires account.billing.read.","operationId":"getCreditBalance"}}},"/accounts/{account_id}/credits/transactions":{"get":{"operationId":"listCreditTransactions","tags":["billing-usage/Credits/Credits"],"summary":"List credit transactions","description":"List the credit grants, purchases, refunds and charges of an account, newest first unless sorted otherwise; returns one page of credit transactions. Requires account.billing.read.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Maximum number of transactions to return. Default 50.","example":50},"required":false,"description":"Maximum number of transactions to return. Default 50.","name":"limit","in":"query"},{"schema":{"type":"string","description":"Opaque transaction cursor returned in page_info.next"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","enum":["ai_usage","run_runtime","sandbox_runtime","credit_purchase","coupon_redemption","tier_grant","refund","other_usage"],"description":"Normalized activity category. Filtering applies before cursor pagination.","example":"ai_usage"},"required":false,"name":"activity_type","in":"query"},{"schema":{"type":"string","enum":["date","amount","activity"],"default":"date","description":"Sort field. Defaults to \"date\"."},"required":false,"name":"sort_by","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort order. Defaults to \"desc\"."},"required":false,"name":"sort_order","in":"query"}],"responses":{"200":{"description":"Credit transaction page","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Credit transaction ID"},"user_id":{"type":"string","description":"Captured financial actor UUID; account ownership is separate"},"type":{"type":"string","enum":["tier_grant","purchase","spend","refund"],"description":"Credit transaction type"},"pool":{"type":"string","enum":["tier","purchased"],"description":"Credit pool affected by this transaction"},"amount":{"type":"number","description":"Credit delta for the transaction"},"description":{"type":["string","null"],"description":"Human-readable transaction description"},"metadata":{"type":["object","null"],"additionalProperties":{},"description":"Structured transaction metadata such as sandbox lifecycle billing context"},"activity_type":{"type":"string","enum":["ai_usage","run_runtime","sandbox_runtime","credit_purchase","coupon_redemption","tier_grant","refund","other_usage"],"description":"Normalized activity category for usage filtering"},"project_id":{"type":["string","null"],"description":"Project ID associated with the transaction"},"project_name":{"type":["string","null"],"description":"Project name associated with the transaction"},"project_slug":{"type":["string","null"],"description":"Project slug associated with the transaction"},"created_at":{"type":"string","description":"ISO timestamp when the transaction was created"}},"required":["id","user_id","type","pool","amount","description","metadata","activity_type","created_at"]}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account billing","x-canonical-documentation":{"domain":"billing-usage","resource":"Credits","subgroup":"Credits","name":"List credit transactions","description":"List the credit grants, purchases, refunds and charges of an account, newest first unless sorted otherwise; returns one page of credit transactions. Requires account.billing.read.","operationId":"listCreditTransactions"}}},"/accounts/{account_id}/credits/packages":{"get":{"operationId":"listCreditPackages","tags":["billing-usage/Credits/Credits"],"summary":"List credit packages","description":"List the credit packages an account can buy and their prices before starting a credit checkout; returns the whole catalogue as one page. Requires account.billing.read.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"}],"responses":{"200":{"description":"Available credit packages","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Credit package ID","example":"small"},"credits":{"type":"number","description":"Number of credits included in the package","example":100},"price_eur":{"type":"number","description":"Package price in EUR","example":5},"available":{"type":"boolean","description":"Whether this package is currently purchasable"}},"required":["id","credits","price_eur","available"]},"description":"Credit top-up packages available to the authenticated user. Empty under external billing."},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account billing","x-canonical-documentation":{"domain":"billing-usage","resource":"Credits","subgroup":"Credits","name":"List credit packages","description":"List the credit packages an account can buy and their prices before starting a credit checkout; returns the whole catalogue as one page. Requires account.billing.read.","operationId":"listCreditPackages"}}},"/accounts/{account_id}/credits/checkouts":{"post":{"operationId":"createCreditCheckout","tags":["billing-usage/Credits/Credits"],"summary":"Create credit checkout","description":"Start a Stripe checkout to buy a credit package for an account, or for the account that owns a project; returns the checkout URL. Requires account.billing.manage.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"package_id":{"type":"string","enum":["small","medium","large","xl"]},"project_reference":{"type":"string","minLength":1,"description":"Project UUID or slug for an owner-pays top-up: the project owner’s wallet and effective price apply. Naming a project also requires project.read on it."},"success_url":{"type":"string","format":"uri"},"cancel_url":{"type":"string","format":"uri"}},"required":["package_id"]}}}},"responses":{"200":{"description":"Stripe checkout session for the credit package.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["checkout_created"],"description":"Checkout creation status"},"checkout_url":{"type":"string","format":"uri","description":"Stripe checkout URL for the credit purchase"}},"required":["status","checkout_url"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account billing","x-canonical-documentation":{"domain":"billing-usage","resource":"Credits","subgroup":"Credits","name":"Create credit checkout","description":"Start a Stripe checkout to buy a credit package for an account, or for the account that owns a project; returns the checkout URL. Requires account.billing.manage.","operationId":"createCreditCheckout"}}},"/accounts/{account_id}/credits/coupons/redeem":{"post":{"operationId":"redeemCreditCoupon","tags":["billing-usage/Credits/Credits"],"summary":"Redeem credit coupon","description":"Redeem a coupon code for credits on an account; returns the credits granted and the new balance, or already_redeemed for a code the account used before. Requires account.billing.manage.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":100,"description":"Stripe promotion code to redeem for Veryfront credits","example":"FREE100"}},"required":["code"]}}}},"responses":{"200":{"description":"Coupon redemption result","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["redeemed","already_redeemed"],"description":"Coupon redemption result. A replay of a redeemed code returns `already_redeemed`."},"credits_granted":{"type":"integer","minimum":0,"description":"Credits granted by this request","example":100},"balance":{"type":"object","properties":{"tier":{"type":"number","description":"Credits remaining in the monthly tier pool","example":50},"purchased":{"type":"number","description":"Credits remaining in the purchased pool","example":100},"total":{"type":"number","description":"Total credits remaining across all pools","example":150}},"required":["tier","purchased","total"],"description":"Updated credit balance"},"transaction_id":{"type":["string","null"],"description":"Credit transaction associated with the redemption"}},"required":["status","credits_granted","balance","transaction_id"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Payment required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account billing","x-canonical-documentation":{"domain":"billing-usage","resource":"Credits","subgroup":"Credits","name":"Redeem credit coupon","description":"Redeem a coupon code for credits on an account; returns the credits granted and the new balance, or already_redeemed for a code the account used before. Requires account.billing.manage.","operationId":"redeemCreditCoupon"}}},"/feature-gates/{gate}":{"get":{"operationId":"checkFeatureGate","tags":["billing-usage/Feature gates/Feature gates"],"summary":"Check feature gate","description":"Check whether a plan allows a feature before offering it, for the caller or for the owner of a project; returns allowed with the required tier, limit and current count, and a denied gate is a result, not an error.","parameters":[{"schema":{"type":"string","enum":["custom_domains","dedicated_runtime","dedicated_gateway","sso","dedicated_control_plane","dedicated_database","byoc","collaborators","projects","sla"]},"required":true,"name":"gate","in":"path"},{"schema":{"type":["integer","null"],"minimum":0,"description":"Current resource count for count-based gates."},"required":false,"description":"Current resource count for count-based gates.","name":"current_count","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Optional project ID or slug. When supplied for a gate other than projects, checks the project owner and requires project.read. The projects gate always checks the caller."},"required":false,"description":"Optional project ID or slug. When supplied for a gate other than projects, checks the project owner and requires project.read. The projects gate always checks the caller.","name":"project_reference","in":"query"}],"responses":{"200":{"description":"Feature gate check result. A denied gate answers allowed false.","content":{"application/json":{"schema":{"type":"object","properties":{"gate":{"type":"string","enum":["custom_domains","dedicated_runtime","dedicated_gateway","sso","dedicated_control_plane","dedicated_database","byoc","collaborators","projects","sla"],"description":"The gate that was checked"},"allowed":{"type":"boolean","description":"Whether the plan allows the gate"},"required_tier":{"type":["string","null"],"description":"Tier required when access is denied. Null when allowed."},"limit":{"type":["number","null"],"description":"Numeric limit of a count-based gate. Null for other gates."},"current_count":{"type":["number","null"],"description":"The current_count the check was given, for a gate checked against a limit. Null otherwise."}},"required":["gate","allowed","required_tier","limit","current_count"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Feature gates","x-canonical-documentation":{"domain":"billing-usage","resource":"Feature gates","subgroup":"Feature gates","name":"Check feature gate","description":"Check whether a plan allows a feature before offering it, for the caller or for the owner of a project; returns allowed with the required tier, limit and current count, and a denied gate is a result, not an error.","operationId":"checkFeatureGate"}}},"/budgets":{"get":{"operationId":"listBudgets","tags":["billing-usage/Budgets/Budgets"],"summary":"List budgets","description":"List the budgets the caller may manage with their usage this month, for one project or narrowed to a member or API key.","parameters":[{"schema":{"type":"string","minLength":1,"description":"Lists the budgets of one project: its own, its members’, and the keys bound to it. Requires owner or admin on that project. Omitted, the listing covers every budget the caller may manage."},"required":false,"description":"Lists the budgets of one project: its own, its members’, and the keys bound to it. Requires owner or admin on that project. Omitted, the listing covers every budget the caller may manage.","name":"project_reference","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Narrows the listing to the budgets scoped to one person."},"required":false,"description":"Narrows the listing to the budgets scoped to one person.","name":"user_id","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Narrows the listing to the budgets scoped to one API key."},"required":false,"description":"Narrows the listing to the budgets scoped to one API key.","name":"api_key_id","in":"query"},{"schema":{"type":"string","description":"Opaque cursor from page_info.next. Omit it to read the first page."},"required":false,"description":"Opaque cursor from page_info.next. Omit it to read the first page.","name":"cursor","in":"query"},{"$ref":"#/components/parameters/PaginationLimit"}],"responses":{"200":{"description":"Budgets the caller may manage","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Budget"}},"page_info":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","page_info"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Budgets","x-canonical-documentation":{"domain":"billing-usage","resource":"Budgets","subgroup":"Budgets","name":"List budgets","description":"List the budgets the caller may manage with their usage this month, for one project or narrowed to a member or API key.","operationId":"listBudgets"}},"post":{"operationId":"createBudget","tags":["billing-usage/Budgets/Budgets"],"summary":"Create budget","description":"Create a monthly AI spending limit for a project, a member on a project, an API key, or a combination of these.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBudgetInput"}}}},"responses":{"201":{"description":"Budget created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Budget"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"API keys and runtime credentials are refused. A member cap cannot target the caller. A new member cap cannot target the project owner.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Budgets","x-canonical-documentation":{"domain":"billing-usage","resource":"Budgets","subgroup":"Budgets","name":"Create budget","description":"Create a monthly AI spending limit for a project, a member on a project, an API key, or a combination of these.","operationId":"createBudget"}}},"/budgets/{budget_id}":{"get":{"operationId":"getBudget","tags":["billing-usage/Budgets/Budgets"],"summary":"Get budget","description":"Get a budget and its usage for the current month.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Budget ID. A budget you cannot manage is masked as missing and fails with resource-not-found (404)."},"required":true,"description":"Budget ID. A budget you cannot manage is masked as missing and fails with resource-not-found (404).","name":"budget_id","in":"path"}],"responses":{"200":{"description":"The budget and its usage for the current month.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Budget"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Budgets","x-canonical-documentation":{"domain":"billing-usage","resource":"Budgets","subgroup":"Budgets","name":"Get budget","description":"Get a budget and its usage for the current month.","operationId":"getBudget"}},"patch":{"operationId":"updateBudget","tags":["billing-usage/Budgets/Budgets"],"summary":"Update budget","description":"Change the monthly limit of a budget, keeping its scope and this month’s usage.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Budget ID. A budget you cannot manage is masked as missing and fails with resource-not-found (404)."},"required":true,"description":"Budget ID. A budget you cannot manage is masked as missing and fails with resource-not-found (404).","name":"budget_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBudgetInput"}}}},"responses":{"200":{"description":"Budget updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Budget"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"API keys and runtime credentials are refused. A member cap cannot target the caller.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Budgets","x-canonical-documentation":{"domain":"billing-usage","resource":"Budgets","subgroup":"Budgets","name":"Update budget","description":"Change the monthly limit of a budget, keeping its scope and this month’s usage.","operationId":"updateBudget"}},"delete":{"operationId":"deleteBudget","tags":["billing-usage/Budgets/Budgets"],"summary":"Delete budget","description":"Delete budget.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Budget ID. A budget you cannot manage is masked as missing and fails with resource-not-found (404)."},"required":true,"description":"Budget ID. A budget you cannot manage is masked as missing and fails with resource-not-found (404).","name":"budget_id","in":"path"}],"responses":{"200":{"description":"Budget removed. Usage history is unchanged; other applicable budgets and the account credit balance continue to limit spending.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"API keys and runtime credentials are refused. A member cap cannot target the caller.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Budgets","x-canonical-documentation":{"domain":"billing-usage","resource":"Budgets","subgroup":"Budgets","name":"Delete budget","description":"Delete budget.","operationId":"deleteBudget"}}},"/api-keys/usage":{"get":{"operationId":"listApiKeysUsage","tags":["billing-usage/Usage/API key usage"],"summary":"List API key usage","description":"List API key usage.","parameters":[{"$ref":"#/components/parameters/UsageQueryPreset"},{"$ref":"#/components/parameters/UsageQueryFrom"},{"$ref":"#/components/parameters/UsageQueryTo"},{"$ref":"#/components/parameters/UsageQueryTimezone"},{"$ref":"#/components/parameters/UsageQueryGranularity"},{"$ref":"#/components/parameters/UsageQueryGroupBy"},{"$ref":"#/components/parameters/UsageQueryCompare"},{"schema":{"type":"string","description":"Optional project UUID or slug. Scopes the listing to that project’s keys."},"required":false,"name":"project_reference","in":"query"}],"responses":{"200":{"description":"AI spending by API key; `kind` separates individual keys from grouped usage, including requests without API key authentication. With `project_reference`: the project’s keys, requests without a key, and usage from deleted key records. Without it: the caller’s own keys and requests without a key; usage of a deleted key record cannot be recovered. Read from the AI usage ledger; `usd` is the customer charge at the credit rate and never provider cost.","content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["user"]},"user_id":{"type":"string","format":"uuid"}},"required":["kind","user_id"]},{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"project_id":{"type":"string","format":"uuid"}},"required":["kind","project_id"]},{"type":"object","properties":{"kind":{"type":"string","enum":["api_key"]},"api_key_id":{"type":"string","format":"uuid"},"project_id":{"type":["string","null"],"format":"uuid"}},"required":["kind","api_key_id","project_id"]}],"description":"Authorized listing scope. User scope means the caller’s readable keys and keyless activity, not billing-account totals."},"timeframe":{"type":"object","properties":{"from":{"type":"string","format":"date-time","description":"Inclusive start."},"to":{"type":"string","format":"date-time","description":"Exclusive end."},"timezone":{"type":"string"},"granularity":{"type":"string","enum":["hour","day","week","month"]},"bucket_count":{"type":"integer","minimum":0},"previous":{"type":"object","properties":{"from":{"type":"string","format":"date-time","description":"Inclusive start."},"to":{"type":"string","format":"date-time","description":"Exclusive end."},"timezone":{"type":"string"},"granularity":{"type":"string","enum":["hour","day","week","month"]},"bucket_count":{"type":"integer","minimum":0}},"required":["from","to","timezone","granularity","bucket_count"]}},"required":["from","to","timezone","granularity","bucket_count"]},"attribution":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether the ledger is recording who caused each call right now."},"recording_since":{"type":["string","null"],"description":"Time when the project first recorded caller attribution, or null if it never has. Recording can pause after this time. Usage recorded without attribution, including during deployment or while attribution is disabled, appears in an `unattributed` row even if a person or API key caused it."}},"required":["enabled","recording_since"],"description":"Whether attribution is complete for the returned usage. Treat it as incomplete if `enabled` is false, `recording_since` is null, or the selected period includes an `unattributed` row."},"summary":{"type":"object","properties":{"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded funding for this spend group; omitted when provenance is unknown."},"credits":{"type":"number","description":"Credits debited in the timeframe."},"usd":{"type":"number","description":"Customer-billed USD for those credits."},"requests":{"type":"number","description":"Number of provider calls recorded."},"input_tokens":{"type":"number","description":"Input tokens."},"output_tokens":{"type":"number","description":"Output tokens."},"cache_read_tokens":{"type":"number","description":"Tokens read from the prompt cache."},"cache_creation_tokens":{"type":"number","description":"Tokens written to the prompt cache."},"previous":{"type":"object","properties":{"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded funding for this spend group; omitted when provenance is unknown."},"credits":{"type":"number","description":"Credits debited in the timeframe."},"usd":{"type":"number","description":"Customer-billed USD for those credits."},"requests":{"type":"number","description":"Number of provider calls recorded."},"input_tokens":{"type":"number","description":"Input tokens."},"output_tokens":{"type":"number","description":"Output tokens."},"cache_read_tokens":{"type":"number","description":"Tokens read from the prompt cache."},"cache_creation_tokens":{"type":"number","description":"Tokens written to the prompt cache."}},"required":["credits","usd","requests","input_tokens","output_tokens","cache_read_tokens","cache_creation_tokens"]}},"required":["credits","usd","requests","input_tokens","output_tokens","cache_read_tokens","cache_creation_tokens"],"description":"Sum of the key and attribution rows below."},"group_by":{"type":"array","items":{"type":"string","enum":["project","model","api_key","member"]}},"series":{"type":"array","items":{"type":"object","properties":{"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded funding for this spend group; omitted when provenance is unknown."},"credits":{"type":"number","description":"Credits debited in the timeframe."},"usd":{"type":"number","description":"Customer-billed USD for those credits."},"requests":{"type":"number","description":"Number of provider calls recorded."},"input_tokens":{"type":"number","description":"Input tokens."},"output_tokens":{"type":"number","description":"Output tokens."},"cache_read_tokens":{"type":"number","description":"Tokens read from the prompt cache."},"cache_creation_tokens":{"type":"number","description":"Tokens written to the prompt cache."},"bucket_start":{"type":"string","format":"date-time"},"groups":{"type":"array","items":{"type":"object","properties":{"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded funding for this spend group; omitted when provenance is unknown."},"credits":{"type":"number","description":"Credits debited in the timeframe."},"usd":{"type":"number","description":"Customer-billed USD for those credits."},"requests":{"type":"number","description":"Number of provider calls recorded."},"input_tokens":{"type":"number","description":"Input tokens."},"output_tokens":{"type":"number","description":"Output tokens."},"cache_read_tokens":{"type":"number","description":"Tokens read from the prompt cache."},"cache_creation_tokens":{"type":"number","description":"Tokens written to the prompt cache."},"dimensions":{"type":"object","properties":{"project_id":{"type":["string","null"],"format":"uuid"},"model":{"type":["string","null"]},"model_provider":{"type":["string","null"]},"api_key_id":{"type":["string","null"],"format":"uuid"},"api_key_kind":{"type":"string","enum":["api_key","no_api_key","other_keys","deleted_keys","unattributed"],"description":"Key-listing reports distinguish named keys, other/deleted keys, keyless and unattributed usage."},"member_id":{"type":["string","null"],"format":"uuid"},"member_kind":{"type":"string","enum":["member","former_member","deleted_users","automations","unattributed"],"description":"Project-member reports distinguish named people, deleted users, automations and unattributed usage."}}}},"required":["credits","usd","requests","input_tokens","output_tokens","cache_read_tokens","cache_creation_tokens","dimensions"]}}},"required":["credits","usd","requests","input_tokens","output_tokens","cache_read_tokens","cache_creation_tokens","bucket_start"]}},"keys":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["api_key","no_api_key","other_keys","deleted_keys","unattributed"],"description":"Usage row type. `api_key` identifies one key. `no_api_key` groups usage without key authentication. `other_keys` groups usage from keys outside the listing, such as account-wide keys or newly created project keys. `deleted_keys` groups usage whose key record was removed when its creator was deleted. `unattributed` groups usage recorded without caller attribution and does not imply that no key caused it. Grouped rows have `api_key_id: null`; use this field to distinguish them."},"api_key_id":{"type":["string","null"],"format":"uuid","description":"Null on every bucket row, none of which stands for a single key."},"name":{"type":"string"},"key_prefix":{"type":["string","null"]},"project_id":{"type":["string","null"],"format":"uuid"},"revoked":{"type":"boolean"},"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded funding for this spend group; omitted when provenance is unknown."},"credits":{"type":"number","description":"Credits debited in the timeframe."},"usd":{"type":"number","description":"Customer-billed USD for those credits."},"requests":{"type":"number","description":"Number of provider calls recorded."},"input_tokens":{"type":"number","description":"Input tokens."},"output_tokens":{"type":"number","description":"Output tokens."},"cache_read_tokens":{"type":"number","description":"Tokens read from the prompt cache."},"cache_creation_tokens":{"type":"number","description":"Tokens written to the prompt cache."}},"required":["kind","api_key_id","name","key_prefix","project_id","revoked","credits","usd","requests","input_tokens","output_tokens","cache_read_tokens","cache_creation_tokens"]}}},"required":["scope","timeframe","attribution","summary","series","keys"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"API key usage","x-canonical-documentation":{"domain":"billing-usage","resource":"Usage","subgroup":"API key usage","name":"List API key usage","description":"List API key usage.","operationId":"listApiKeysUsage"}}},"/api-keys/{id}/limits":{"get":{"operationId":"getApiKeyInferenceLimits","tags":["billing-usage/Usage/API key usage"],"summary":"Get API key inference limits","description":"Get API key limits. Requires project.api_keys.read.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Model and request-rate limits of a project-bound API key. `effective_allowed_models` accounts for the project inference policy. Unconfigured limits return `configured: false` with null limits. The gateway applies stored limits only when `enforced` is true. Requires `project.api_keys.read` on the key’s project; account-wide keys answer 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyInferenceLimits"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"API key usage","x-canonical-documentation":{"domain":"billing-usage","resource":"Usage","subgroup":"API key usage","name":"Get API key inference limits","description":"Get API key limits. Requires project.api_keys.read.","operationId":"getApiKeyInferenceLimits"}},"put":{"operationId":"replaceApiKeyInferenceLimits","tags":["billing-usage/Usage/API key usage"],"summary":"Replace API key inference limits","description":"Replace API key limits. Requires project.api_keys.manage.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceApiKeyInferenceLimitsRequest"}}}},"responses":{"200":{"description":"The key’s limits as they now stand. All limits are replaced; omitted limits are removed. `allowed_models` stores canonical catalog IDs; models the project policy excludes are stored but left out of `effective_allowed_models` and rejected at request time, so key limits cannot broaden the policy. The gateway applies stored limits only when `enforced` is true. Requires a signed-in administrator or owner with `project.api_keys.manage`; API keys, service accounts, and agent runs are rejected. The change is audited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyInferenceLimits"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"API key usage","x-canonical-documentation":{"domain":"billing-usage","resource":"Usage","subgroup":"API key usage","name":"Replace API key inference limits","description":"Replace API key limits. Requires project.api_keys.manage.","operationId":"replaceApiKeyInferenceLimits"}},"delete":{"operationId":"clearApiKeyInferenceLimits","tags":["billing-usage/Usage/API key usage"],"summary":"Clear API key inference limits","description":"Clear API key limits. Requires project.api_keys.manage.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The key carries no inference limits; project policy and budgets still apply. Succeeds without a change if the key had none. Requires a signed-in user with `project.api_keys.manage`; the removal is audited with the caller’s identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"API key usage","x-canonical-documentation":{"domain":"billing-usage","resource":"Usage","subgroup":"API key usage","name":"Clear API key inference limits","description":"Clear API key limits. Requires project.api_keys.manage.","operationId":"clearApiKeyInferenceLimits"}}},"/api-keys/{id}/usage":{"get":{"operationId":"getApiKeyUsage","tags":["billing-usage/Usage/API key usage"],"summary":"Get API key usage","description":"Read customer spend, calls and tokens for an API key.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"$ref":"#/components/parameters/UsageQueryPreset"},{"$ref":"#/components/parameters/UsageQueryFrom"},{"$ref":"#/components/parameters/UsageQueryTo"},{"$ref":"#/components/parameters/UsageQueryTimezone"},{"$ref":"#/components/parameters/UsageQueryGranularity"},{"$ref":"#/components/parameters/UsageQueryGroupBy"},{"$ref":"#/components/parameters/UsageQueryCompare"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Narrow usage to one accessible project by UUID or slug. Required for member grouping."},"required":false,"description":"Narrow usage to one accessible project by UUID or slug. Required for member grouping.","name":"project_reference","in":"query"}],"responses":{"200":{"description":"Customer AI spending for one API key: totals, bucketed usage, model and deployment breakdowns, and requested groups/comparison. `serving` names recorded host/tier facts; null means no deployment was recorded. `usd` is the customer charge at the credit rate, excluding provider cost. All cuts use one read snapshot.","content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"object","properties":{"kind":{"type":"string","enum":["api_key"]},"api_key_id":{"type":"string","format":"uuid"},"project_id":{"type":["string","null"],"format":"uuid"}},"required":["kind","api_key_id","project_id"],"description":"Reporting scope, echoed for custom or project-filtered queries. A null project_id means no project filter."},"attribution":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether the ledger is recording who caused each call right now."},"recording_since":{"type":["string","null"],"description":"Time when the project first recorded caller attribution, or null if it never has. Recording can pause after this time. Usage recorded without attribution, including during deployment or while attribution is disabled, appears in an `unattributed` row even if a person or API key caused it."}},"required":["enabled","recording_since"],"description":"Whether attribution is complete for the returned usage. Treat it as incomplete if `enabled` is false, `recording_since` is null, or the selected period includes an `unattributed` row."},"api_key":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"key_prefix":{"type":"string"},"project_id":{"type":["string","null"],"format":"uuid"},"revoked":{"type":"boolean"}},"required":["id","name","key_prefix","project_id","revoked"]},"timeframe":{"type":"object","properties":{"from":{"type":"string","format":"date-time","description":"Inclusive start."},"to":{"type":"string","format":"date-time","description":"Exclusive end."},"timezone":{"type":"string"},"granularity":{"type":"string","enum":["hour","day","week","month"]},"bucket_count":{"type":"integer","minimum":0},"previous":{"type":"object","properties":{"from":{"type":"string","format":"date-time","description":"Inclusive start."},"to":{"type":"string","format":"date-time","description":"Exclusive end."},"timezone":{"type":"string"},"granularity":{"type":"string","enum":["hour","day","week","month"]},"bucket_count":{"type":"integer","minimum":0}},"required":["from","to","timezone","granularity","bucket_count"]}},"required":["from","to","timezone","granularity","bucket_count"]},"summary":{"type":"object","properties":{"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded funding for this spend group; omitted when provenance is unknown."},"credits":{"type":"number","description":"Credits debited in the timeframe."},"usd":{"type":"number","description":"Customer-billed USD for those credits."},"requests":{"type":"number","description":"Number of provider calls recorded."},"input_tokens":{"type":"number","description":"Input tokens."},"output_tokens":{"type":"number","description":"Output tokens."},"cache_read_tokens":{"type":"number","description":"Tokens read from the prompt cache."},"cache_creation_tokens":{"type":"number","description":"Tokens written to the prompt cache."},"previous":{"type":"object","properties":{"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded funding for this spend group; omitted when provenance is unknown."},"credits":{"type":"number","description":"Credits debited in the timeframe."},"usd":{"type":"number","description":"Customer-billed USD for those credits."},"requests":{"type":"number","description":"Number of provider calls recorded."},"input_tokens":{"type":"number","description":"Input tokens."},"output_tokens":{"type":"number","description":"Output tokens."},"cache_read_tokens":{"type":"number","description":"Tokens read from the prompt cache."},"cache_creation_tokens":{"type":"number","description":"Tokens written to the prompt cache."}},"required":["credits","usd","requests","input_tokens","output_tokens","cache_read_tokens","cache_creation_tokens"]}},"required":["credits","usd","requests","input_tokens","output_tokens","cache_read_tokens","cache_creation_tokens"]},"group_by":{"type":"array","items":{"type":"string","enum":["project","model","api_key","member"]}},"series":{"type":"array","items":{"type":"object","properties":{"bucket_start":{"type":"string","format":"date-time","description":"UTC timestamp of the bucket boundary. Records are clipped to the exact requested window."},"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded funding for this spend group; omitted when provenance is unknown."},"credits":{"type":"number","description":"Credits debited in the timeframe."},"usd":{"type":"number","description":"Customer-billed USD for those credits."},"requests":{"type":"number","description":"Number of provider calls recorded."},"input_tokens":{"type":"number","description":"Input tokens."},"output_tokens":{"type":"number","description":"Output tokens."},"cache_read_tokens":{"type":"number","description":"Tokens read from the prompt cache."},"cache_creation_tokens":{"type":"number","description":"Tokens written to the prompt cache."},"groups":{"type":"array","items":{"type":"object","properties":{"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded funding for this spend group; omitted when provenance is unknown."},"credits":{"type":"number","description":"Credits debited in the timeframe."},"usd":{"type":"number","description":"Customer-billed USD for those credits."},"requests":{"type":"number","description":"Number of provider calls recorded."},"input_tokens":{"type":"number","description":"Input tokens."},"output_tokens":{"type":"number","description":"Output tokens."},"cache_read_tokens":{"type":"number","description":"Tokens read from the prompt cache."},"cache_creation_tokens":{"type":"number","description":"Tokens written to the prompt cache."},"dimensions":{"type":"object","properties":{"project_id":{"type":["string","null"],"format":"uuid"},"model":{"type":["string","null"]},"model_provider":{"type":["string","null"]},"api_key_id":{"type":["string","null"],"format":"uuid"},"api_key_kind":{"type":"string","enum":["api_key","no_api_key","other_keys","deleted_keys","unattributed"],"description":"Key-listing reports distinguish named keys, other/deleted keys, keyless and unattributed usage."},"member_id":{"type":["string","null"],"format":"uuid"},"member_kind":{"type":"string","enum":["member","former_member","deleted_users","automations","unattributed"],"description":"Project-member reports distinguish named people, deleted users, automations and unattributed usage."}}}},"required":["credits","usd","requests","input_tokens","output_tokens","cache_read_tokens","cache_creation_tokens","dimensions"]}}},"required":["bucket_start","credits","usd","requests","input_tokens","output_tokens","cache_read_tokens","cache_creation_tokens"]}},"models":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string"},"canonical_model_id":{"type":["string","null"]},"provider":{"type":"string","description":"Legacy recorded provider label. The model_provider dimension in groups identifies the canonical model vendor."},"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded funding for this spend group; omitted when provenance is unknown."},"credits":{"type":"number","description":"Credits debited in the timeframe."},"usd":{"type":"number","description":"Customer-billed USD for those credits."},"requests":{"type":"number","description":"Number of provider calls recorded."},"input_tokens":{"type":"number","description":"Input tokens."},"output_tokens":{"type":"number","description":"Output tokens."},"cache_read_tokens":{"type":"number","description":"Tokens read from the prompt cache."},"cache_creation_tokens":{"type":"number","description":"Tokens written to the prompt cache."}},"required":["model","canonical_model_id","provider","credits","usd","requests","input_tokens","output_tokens","cache_read_tokens","cache_creation_tokens"]}},"serving":{"type":"array","items":{"type":"object","properties":{"host":{"type":["string","null"],"description":"Catalog ID of the deployment host, not a provider hostname or URL. Null means no deployment was recorded, including older usage, calls without a catalog deployment, and aggregated channel usage. Null does not indicate where inference ran."},"tier":{"type":["string","null"],"description":"Sovereignty tier as a catalog ID. Clients must accept unknown values as tiers can be added. Null means no tier was recorded and does not indicate where inference ran. The API does not infer a tier from billing or other fields.","example":"eu-resident"},"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded funding for this spend group; omitted when provenance is unknown."},"credits":{"type":"number","description":"Credits debited in the timeframe."},"usd":{"type":"number","description":"Customer-billed USD for those credits."},"requests":{"type":"number","description":"Number of provider calls recorded."},"input_tokens":{"type":"number","description":"Input tokens."},"output_tokens":{"type":"number","description":"Output tokens."},"cache_read_tokens":{"type":"number","description":"Tokens read from the prompt cache."},"cache_creation_tokens":{"type":"number","description":"Tokens written to the prompt cache."}},"required":["host","tier","credits","usd","requests","input_tokens","output_tokens","cache_read_tokens","cache_creation_tokens"]},"description":"The same spend cut by the deployment that served it. Ordered by spend descending, then by request count descending, then by host, then by tier; the row whose `host` and `tier` are both null is always last, because it is the absence of a record rather than a deployment. Additive: it neither replaces nor re-slices any other field."}},"required":["attribution","api_key","timeframe","summary","series","models","serving"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"API key usage","x-canonical-documentation":{"domain":"billing-usage","resource":"Usage","subgroup":"API key usage","name":"Get API key usage","description":"Read customer spend, calls and tokens for an API key.","operationId":"getApiKeyUsage"}}},"/accounts/{account_id}/usage":{"get":{"operationId":"getUsage","tags":["billing-usage/Usage/Usage"],"summary":"Get usage","description":"Read what an account has used of each plan quota in the current billing period, with its tier, project count, credits spent and warnings; returns usage where a total of -1 means unlimited. Requires account.billing.read.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"}],"responses":{"200":{"description":"Account usage against the plan quotas; a total of -1 means unlimited.","content":{"application/json":{"schema":{"type":"object","properties":{"account_id":{"type":"string","format":"uuid"},"project_count":{"type":"integer","minimum":0},"credits_spent":{"type":"number"},"storage":{"type":"object","properties":{"used":{"type":"number","description":"Current usage amount."},"total":{"type":"number","description":"Maximum allowed total. A value of -1 means unlimited."},"remaining":{"type":"number","description":"Remaining amount available."},"percent_used":{"type":"number","description":"Percentage of quota used from 0 to 100."}},"required":["used","total","remaining","percent_used"]},"bandwidth":{"type":"object","properties":{"used":{"type":"number","description":"Current usage amount."},"total":{"type":"number","description":"Maximum allowed total. A value of -1 means unlimited."},"remaining":{"type":"number","description":"Remaining amount available."},"percent_used":{"type":"number","description":"Percentage of quota used from 0 to 100."}},"required":["used","total","remaining","percent_used"]},"api_calls":{"type":"object","properties":{"used":{"type":"number","description":"Current usage amount."},"total":{"type":"number","description":"Maximum allowed total. A value of -1 means unlimited."},"remaining":{"type":"number","description":"Remaining amount available."},"percent_used":{"type":"number","description":"Percentage of quota used from 0 to 100."}},"required":["used","total","remaining","percent_used"]},"custom_domains":{"type":"object","properties":{"used":{"type":"number","description":"Current usage amount."},"total":{"type":"number","description":"Maximum allowed total. A value of -1 means unlimited."},"remaining":{"type":"number","description":"Remaining amount available."},"percent_used":{"type":"number","description":"Percentage of quota used from 0 to 100."}},"required":["used","total","remaining","percent_used"]},"code_exports":{"type":"object","properties":{"used":{"type":"number","description":"Current usage amount."},"total":{"type":"number","description":"Maximum allowed total. A value of -1 means unlimited."},"remaining":{"type":"number","description":"Remaining amount available."},"percent_used":{"type":"number","description":"Percentage of quota used from 0 to 100."}},"required":["used","total","remaining","percent_used"]},"veryfront_badge":{"type":"object","properties":{"used":{"type":"number","description":"Current usage amount."},"total":{"type":"number","description":"Maximum allowed total. A value of -1 means unlimited."},"remaining":{"type":"number","description":"Remaining amount available."},"percent_used":{"type":"number","description":"Percentage of quota used from 0 to 100."}},"required":["used","total","remaining","percent_used"]},"period_start":{"type":"string","description":"ISO timestamp for the start of the current billing period."},"period_end":{"type":"string","description":"ISO timestamp for the end of the current billing period."},"tier":{"type":"string","description":"Name of the subscription tier the quotas come from."},"warnings":{"type":"array","items":{"type":"string"},"description":"Human-readable warnings for buckets approaching or over their limit. Empty when there are none."}},"required":["account_id","project_count","credits_spent"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account billing","x-canonical-documentation":{"domain":"billing-usage","resource":"Usage","subgroup":"Usage","name":"Get usage","description":"Read what an account has used of each plan quota in the current billing period, with its tier, project count, credits spent and warnings; returns usage where a total of -1 means unlimited. Requires account.billing.read.","operationId":"getUsage"}}},"/accounts/{account_id}/usage/series":{"get":{"operationId":"getUsageSeries","tags":["billing-usage/Usage/Usage"],"summary":"Get usage series","description":"Chart one usage metric of an account by day, optionally for one project; returns the daily series with a total and a per-project breakdown. Requires account.billing.read.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"},{"$ref":"#/components/parameters/UsageQueryPreset"},{"$ref":"#/components/parameters/UsageQueryFrom"},{"$ref":"#/components/parameters/UsageQueryTo"},{"$ref":"#/components/parameters/UsageQueryTimezone"},{"$ref":"#/components/parameters/UsageQueryGranularity"},{"$ref":"#/components/parameters/UsageQueryGroupBy"},{"$ref":"#/components/parameters/UsageQueryCompare"},{"schema":{"type":"string","enum":["credits","storage","bandwidth","api_calls"],"description":"Usage metric represented by this series."},"required":true,"description":"Usage metric to chart.","name":"metric","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Project ID or slug that narrows the read to one project of the account. A project of another account is not found."},"required":false,"description":"Project ID or slug that narrows the read to one project of the account. A project of another account is not found.","name":"project_reference","in":"query"}],"responses":{"200":{"description":"Daily series of one usage metric of the account, optionally for one project.","content":{"application/json":{"schema":{"type":"object","properties":{"metric":{"type":"string","enum":["credits","storage","bandwidth","api_calls"],"description":"Usage metric represented by this series."},"label":{"type":"string","description":"Human-readable metric label."},"unit":{"type":"string","description":"Unit used by values, such as credits, calls, or bytes."},"summary":{"type":"object","properties":{"value":{"type":"number"},"previous":{"type":"object","properties":{"value":{"type":"number"}},"required":["value"]}},"required":["value"]},"timeframe":{"type":"object","properties":{"from":{"type":"string","format":"date-time","description":"Inclusive start."},"to":{"type":"string","format":"date-time","description":"Exclusive end."},"timezone":{"type":"string"},"granularity":{"type":"string","enum":["hour","day","week","month"]},"bucket_count":{"type":"integer","minimum":0},"previous":{"type":"object","properties":{"from":{"type":"string","format":"date-time","description":"Inclusive start."},"to":{"type":"string","format":"date-time","description":"Exclusive end."},"timezone":{"type":"string"},"granularity":{"type":"string","enum":["hour","day","week","month"]},"bucket_count":{"type":"integer","minimum":0}},"required":["from","to","timezone","granularity","bucket_count"]}},"required":["from","to","timezone","granularity","bucket_count"]},"series":{"type":"array","items":{"type":"object","properties":{"bucket_start":{"type":"string","description":"Bucket start timestamp."},"value":{"type":"number","description":"Usage value in the bucket."},"projects":{"type":"array","items":{"type":"object","properties":{"project_id":{"type":["string","null"],"format":"uuid","description":"Project ID, or null for unscoped usage."},"project_name":{"type":"string","description":"Project display name."},"project_slug":{"type":["string","null"],"description":"Project slug, or null when unavailable."},"value":{"type":"number","description":"Usage value for this project."}},"required":["project_id","project_name","project_slug","value"]}},"groups":{"type":"array","items":{"type":"object","properties":{"dimensions":{"type":"object","properties":{"project_id":{"type":["string","null"],"format":"uuid"},"model":{"type":["string","null"]},"model_provider":{"type":["string","null"]},"api_key_id":{"type":["string","null"],"format":"uuid"},"api_key_kind":{"type":"string","enum":["api_key","no_api_key","other_keys","deleted_keys","unattributed"],"description":"Key-listing reports distinguish named keys, other/deleted keys, keyless and unattributed usage."},"member_id":{"type":["string","null"],"format":"uuid"},"member_kind":{"type":"string","enum":["member","former_member","deleted_users","automations","unattributed"],"description":"Project-member reports distinguish named people, deleted users, automations and unattributed usage."}}},"value":{"type":"number"}},"required":["dimensions","value"]}}},"required":["bucket_start","value","projects"]}},"projects":{"type":"array","items":{"type":"object","properties":{"project_id":{"type":["string","null"],"format":"uuid","description":"Project ID, or null for unscoped usage."},"project_name":{"type":"string","description":"Project display name."},"project_slug":{"type":["string","null"],"description":"Project slug, or null when unavailable."},"value":{"type":"number","description":"Usage value for this project."}},"required":["project_id","project_name","project_slug","value"]}},"scope":{"type":"object","properties":{"kind":{"type":"string","enum":["account"]},"account_id":{"type":"string","format":"uuid"},"project_id":{"type":["string","null"],"format":"uuid"}},"required":["kind","account_id","project_id"]},"group_by":{"type":"array","items":{"type":"string","enum":["project","model","api_key","member"]}}},"required":["metric","label","unit","summary","timeframe","series","projects"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account billing","x-canonical-documentation":{"domain":"billing-usage","resource":"Usage","subgroup":"Usage","name":"Get usage series","description":"Chart one usage metric of an account by day, optionally for one project; returns the daily series with a total and a per-project breakdown. Requires account.billing.read.","operationId":"getUsageSeries"}}},"/accounts/{account_id}/usage/credits":{"get":{"operationId":"getCreditUsage","tags":["billing-usage/Usage/Usage"],"summary":"Get credit usage","description":"Break the credit spend of an account down by day, project and model, optionally for one project; returns the series with token counts per model. Requires account.billing.read.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"},{"$ref":"#/components/parameters/UsageQueryPreset"},{"$ref":"#/components/parameters/UsageQueryFrom"},{"$ref":"#/components/parameters/UsageQueryTo"},{"$ref":"#/components/parameters/UsageQueryTimezone"},{"$ref":"#/components/parameters/UsageQueryGranularity"},{"$ref":"#/components/parameters/UsageQueryGroupBy"},{"$ref":"#/components/parameters/UsageQueryCompare"},{"schema":{"type":"string","minLength":1,"description":"Project ID or slug that narrows the read to one project of the account. A project of another account is not found."},"required":false,"description":"Project ID or slug that narrows the read to one project of the account. A project of another account is not found.","name":"project_reference","in":"query"}],"responses":{"200":{"description":"Credit usage of the account by day, project and model, optionally for one project.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"object","properties":{"credits_used":{"type":"number","description":"Total credits used."},"requests":{"type":"number","description":"Total AI requests."},"input_tokens":{"type":"number","description":"Total input tokens."},"output_tokens":{"type":"number","description":"Total output tokens."},"cache_creation_input_tokens":{"type":"number","description":"Total cache creation input tokens."},"cache_read_input_tokens":{"type":"number","description":"Total cache read input tokens."},"previous":{"type":"object","properties":{"credits_used":{"type":"number","description":"Total credits used."},"requests":{"type":"number","description":"Total AI requests."},"input_tokens":{"type":"number","description":"Total input tokens."},"output_tokens":{"type":"number","description":"Total output tokens."},"cache_creation_input_tokens":{"type":"number","description":"Total cache creation input tokens."},"cache_read_input_tokens":{"type":"number","description":"Total cache read input tokens."}},"required":["credits_used","requests","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens"]}},"required":["credits_used","requests","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens"]},"timeframe":{"type":"object","properties":{"from":{"type":"string","format":"date-time","description":"Inclusive start."},"to":{"type":"string","format":"date-time","description":"Exclusive end."},"timezone":{"type":"string"},"granularity":{"type":"string","enum":["hour","day","week","month"]},"bucket_count":{"type":"integer","minimum":0},"previous":{"type":"object","properties":{"from":{"type":"string","format":"date-time","description":"Inclusive start."},"to":{"type":"string","format":"date-time","description":"Exclusive end."},"timezone":{"type":"string"},"granularity":{"type":"string","enum":["hour","day","week","month"]},"bucket_count":{"type":"integer","minimum":0}},"required":["from","to","timezone","granularity","bucket_count"]}},"required":["from","to","timezone","granularity","bucket_count"]},"series":{"type":"array","items":{"type":"object","properties":{"bucket_start":{"type":"string","description":"Bucket start timestamp."},"credits_used":{"type":"number","description":"Credits used in the bucket."},"requests":{"type":"number","description":"AI requests in the bucket."},"input_tokens":{"type":"number","description":"Input tokens in the bucket."},"output_tokens":{"type":"number","description":"Output tokens in the bucket."},"cache_creation_input_tokens":{"type":"number","description":"Cache creation input tokens in the bucket."},"cache_read_input_tokens":{"type":"number","description":"Cache read input tokens in the bucket."},"projects":{"type":"array","items":{"type":"object","properties":{"project_id":{"type":["string","null"],"format":"uuid","description":"Project ID, or null for unscoped usage."},"project_name":{"type":"string","description":"Project display name."},"project_slug":{"type":["string","null"],"description":"Project slug, or null when unavailable."},"credits_used":{"type":"number","description":"Credits used by this project."},"requests":{"type":"number","description":"AI requests billed to this project."},"input_tokens":{"type":"number","description":"Input tokens billed to this project."},"output_tokens":{"type":"number","description":"Output tokens billed to this project."},"cache_creation_input_tokens":{"type":"number","description":"Cache creation input tokens billed to this project."},"cache_read_input_tokens":{"type":"number","description":"Cache read input tokens billed to this project."}},"required":["project_id","project_name","project_slug","credits_used","requests","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens"]}},"groups":{"type":"array","items":{"type":"object","properties":{"credits_used":{"type":"number","description":"Total credits used."},"requests":{"type":"number","description":"Total AI requests."},"input_tokens":{"type":"number","description":"Total input tokens."},"output_tokens":{"type":"number","description":"Total output tokens."},"cache_creation_input_tokens":{"type":"number","description":"Total cache creation input tokens."},"cache_read_input_tokens":{"type":"number","description":"Total cache read input tokens."},"dimensions":{"type":"object","properties":{"project_id":{"type":["string","null"],"format":"uuid"},"model":{"type":["string","null"]},"model_provider":{"type":["string","null"]},"api_key_id":{"type":["string","null"],"format":"uuid"},"api_key_kind":{"type":"string","enum":["api_key","no_api_key","other_keys","deleted_keys","unattributed"],"description":"Key-listing reports distinguish named keys, other/deleted keys, keyless and unattributed usage."},"member_id":{"type":["string","null"],"format":"uuid"},"member_kind":{"type":"string","enum":["member","former_member","deleted_users","automations","unattributed"],"description":"Project-member reports distinguish named people, deleted users, automations and unattributed usage."}}}},"required":["credits_used","requests","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens","dimensions"]}}},"required":["bucket_start","credits_used","requests","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens","projects"]}},"projects":{"type":"array","items":{"type":"object","properties":{"project_id":{"type":["string","null"],"format":"uuid","description":"Project ID, or null for unscoped usage."},"project_name":{"type":"string","description":"Project display name."},"project_slug":{"type":["string","null"],"description":"Project slug, or null when unavailable."},"credits_used":{"type":"number","description":"Credits used by this project."},"requests":{"type":"number","description":"AI requests billed to this project."},"input_tokens":{"type":"number","description":"Input tokens billed to this project."},"output_tokens":{"type":"number","description":"Output tokens billed to this project."},"cache_creation_input_tokens":{"type":"number","description":"Cache creation input tokens billed to this project."},"cache_read_input_tokens":{"type":"number","description":"Cache read input tokens billed to this project."}},"required":["project_id","project_name","project_slug","credits_used","requests","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens"]}},"models":{"type":"array","items":{"type":"object","properties":{"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded credential funding; omitted when unknown. Credits always reflect the historical ledger."},"model":{"type":"string","description":"Canonical or normalized AI model identifier."},"canonical_model_id":{"type":"string","description":"Canonical catalog model identifier."},"model_provider":{"type":"string","description":"Model vendor id. Known values: `anthropic`, `openai`, `google`, `mistral`, `moonshotai`, `deepseek`, `qwen`, `zai`, `unknown`. Other vendor ids may appear; clients must accept any string.","example":"anthropic"},"inference_provider":{"type":"string","description":"Inference provider handling the request. Known values: `veryfront-cloud`, `unknown`. Other values may appear; clients must accept any string.","example":"veryfront-cloud"},"credits_used":{"type":"number","description":"Credits used by this model."},"requests":{"type":"number","description":"AI requests billed to this model."},"input_tokens":{"type":"number","description":"Input tokens billed to this model."},"output_tokens":{"type":"number","description":"Output tokens billed to this model."},"cache_creation_input_tokens":{"type":"number","description":"Cache creation input tokens billed to this model."},"cache_read_input_tokens":{"type":"number","description":"Cache read input tokens billed to this model."},"provider_cost_usd":{"type":"number","description":"Model provider cost in USD for this model."},"veryfront_charge_usd":{"type":"number","description":"Veryfront charge in USD for this model."},"cost_attribution":{"type":"string","enum":["estimated"],"description":"Present when historical cost attribution was recovered from persisted credits."}},"required":["model","model_provider","inference_provider","credits_used","requests","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens"]}},"serving":{"type":"array","items":{"type":"object","properties":{"host":{"type":["string","null"],"description":"Catalog ID of the deployment host, not a provider hostname or URL. Null means no deployment was recorded, including older usage, calls without a catalog deployment, and aggregated channel usage. Null does not indicate where inference ran."},"tier":{"type":["string","null"],"description":"Sovereignty tier as a catalog ID. Clients must accept unknown values as tiers can be added. Null means no tier was recorded and does not indicate where inference ran. The API does not infer a tier from billing or other fields.","example":"eu-resident"},"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded funding for this spend group; omitted when provenance is unknown."},"credits":{"type":"number","description":"Credits debited in the timeframe."},"usd":{"type":"number","description":"Customer-billed USD for those credits."},"requests":{"type":"number","description":"Number of provider calls recorded."},"input_tokens":{"type":"number","description":"Input tokens."},"output_tokens":{"type":"number","description":"Output tokens."},"cache_read_tokens":{"type":"number","description":"Tokens read from the prompt cache."},"cache_creation_tokens":{"type":"number","description":"Tokens written to the prompt cache."}},"required":["host","tier","credits","usd","requests","input_tokens","output_tokens","cache_read_tokens","cache_creation_tokens"]},"description":"The same spend cut by the deployment that served it. Ordered by spend descending, then by request count descending, then by host, then by tier; the row whose `host` and `tier` are both null is always last, because it is the absence of a record rather than a deployment. Additive: it neither replaces nor re-slices any other field. Omitted where the serving breakdown is not enabled; `models` is unchanged by it."},"scope":{"type":"object","properties":{"kind":{"type":"string","enum":["account"]},"account_id":{"type":"string","format":"uuid"},"project_id":{"type":["string","null"],"format":"uuid"}},"required":["kind","account_id","project_id"]},"group_by":{"type":"array","items":{"type":"string","enum":["project","model","api_key","member"]}}},"required":["summary","timeframe","series","projects","models"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account billing","x-canonical-documentation":{"domain":"billing-usage","resource":"Usage","subgroup":"Usage","name":"Get credit usage","description":"Break the credit spend of an account down by day, project and model, optionally for one project; returns the series with token counts per model. Requires account.billing.read.","operationId":"getCreditUsage"}}},"/projects/{project_reference}/analytics/ai-usage":{"get":{"operationId":"getProjectAiUsageAnalytics","tags":["billing-usage/Usage/Project usage"],"summary":"Get AI usage analytics","description":"Get AI usage analytics.","parameters":[{"$ref":"#/components/parameters/ProjectReference"},{"$ref":"#/components/parameters/UsageQueryPreset"},{"$ref":"#/components/parameters/UsageQueryFrom"},{"$ref":"#/components/parameters/UsageQueryTo"},{"$ref":"#/components/parameters/UsageQueryTimezone"},{"$ref":"#/components/parameters/UsageQueryGranularity"},{"$ref":"#/components/parameters/UsageQueryGroupBy"},{"$ref":"#/components/parameters/UsageQueryCompare"},{"schema":{"type":"string","format":"uuid","description":"Optional current project member UUID."},"required":false,"name":"member_id","in":"query"}],"responses":{"200":{"description":"Project AI usage and daily customer charges. Owners and administrators read the project or select a member; other members read only their own usage by passing their member ID. API keys are refused. Member reports include calls with recorded actor attribution. Account quotas and provider costs are excluded.","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"object","properties":{"credits_used":{"type":"number","description":"Total credits used."},"requests":{"type":"number","description":"Total AI requests."},"input_tokens":{"type":"number","description":"Total input tokens."},"output_tokens":{"type":"number","description":"Total output tokens."},"cache_creation_input_tokens":{"type":"number","description":"Total cache creation input tokens."},"cache_read_input_tokens":{"type":"number","description":"Total cache read input tokens."},"previous":{"type":"object","properties":{"credits_used":{"type":"number","description":"Total credits used."},"requests":{"type":"number","description":"Total AI requests."},"input_tokens":{"type":"number","description":"Total input tokens."},"output_tokens":{"type":"number","description":"Total output tokens."},"cache_creation_input_tokens":{"type":"number","description":"Total cache creation input tokens."},"cache_read_input_tokens":{"type":"number","description":"Total cache read input tokens."},"usd":{"type":"number"}},"required":["credits_used","requests","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens","usd"]},"usd":{"type":"number"}},"required":["credits_used","requests","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens","usd"]},"timeframe":{"type":"object","properties":{"from":{"type":"string","format":"date-time","description":"Inclusive start."},"to":{"type":"string","format":"date-time","description":"Exclusive end."},"timezone":{"type":"string"},"granularity":{"type":"string","enum":["hour","day","week","month"]},"bucket_count":{"type":"integer","minimum":0},"previous":{"type":"object","properties":{"from":{"type":"string","format":"date-time","description":"Inclusive start."},"to":{"type":"string","format":"date-time","description":"Exclusive end."},"timezone":{"type":"string"},"granularity":{"type":"string","enum":["hour","day","week","month"]},"bucket_count":{"type":"integer","minimum":0}},"required":["from","to","timezone","granularity","bucket_count"]}},"required":["from","to","timezone","granularity","bucket_count"]},"series":{"type":"array","items":{"type":"object","properties":{"bucket_start":{"type":"string","description":"Bucket start timestamp."},"credits_used":{"type":"number","description":"Credits used in the bucket."},"requests":{"type":"number","description":"AI requests in the bucket."},"input_tokens":{"type":"number","description":"Input tokens in the bucket."},"output_tokens":{"type":"number","description":"Output tokens in the bucket."},"cache_creation_input_tokens":{"type":"number","description":"Cache creation input tokens in the bucket."},"cache_read_input_tokens":{"type":"number","description":"Cache read input tokens in the bucket."},"projects":{"type":"array","items":{"type":"object","properties":{"project_id":{"type":["string","null"],"format":"uuid","description":"Project ID, or null for unscoped usage."},"project_name":{"type":"string","description":"Project display name."},"project_slug":{"type":["string","null"],"description":"Project slug, or null when unavailable."},"credits_used":{"type":"number","description":"Credits used by this project."},"requests":{"type":"number","description":"AI requests billed to this project."},"input_tokens":{"type":"number","description":"Input tokens billed to this project."},"output_tokens":{"type":"number","description":"Output tokens billed to this project."},"cache_creation_input_tokens":{"type":"number","description":"Cache creation input tokens billed to this project."},"cache_read_input_tokens":{"type":"number","description":"Cache read input tokens billed to this project."}},"required":["project_id","project_name","project_slug","credits_used","requests","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens"]}},"groups":{"type":"array","items":{"type":"object","properties":{"credits_used":{"type":"number","description":"Total credits used."},"requests":{"type":"number","description":"Total AI requests."},"input_tokens":{"type":"number","description":"Total input tokens."},"output_tokens":{"type":"number","description":"Total output tokens."},"cache_creation_input_tokens":{"type":"number","description":"Total cache creation input tokens."},"cache_read_input_tokens":{"type":"number","description":"Total cache read input tokens."},"dimensions":{"type":"object","properties":{"project_id":{"type":["string","null"],"format":"uuid"},"model":{"type":["string","null"]},"model_provider":{"type":["string","null"]},"api_key_id":{"type":["string","null"],"format":"uuid"},"api_key_kind":{"type":"string","enum":["api_key","no_api_key","other_keys","deleted_keys","unattributed"],"description":"Key-listing reports distinguish named keys, other/deleted keys, keyless and unattributed usage."},"member_id":{"type":["string","null"],"format":"uuid"},"member_kind":{"type":"string","enum":["member","former_member","deleted_users","automations","unattributed"],"description":"Project-member reports distinguish named people, deleted users, automations and unattributed usage."}}}},"required":["credits_used","requests","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens","dimensions"]}},"usd":{"type":"number"}},"required":["bucket_start","credits_used","requests","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens","projects","usd"]}},"projects":{"type":"array","items":{"type":"object","properties":{"project_id":{"type":["string","null"],"format":"uuid","description":"Project ID, or null for unscoped usage."},"project_name":{"type":"string","description":"Project display name."},"project_slug":{"type":["string","null"],"description":"Project slug, or null when unavailable."},"credits_used":{"type":"number","description":"Credits used by this project."},"requests":{"type":"number","description":"AI requests billed to this project."},"input_tokens":{"type":"number","description":"Input tokens billed to this project."},"output_tokens":{"type":"number","description":"Output tokens billed to this project."},"cache_creation_input_tokens":{"type":"number","description":"Cache creation input tokens billed to this project."},"cache_read_input_tokens":{"type":"number","description":"Cache read input tokens billed to this project."}},"required":["project_id","project_name","project_slug","credits_used","requests","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens"]}},"models":{"type":"array","items":{"type":"object","properties":{"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded credential funding; omitted when unknown. Credits always reflect the historical ledger."},"model":{"type":"string","description":"Canonical or normalized AI model identifier."},"canonical_model_id":{"type":"string","description":"Canonical catalog model identifier."},"model_provider":{"type":"string","description":"Model vendor id. Known values: `anthropic`, `openai`, `google`, `mistral`, `moonshotai`, `deepseek`, `qwen`, `zai`, `unknown`. Other vendor ids may appear; clients must accept any string.","example":"anthropic"},"inference_provider":{"type":"string","description":"Inference provider handling the request. Known values: `veryfront-cloud`, `unknown`. Other values may appear; clients must accept any string.","example":"veryfront-cloud"},"credits_used":{"type":"number","description":"Credits used by this model."},"requests":{"type":"number","description":"AI requests billed to this model."},"input_tokens":{"type":"number","description":"Input tokens billed to this model."},"output_tokens":{"type":"number","description":"Output tokens billed to this model."},"cache_creation_input_tokens":{"type":"number","description":"Cache creation input tokens billed to this model."},"cache_read_input_tokens":{"type":"number","description":"Cache read input tokens billed to this model."},"provider_cost_usd":{"type":"number","description":"Model provider cost in USD for this model."},"veryfront_charge_usd":{"type":"number","description":"Veryfront charge in USD for this model."},"cost_attribution":{"type":"string","enum":["estimated"],"description":"Present when historical cost attribution was recovered from persisted credits."}},"required":["model","model_provider","inference_provider","credits_used","requests","input_tokens","output_tokens","cache_creation_input_tokens","cache_read_input_tokens"]}},"serving":{"type":"array","items":{"type":"object","properties":{"host":{"type":["string","null"],"description":"Catalog ID of the deployment host, not a provider hostname or URL. Null means no deployment was recorded, including older usage, calls without a catalog deployment, and aggregated channel usage. Null does not indicate where inference ran."},"tier":{"type":["string","null"],"description":"Sovereignty tier as a catalog ID. Clients must accept unknown values as tiers can be added. Null means no tier was recorded and does not indicate where inference ran. The API does not infer a tier from billing or other fields.","example":"eu-resident"},"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded funding for this spend group; omitted when provenance is unknown."},"credits":{"type":"number","description":"Credits debited in the timeframe."},"usd":{"type":"number","description":"Customer-billed USD for those credits."},"requests":{"type":"number","description":"Number of provider calls recorded."},"input_tokens":{"type":"number","description":"Input tokens."},"output_tokens":{"type":"number","description":"Output tokens."},"cache_read_tokens":{"type":"number","description":"Tokens read from the prompt cache."},"cache_creation_tokens":{"type":"number","description":"Tokens written to the prompt cache."}},"required":["host","tier","credits","usd","requests","input_tokens","output_tokens","cache_read_tokens","cache_creation_tokens"]},"description":"The same spend cut by the deployment that served it. Ordered by spend descending, then by request count descending, then by host, then by tier; the row whose `host` and `tier` are both null is always last, because it is the absence of a record rather than a deployment. Additive: it neither replaces nor re-slices any other field. Omitted where the serving breakdown is not enabled; `models` is unchanged by it."},"scope":{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"project_id":{"type":"string","format":"uuid"},"member_id":{"type":["string","null"],"format":"uuid"}},"required":["kind","project_id","member_id"]},"group_by":{"type":"array","items":{"type":"string","enum":["project","model","api_key","member"]}},"attribution":{"type":"object","properties":{"enabled":{"type":"boolean"},"recording_since":{"type":["string","null"]}},"required":["enabled","recording_since"]}},"required":["summary","timeframe","series","projects","models","scope","attribution"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project usage","x-canonical-documentation":{"domain":"billing-usage","resource":"Usage","subgroup":"Project usage","name":"Get AI usage analytics","description":"Get AI usage analytics.","operationId":"getProjectAiUsageAnalytics"}}},"/projects/{project_reference}/members/usage":{"get":{"operationId":"getProjectMembersUsage","tags":["billing-usage/Usage/Project usage"],"summary":"Get member usage","description":"Get member usage.","parameters":[{"schema":{"type":"string","example":"my-project"},"required":true,"name":"project_reference","in":"path"},{"$ref":"#/components/parameters/UsageQueryPreset"},{"$ref":"#/components/parameters/UsageQueryFrom"},{"$ref":"#/components/parameters/UsageQueryTo"},{"$ref":"#/components/parameters/UsageQueryTimezone"},{"$ref":"#/components/parameters/UsageQueryGranularity"},{"$ref":"#/components/parameters/UsageQueryGroupBy"},{"$ref":"#/components/parameters/UsageQueryCompare"}],"responses":{"200":{"description":"AI spending by project member; webhook and channel-bot usage without a person appears in an `Automations` row. Owners and administrators read all members; other members read only their own. `serving` groups spending by deployment host and sovereignty tier; null means the deployment was not recorded, not a location. Read from the AI usage ledger; `usd` is the customer charge at the credit rate and never provider cost.","content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"project_id":{"type":"string","format":"uuid"},"member_id":{"type":["string","null"],"format":"uuid","description":"The selected self-only actor, or null for authorized all-member reporting."}},"required":["kind","project_id","member_id"]},"timeframe":{"type":"object","properties":{"from":{"type":"string","format":"date-time","description":"Inclusive start."},"to":{"type":"string","format":"date-time","description":"Exclusive end."},"timezone":{"type":"string"},"granularity":{"type":"string","enum":["hour","day","week","month"]},"bucket_count":{"type":"integer","minimum":0},"previous":{"type":"object","properties":{"from":{"type":"string","format":"date-time","description":"Inclusive start."},"to":{"type":"string","format":"date-time","description":"Exclusive end."},"timezone":{"type":"string"},"granularity":{"type":"string","enum":["hour","day","week","month"]},"bucket_count":{"type":"integer","minimum":0}},"required":["from","to","timezone","granularity","bucket_count"]}},"required":["from","to","timezone","granularity","bucket_count"]},"attribution":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether the ledger is recording who caused each call right now."},"recording_since":{"type":["string","null"],"description":"Time when the project first recorded caller attribution, or null if it never has. Recording can pause after this time. Usage recorded without attribution, including during deployment or while attribution is disabled, appears in an `unattributed` row even if a person or API key caused it."}},"required":["enabled","recording_since"],"description":"Whether attribution is complete for the returned usage. Treat it as incomplete if `enabled` is false, `recording_since` is null, or the selected period includes an `unattributed` row."},"summary":{"type":"object","properties":{"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded funding for this spend group; omitted when provenance is unknown."},"credits":{"type":"number","description":"Credits debited in the timeframe."},"usd":{"type":"number","description":"Customer-billed USD for those credits."},"requests":{"type":"number","description":"Number of provider calls recorded."},"input_tokens":{"type":"number","description":"Input tokens."},"output_tokens":{"type":"number","description":"Output tokens."},"cache_read_tokens":{"type":"number","description":"Tokens read from the prompt cache."},"cache_creation_tokens":{"type":"number","description":"Tokens written to the prompt cache."},"previous":{"type":"object","properties":{"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded funding for this spend group; omitted when provenance is unknown."},"credits":{"type":"number","description":"Credits debited in the timeframe."},"usd":{"type":"number","description":"Customer-billed USD for those credits."},"requests":{"type":"number","description":"Number of provider calls recorded."},"input_tokens":{"type":"number","description":"Input tokens."},"output_tokens":{"type":"number","description":"Output tokens."},"cache_read_tokens":{"type":"number","description":"Tokens read from the prompt cache."},"cache_creation_tokens":{"type":"number","description":"Tokens written to the prompt cache."}},"required":["credits","usd","requests","input_tokens","output_tokens","cache_read_tokens","cache_creation_tokens"]}},"required":["credits","usd","requests","input_tokens","output_tokens","cache_read_tokens","cache_creation_tokens"],"description":"Sum of the member and attribution rows below."},"group_by":{"type":"array","items":{"type":"string","enum":["project","model","api_key","member"]}},"series":{"type":"array","items":{"type":"object","properties":{"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded funding for this spend group; omitted when provenance is unknown."},"credits":{"type":"number","description":"Credits debited in the timeframe."},"usd":{"type":"number","description":"Customer-billed USD for those credits."},"requests":{"type":"number","description":"Number of provider calls recorded."},"input_tokens":{"type":"number","description":"Input tokens."},"output_tokens":{"type":"number","description":"Output tokens."},"cache_read_tokens":{"type":"number","description":"Tokens read from the prompt cache."},"cache_creation_tokens":{"type":"number","description":"Tokens written to the prompt cache."},"bucket_start":{"type":"string","format":"date-time"},"groups":{"type":"array","items":{"type":"object","properties":{"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded funding for this spend group; omitted when provenance is unknown."},"credits":{"type":"number","description":"Credits debited in the timeframe."},"usd":{"type":"number","description":"Customer-billed USD for those credits."},"requests":{"type":"number","description":"Number of provider calls recorded."},"input_tokens":{"type":"number","description":"Input tokens."},"output_tokens":{"type":"number","description":"Output tokens."},"cache_read_tokens":{"type":"number","description":"Tokens read from the prompt cache."},"cache_creation_tokens":{"type":"number","description":"Tokens written to the prompt cache."},"dimensions":{"type":"object","properties":{"project_id":{"type":["string","null"],"format":"uuid"},"model":{"type":["string","null"]},"model_provider":{"type":["string","null"]},"api_key_id":{"type":["string","null"],"format":"uuid"},"api_key_kind":{"type":"string","enum":["api_key","no_api_key","other_keys","deleted_keys","unattributed"],"description":"Key-listing reports distinguish named keys, other/deleted keys, keyless and unattributed usage."},"member_id":{"type":["string","null"],"format":"uuid"},"member_kind":{"type":"string","enum":["member","former_member","deleted_users","automations","unattributed"],"description":"Project-member reports distinguish named people, deleted users, automations and unattributed usage."}}}},"required":["credits","usd","requests","input_tokens","output_tokens","cache_read_tokens","cache_creation_tokens","dimensions"]}}},"required":["credits","usd","requests","input_tokens","output_tokens","cache_read_tokens","cache_creation_tokens","bucket_start"]}},"members":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["member","former_member","deleted_users","automations","unattributed"],"description":"Usage row type. `automations` groups webhook and channel-bot usage without a person. `deleted_users` groups usage by deleted accounts. `unattributed` groups usage recorded without caller attribution and does not imply that no person caused it. These rows have `user_id: null`; use this field to distinguish them."},"user_id":{"type":["string","null"],"format":"uuid","description":"Null on the \"Automations\" and \"Deleted users\" rows, which stand for no single person."},"name":{"type":["string","null"]},"email":{"type":["string","null"]},"role":{"type":["string","null"],"description":"Null when the spender is no longer a member of the project."},"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded funding for this spend group; omitted when provenance is unknown."},"credits":{"type":"number","description":"Credits debited in the timeframe."},"usd":{"type":"number","description":"Customer-billed USD for those credits."},"requests":{"type":"number","description":"Number of provider calls recorded."},"input_tokens":{"type":"number","description":"Input tokens."},"output_tokens":{"type":"number","description":"Output tokens."},"cache_read_tokens":{"type":"number","description":"Tokens read from the prompt cache."},"cache_creation_tokens":{"type":"number","description":"Tokens written to the prompt cache."}},"required":["kind","user_id","name","email","role","credits","usd","requests","input_tokens","output_tokens","cache_read_tokens","cache_creation_tokens"]}},"serving":{"type":"array","items":{"type":"object","properties":{"host":{"type":["string","null"],"description":"Catalog ID of the deployment host, not a provider hostname or URL. Null means no deployment was recorded, including older usage, calls without a catalog deployment, and aggregated channel usage. Null does not indicate where inference ran."},"tier":{"type":["string","null"],"description":"Sovereignty tier as a catalog ID. Clients must accept unknown values as tiers can be added. Null means no tier was recorded and does not indicate where inference ran. The API does not infer a tier from billing or other fields.","example":"eu-resident"},"funding":{"type":"string","enum":["managed","customer","mixed"],"description":"Recorded funding for this spend group; omitted when provenance is unknown."},"credits":{"type":"number","description":"Credits debited in the timeframe."},"usd":{"type":"number","description":"Customer-billed USD for those credits."},"requests":{"type":"number","description":"Number of provider calls recorded."},"input_tokens":{"type":"number","description":"Input tokens."},"output_tokens":{"type":"number","description":"Output tokens."},"cache_read_tokens":{"type":"number","description":"Tokens read from the prompt cache."},"cache_creation_tokens":{"type":"number","description":"Tokens written to the prompt cache."}},"required":["host","tier","credits","usd","requests","input_tokens","output_tokens","cache_read_tokens","cache_creation_tokens"]},"description":"The same spend cut by the deployment that served it. Ordered by spend descending, then by request count descending, then by host, then by tier; the row whose `host` and `tier` are both null is always last, because it is the absence of a record rather than a deployment. Additive: it neither replaces nor re-slices any other field."}},"required":["scope","timeframe","attribution","summary","series","members","serving"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Project usage","x-canonical-documentation":{"domain":"billing-usage","resource":"Usage","subgroup":"Project usage","name":"Get member usage","description":"Get member usage.","operationId":"getProjectMembersUsage"}}},"/accounts/{account_id}/analytics/conversations":{"get":{"operationId":"getConversationAnalytics","tags":["billing-usage/Analytics/Conversation Analytics"],"summary":"Get conversation analytics","description":"Summarize the conversation activity and model use in the projects of an account, optionally for one project or label; returns totals, configurable time buckets and recent conversations, with private titles limited to participants. Requires account.billing.read.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"},{"$ref":"#/components/parameters/UsageQueryPreset"},{"$ref":"#/components/parameters/UsageQueryFrom"},{"$ref":"#/components/parameters/UsageQueryTo"},{"$ref":"#/components/parameters/UsageQueryTimezone"},{"$ref":"#/components/parameters/UsageQueryGranularity"},{"$ref":"#/components/parameters/UsageQueryGroupBy"},{"$ref":"#/components/parameters/UsageQueryCompare"},{"schema":{"type":["array","null"],"items":{"type":"string"},"description":"Label filters as key or key=value, repeated or comma-separated. Example: ?label=team=platform&label=criticality=high"},"required":false,"name":"label","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Project ID or slug that narrows the read to one project of the account. A project of another account is not found."},"required":false,"description":"Project ID or slug that narrows the read to one project of the account. A project of another account is not found.","name":"project_reference","in":"query"}],"responses":{"200":{"description":"Conversation activity in the projects of the account. Private recent titles require participation.","content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["account"]},"account_id":{"type":"string","format":"uuid"},"project_id":{"type":["string","null"],"format":"uuid"}},"required":["kind","account_id","project_id"]},{"type":"object","properties":{"kind":{"type":"string","enum":["user"]},"user_id":{"type":"string","format":"uuid"},"project_id":{"type":["string","null"],"format":"uuid"}},"required":["kind","user_id","project_id"]}]},"group_by":{"type":"array","items":{"type":"string","enum":["project"]}},"summary":{"type":"object","properties":{"total_conversations":{"type":"number","description":"Conversations created in the selected interval."},"active_conversations":{"type":"number","description":"Matching conversations currently active."},"total_messages":{"type":"number","description":"Current stored message counters of matching conversations."},"last_conversation_at":{"type":["string","null"],"description":"Latest activity of matching conversations."},"previous":{"type":"object","properties":{"total_conversations":{"type":"number","description":"Conversations created in the selected interval."},"active_conversations":{"type":"number","description":"Matching conversations currently active."},"total_messages":{"type":"number","description":"Current stored message counters of matching conversations."},"last_conversation_at":{"type":["string","null"],"description":"Latest activity of matching conversations."}},"required":["total_conversations","active_conversations","total_messages","last_conversation_at"]}},"required":["total_conversations","active_conversations","total_messages","last_conversation_at"]},"timeframe":{"type":"object","properties":{"from":{"type":"string","format":"date-time","description":"Inclusive start."},"to":{"type":"string","format":"date-time","description":"Exclusive end."},"timezone":{"type":"string"},"granularity":{"type":"string","enum":["hour","day","week","month"]},"bucket_count":{"type":"integer","minimum":0},"previous":{"type":"object","properties":{"from":{"type":"string","format":"date-time","description":"Inclusive start."},"to":{"type":"string","format":"date-time","description":"Exclusive end."},"timezone":{"type":"string"},"granularity":{"type":"string","enum":["hour","day","week","month"]},"bucket_count":{"type":"integer","minimum":0}},"required":["from","to","timezone","granularity","bucket_count"]}},"required":["from","to","timezone","granularity","bucket_count"]},"series":{"type":"array","items":{"type":"object","properties":{"conversations":{"type":"number"},"messages":{"type":"number"},"bucket_start":{"type":"string"},"groups":{"type":"array","items":{"type":"object","properties":{"conversations":{"type":"number"},"messages":{"type":"number"},"dimensions":{"type":"object","properties":{"project_id":{"type":["string","null"],"format":"uuid"}},"required":["project_id"]}},"required":["conversations","messages","dimensions"]}}},"required":["conversations","messages","bucket_start"]}},"statuses":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","description":"Status or outcome label."},"count":{"type":"number","description":"Number of matching records."}},"required":["status","count"]}},"models":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","description":"AI provider."},"model":{"type":"string","description":"AI model identifier."},"count":{"type":"number","description":"Number of uses."}},"required":["provider","model","count"]}},"tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Tool name."},"count":{"type":"number","description":"Number of uses."}},"required":["name","count"]}},"projects":{"type":"array","items":{"type":"object","properties":{"project_id":{"type":["string","null"],"format":"uuid","description":"Project ID, or null for unscoped usage."},"project_name":{"type":"string","description":"Project display name."},"project_slug":{"type":["string","null"],"description":"Project slug, or null when unavailable."},"count":{"type":"number","description":"Number of matching records."}},"required":["project_id","project_name","project_slug","count"]}},"recent_conversations":{"type":"array","items":{"type":"object","properties":{"conversation_id":{"type":"string","format":"uuid","description":"Conversation ID that can be opened in Studio."},"title":{"type":["string","null"],"description":"Conversation title, if available."},"status":{"type":"string","description":"Conversation status."},"project_id":{"type":["string","null"],"format":"uuid","description":"Owning project ID, if scoped."},"project_name":{"type":"string","description":"Owning project display name."},"project_slug":{"type":["string","null"],"description":"Owning project slug for Studio deep links, if available."},"last_activity_at":{"type":"string","description":"Most recent conversation activity timestamp."}},"required":["conversation_id","title","status","project_id","project_name","project_slug","last_activity_at"]}}},"required":["summary","timeframe","series","statuses","models","tools","projects","recent_conversations"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account billing","x-canonical-documentation":{"domain":"billing-usage","resource":"Analytics","subgroup":"Conversation Analytics","name":"Get conversation analytics","description":"Summarize the conversation activity and model use in the projects of an account, optionally for one project or label; returns totals, configurable time buckets and recent conversations, with private titles limited to participants. Requires account.billing.read.","operationId":"getConversationAnalytics"}}},"/accounts/{account_id}/analytics/runs":{"get":{"operationId":"getRunAnalytics","tags":["billing-usage/Analytics/Run Analytics"],"summary":"Get account run analytics","description":"Read run activity for the selected account, optionally narrowed to one project or label, using shared reporting controls and a human user session. Requires account.billing.read.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"account_id","in":"path"},{"$ref":"#/components/parameters/UsageQueryPreset"},{"$ref":"#/components/parameters/UsageQueryFrom"},{"$ref":"#/components/parameters/UsageQueryTo"},{"$ref":"#/components/parameters/UsageQueryTimezone"},{"$ref":"#/components/parameters/UsageQueryGranularity"},{"$ref":"#/components/parameters/UsageQueryGroupBy"},{"$ref":"#/components/parameters/UsageQueryCompare"},{"schema":{"type":["array","null"],"items":{"type":"string"}},"required":false,"name":"label","in":"query"},{"schema":{"type":"string","description":"Optional project UUID or slug to scope analytics to a single project."},"required":false,"description":"Optional project UUID or slug to scope analytics to a single project.","name":"project_reference","in":"query"}],"responses":{"200":{"description":"Run activity for the selected account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunAnalytics"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Account billing","x-canonical-documentation":{"domain":"billing-usage","resource":"Analytics","subgroup":"Run Analytics","name":"Get account run analytics","description":"Read run activity for the selected account, optionally narrowed to one project or label, using shared reporting controls and a human user session. Requires account.billing.read.","operationId":"getRunAnalytics"}}},"/account/analytics/runs":{"get":{"operationId":"getAccountRunAnalytics","tags":["billing-usage/Analytics/Run Analytics"],"summary":"Get run analytics","description":"Read run analytics for the selected or default account. Requires account.billing.read.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Account to report; omitted, use the authorized context account or caller default. Requires account.billing.read."},"required":false,"description":"Account to report; omitted, use the authorized context account or caller default. Requires account.billing.read.","name":"account_id","in":"query"},{"$ref":"#/components/parameters/UsageQueryPreset"},{"$ref":"#/components/parameters/UsageQueryFrom"},{"$ref":"#/components/parameters/UsageQueryTo"},{"$ref":"#/components/parameters/UsageQueryTimezone"},{"$ref":"#/components/parameters/UsageQueryGranularity"},{"$ref":"#/components/parameters/UsageQueryGroupBy"},{"$ref":"#/components/parameters/UsageQueryCompare"},{"schema":{"type":["array","null"],"items":{"type":"string"},"description":"Project label filters as key or key=value, repeated or comma-separated."},"required":false,"name":"label","in":"query"},{"schema":{"type":"string","description":"Optional project UUID or slug to scope analytics to a single project."},"required":false,"description":"Optional project UUID or slug to scope analytics to a single project.","name":"project_reference","in":"query"}],"responses":{"200":{"description":"Account run analytics statistics.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunAnalytics"},"examples":{"example":{"summary":"Example response","value":{"summary":{"total_runs":0,"completed_runs":0,"failed_runs":0,"average_duration_ms":null,"p95_duration_ms":null,"last_run_at":null},"timeframe":{"from":"2026-10-01T00:00:00Z","to":"2026-10-02T00:00:00Z","granularity":"day","timezone":"UTC","bucket_count":1},"series":[],"statuses":[],"models":[],"tools":[],"projects":[],"recent_runs":[]}}}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":400}}}]}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":401}}}]}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":403}}}]}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":404}}}]}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":1}}},"content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":429}}}]}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TargetRunProblem"},{"properties":{"status":{"const":500}}}]}}}}},"x-documentation-source-tag":"Account runs","x-canonical-documentation":{"domain":"billing-usage","resource":"Analytics","subgroup":"Run Analytics","name":"Get run analytics","description":"Read run analytics for the selected or default account. Requires account.billing.read.","operationId":"getAccountRunAnalytics"}}},"/version":{"get":{"operationId":"getRuntimeVersion","security":[],"tags":["platform/Other/API metadata"],"summary":"Get runtime version metadata","description":"Get runtime version.","responses":{"200":{"description":"Immutable deployment artifact metadata for the API process and the configured Agent runtime; no caller authentication is required. Null values mean the runtime could not identify a valid immutable artifact.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuntimeVersionResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Server error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-documentation-source-tag":"Runtime metadata","x-canonical-documentation":{"domain":"platform","resource":"Other","subgroup":"API metadata","name":"Get runtime version metadata","description":"Get runtime version.","operationId":"getRuntimeVersion"}}}},"webhooks":{},"tags":[{"name":"projects","summary":"Projects","description":"Manage projects and files."},{"name":"agents","summary":"Agents","description":"Manage agent primitives."},{"name":"execution","summary":"Orchestration","description":"Manage conversations and runs."},{"name":"evaluations","summary":"Evaluations","description":"Manage evaluations and results."},{"name":"ai-gateway","summary":"AI Gateway","description":"Discover models, control access, run inference and measure model usage."},{"name":"mcp","summary":"MCP","description":"Discover tools and authorization."},{"name":"integrations","summary":"Integrations","description":"Manage connections and integrations."},{"name":"knowledge","summary":"Knowledge","description":"Manage documents and search."},{"name":"deployments","summary":"Deployments","description":"Manage releases and deployments."},{"name":"runtime","summary":"Runtime","description":"Manage environments and infrastructure."},{"name":"observability","summary":"Observability","description":"Monitor activity and performance."},{"name":"identity-access","summary":"Identity & Access","description":"Manage identity and access."},{"name":"billing-usage","summary":"Billing & Usage","description":"Manage billing and usage."},{"name":"platform","summary":"Other","description":"Inspect health and API metadata."},{"name":"projects/Projects","summary":"Projects","parent":"projects"},{"name":"projects/Projects/Favorites","summary":"Favorites","parent":"projects/Projects"},{"name":"projects/Projects/Account Projects","summary":"Account Projects","parent":"projects/Projects"},{"name":"projects/Projects/Projects","summary":"Projects","parent":"projects/Projects"},{"name":"projects/Projects/Project Labels","summary":"Project Labels","parent":"projects/Projects"},{"name":"projects/Projects/Project templates","summary":"Project templates","parent":"projects/Projects"},{"name":"projects/Files","summary":"Files","parent":"projects"},{"name":"projects/Files/Files","summary":"Files","parent":"projects/Files"},{"name":"projects/Files/File Chunks","summary":"File Chunks","parent":"projects/Files"},{"name":"projects/Files/Branch File Versions","summary":"Branch File Versions","parent":"projects/Files"},{"name":"projects/Files/Branch Files","summary":"Branch Files","parent":"projects/Files"},{"name":"projects/Files/Environment Files","summary":"Environment Files","parent":"projects/Files"},{"name":"projects/Files/File Versions","summary":"File Versions","parent":"projects/Files"},{"name":"projects/Files/Branch File Drafts","summary":"Branch File Drafts","parent":"projects/Files"},{"name":"projects/Files/Release Files","summary":"Release Files","parent":"projects/Files"},{"name":"projects/Files/Sandbox Files","summary":"Sandbox Files","parent":"projects/Files"},{"name":"projects/Files/File Search","summary":"File Search","parent":"projects/Files"},{"name":"projects/Branches","summary":"Branches","parent":"projects"},{"name":"projects/Branches/Branches","summary":"Branches","parent":"projects/Branches"},{"name":"projects/Branches/Branch Policies","summary":"Branch Policies","parent":"projects/Branches"},{"name":"projects/Branches/Branch Approvals","summary":"Branch Approvals","parent":"projects/Branches"},{"name":"projects/Branches/Branch Status Checks","summary":"Branch Status Checks","parent":"projects/Branches"},{"name":"projects/Branches/Project Commits","summary":"Project Commits","parent":"projects/Branches"},{"name":"projects/Branches/Branch Merges","summary":"Branch Merges","parent":"projects/Branches"},{"name":"projects/Uploads","summary":"Uploads","parent":"projects"},{"name":"projects/Uploads/Upload Folders","summary":"Upload Folders","parent":"projects/Uploads"},{"name":"projects/Uploads/Upload Grants","summary":"Upload Grants","parent":"projects/Uploads"},{"name":"projects/Uploads/Project Uploads","summary":"Project Uploads","parent":"projects/Uploads"},{"name":"projects/Uploads/Upload Visibility","summary":"Upload Visibility","parent":"projects/Uploads"},{"name":"agents/Agents","summary":"Agents","parent":"agents"},{"name":"agents/Agents/Agents","summary":"Agents","parent":"agents/Agents"},{"name":"agents/Agents/Agent Labels","summary":"Agent Labels","parent":"agents/Agents"},{"name":"agents/Agents/Agent templates","summary":"Agent templates","parent":"agents/Agents"},{"name":"agents/Agents/Agent Tool References","summary":"Agent Tool References","parent":"agents/Agents"},{"name":"agents/Agents/Agent Avatars","summary":"Agent Avatars","parent":"agents/Agents"},{"name":"agents/Agents/Agent Capabilities","summary":"Agent Capabilities","parent":"agents/Agents"},{"name":"agents/Agents/Agent Installation","summary":"Agent Installation","parent":"agents/Agents"},{"name":"agents/Prompts","summary":"Prompts","parent":"agents"},{"name":"agents/Prompts/Project prompts","summary":"Project prompts","parent":"agents/Prompts"},{"name":"agents/Tools","summary":"Tools","parent":"agents"},{"name":"agents/Tools/Project tools","summary":"Project tools","parent":"agents/Tools"},{"name":"agents/Skills","summary":"Skills","parent":"agents"},{"name":"agents/Skills/Project skills","summary":"Project skills","parent":"agents/Skills"},{"name":"agents/Resources","summary":"Resources","parent":"agents"},{"name":"agents/Resources/Project resources","summary":"Project resources","parent":"agents/Resources"},{"name":"agents/Tasks","summary":"Tasks","parent":"agents"},{"name":"agents/Tasks/Tasks","summary":"Tasks","parent":"agents/Tasks"},{"name":"agents/Workflows","summary":"Workflows","parent":"agents"},{"name":"agents/Workflows/Workflows","summary":"Workflows","parent":"agents/Workflows"},{"name":"execution/Conversations","summary":"Conversations","parent":"execution"},{"name":"execution/Conversations/Conversations","summary":"Conversations","parent":"execution/Conversations"},{"name":"execution/Conversations/Conversation messages","summary":"Conversation messages","parent":"execution/Conversations"},{"name":"execution/Conversations/Conversation participants","summary":"Conversation participants","parent":"execution/Conversations"},{"name":"execution/Conversations/Conversation read state","summary":"Conversation read state","parent":"execution/Conversations"},{"name":"execution/Triggers","summary":"Triggers","parent":"execution"},{"name":"execution/Triggers/Project schedules","summary":"Project schedules","parent":"execution/Triggers"},{"name":"execution/Triggers/Webhooks","summary":"Webhooks","parent":"execution/Triggers"},{"name":"execution/Triggers/Webhook events","summary":"Webhook events","parent":"execution/Triggers"},{"name":"execution/Triggers/Webhook ingress","summary":"Webhook ingress","parent":"execution/Triggers"},{"name":"execution/Runs","summary":"Runs","parent":"execution"},{"name":"execution/Runs/Run Input Requests","summary":"Run Input Requests","parent":"execution/Runs"},{"name":"execution/Runs/Runs","summary":"Runs","parent":"execution/Runs"},{"name":"execution/Runs/Runtime","summary":"Runtime","parent":"execution/Runs"},{"name":"execution/Runs/Child Runs","summary":"Child Runs","parent":"execution/Runs"},{"name":"execution/Runs/Conversation Runs","summary":"Conversation Runs","parent":"execution/Runs"},{"name":"execution/Runs/Project Runs","summary":"Project Runs","parent":"execution/Runs"},{"name":"execution/Runs/Webhook Runs","summary":"Webhook Runs","parent":"execution/Runs"},{"name":"execution/Runs/Run Events","summary":"Run Events","parent":"execution/Runs"},{"name":"execution/Runs/Run Actions","summary":"Run Actions","parent":"execution/Runs"},{"name":"execution/Runs/Run Artifacts","summary":"Run Artifacts","parent":"execution/Runs"},{"name":"execution/Executors","summary":"Executors","parent":"execution"},{"name":"execution/Executors/Connected agents","summary":"Connected agents","parent":"execution/Executors"},{"name":"execution/Executors/Agent runtime registration","summary":"Agent runtime registration","parent":"execution/Executors"},{"name":"execution/Executors/Agent workers","summary":"Agent workers","parent":"execution/Executors"},{"name":"evaluations/Evaluations","summary":"Evaluations","parent":"evaluations"},{"name":"evaluations/Evaluations/Evaluations","summary":"Evaluations","parent":"evaluations/Evaluations"},{"name":"evaluations/Evaluations/Evaluation Runs","summary":"Evaluation Runs","parent":"evaluations/Evaluations"},{"name":"ai-gateway/Models","summary":"Models","parent":"ai-gateway"},{"name":"ai-gateway/Models/Model discovery","summary":"Model discovery","parent":"ai-gateway/Models"},{"name":"ai-gateway/Models/Inference Models","summary":"Inference Models","parent":"ai-gateway/Models"},{"name":"ai-gateway/Models/Project inference policy","summary":"Project inference policy","parent":"ai-gateway/Models"},{"name":"ai-gateway/Models/Account inference policy","summary":"Account inference policy","parent":"ai-gateway/Models"},{"name":"ai-gateway/Provider credentials","summary":"Provider credentials","parent":"ai-gateway"},{"name":"ai-gateway/Provider credentials/Account provider credentials","summary":"Account provider credentials","parent":"ai-gateway/Provider credentials"},{"name":"ai-gateway/Inference","summary":"Inference","parent":"ai-gateway"},{"name":"ai-gateway/Inference/OpenAI Decisions","summary":"OpenAI Decisions","parent":"ai-gateway/Inference"},{"name":"ai-gateway/Inference/OpenAI Chat Completions","summary":"OpenAI Chat Completions","parent":"ai-gateway/Inference"},{"name":"ai-gateway/Inference/Embeddings","summary":"Embeddings","parent":"ai-gateway/Inference"},{"name":"ai-gateway/Inference/OpenAI Responses","summary":"OpenAI Responses","parent":"ai-gateway/Inference"},{"name":"ai-gateway/Inference/Proxy metadata","summary":"Proxy metadata","parent":"ai-gateway/Inference"},{"name":"ai-gateway/Inference/Application Inference","summary":"Application Inference","parent":"ai-gateway/Inference"},{"name":"ai-gateway/Inference/Anthropic Messages","summary":"Anthropic Messages","parent":"ai-gateway/Inference"},{"name":"ai-gateway/Inference/Provider gateway","summary":"Provider gateway","parent":"ai-gateway/Inference"},{"name":"ai-gateway/Inference/Gemini inference","summary":"Gemini inference","parent":"ai-gateway/Inference"},{"name":"ai-gateway/Inference/Image generation","summary":"Image generation","parent":"ai-gateway/Inference"},{"name":"ai-gateway/Model usage","summary":"Model usage","parent":"ai-gateway"},{"name":"ai-gateway/Model usage/Model usage","summary":"Model usage","parent":"ai-gateway/Model usage"},{"name":"mcp/Tools","summary":"Tools","parent":"mcp"},{"name":"mcp/Tools/MCP discovery","summary":"MCP discovery","parent":"mcp/Tools"},{"name":"mcp/Authorization","summary":"Authorization","parent":"mcp"},{"name":"mcp/Authorization/Protected resource discovery","summary":"Protected resource discovery","parent":"mcp/Authorization"},{"name":"integrations/Integrations","summary":"Integrations","parent":"integrations"},{"name":"integrations/Integrations/Integration tools","summary":"Integration tools","parent":"integrations/Integrations"},{"name":"integrations/Integrations/Integration catalog","summary":"Integration catalog","parent":"integrations/Integrations"},{"name":"integrations/Integrations/Project integrations","summary":"Project integrations","parent":"integrations/Integrations"},{"name":"integrations/Connections","summary":"Connections","parent":"integrations"},{"name":"integrations/Connections/Connections","summary":"Connections","parent":"integrations/Connections"},{"name":"integrations/Channels","summary":"Channels","parent":"integrations"},{"name":"integrations/Channels/Channels","summary":"Channels","parent":"integrations/Channels"},{"name":"integrations/Channels/Setup lookups","summary":"Setup lookups","parent":"integrations/Channels"},{"name":"integrations/Channels/Channel delivery","summary":"Channel delivery","parent":"integrations/Channels"},{"name":"integrations/External storage","summary":"External storage","parent":"integrations"},{"name":"integrations/External storage/External Files","summary":"External Files","parent":"integrations/External storage"},{"name":"knowledge/Documents","summary":"Documents","parent":"knowledge"},{"name":"knowledge/Documents/Project knowledge","summary":"Project knowledge","parent":"knowledge/Documents"},{"name":"knowledge/Documents/Retrieval documents","summary":"Retrieval documents","parent":"knowledge/Documents"},{"name":"knowledge/Documents/Knowledge assets","summary":"Knowledge assets","parent":"knowledge/Documents"},{"name":"knowledge/Search","summary":"Search","parent":"knowledge"},{"name":"knowledge/Search/Search","summary":"Search","parent":"knowledge/Search"},{"name":"knowledge/Embeddings","summary":"Embeddings","parent":"knowledge"},{"name":"knowledge/Embeddings/Project embeddings","summary":"Project embeddings","parent":"knowledge/Embeddings"},{"name":"deployments/Releases","summary":"Releases","parent":"deployments"},{"name":"deployments/Releases/Releases","summary":"Releases","parent":"deployments/Releases"},{"name":"deployments/Releases/Release Source Manifests","summary":"Release Source Manifests","parent":"deployments/Releases"},{"name":"deployments/Deployments","summary":"Deployments","parent":"deployments"},{"name":"deployments/Deployments/Project deployments","summary":"Project deployments","parent":"deployments/Deployments"},{"name":"deployments/Artifacts","summary":"Artifacts","parent":"deployments"},{"name":"deployments/Artifacts/Dependencies","summary":"Dependencies","parent":"deployments/Artifacts"},{"name":"deployments/Artifacts/Release Asset Manifests","summary":"Release Asset Manifests","parent":"deployments/Artifacts"},{"name":"deployments/Artifacts/Style artifacts","summary":"Style artifacts","parent":"deployments/Artifacts"},{"name":"deployments/Artifacts/Dependency artifacts","summary":"Dependency artifacts","parent":"deployments/Artifacts"},{"name":"runtime/Environments","summary":"Environments","parent":"runtime"},{"name":"runtime/Environments/Environments","summary":"Environments","parent":"runtime/Environments"},{"name":"runtime/Environments/Environment Domains","summary":"Environment Domains","parent":"runtime/Environments"},{"name":"runtime/Environments/Environment variables","summary":"Environment variables","parent":"runtime/Environments"},{"name":"runtime/Servers","summary":"Servers","parent":"runtime"},{"name":"runtime/Servers/Servers","summary":"Servers","parent":"runtime/Servers"},{"name":"runtime/Servers/Server Environments","summary":"Server Environments","parent":"runtime/Servers"},{"name":"runtime/Sandboxes","summary":"Sandboxes","parent":"runtime"},{"name":"runtime/Sandboxes/Sandbox Lifecycle","summary":"Sandbox Lifecycle","parent":"runtime/Sandboxes"},{"name":"runtime/Sandboxes/Sandbox Commands","summary":"Sandbox Commands","parent":"runtime/Sandboxes"},{"name":"runtime/Sandboxes/Sandbox Environment","summary":"Sandbox Environment","parent":"runtime/Sandboxes"},{"name":"runtime/Sandboxes/Sandbox Health","summary":"Sandbox Health","parent":"runtime/Sandboxes"},{"name":"runtime/Sandboxes/Sandbox Terminal","summary":"Sandbox Terminal","parent":"runtime/Sandboxes"},{"name":"runtime/Cache","summary":"Cache","parent":"runtime"},{"name":"runtime/Cache/Project Cache","summary":"Project Cache","parent":"runtime/Cache"},{"name":"observability/Logs","summary":"Logs","parent":"observability"},{"name":"observability/Logs/Log entries","summary":"Log entries","parent":"observability/Logs"},{"name":"observability/Traces","summary":"Traces","parent":"observability"},{"name":"observability/Traces/Trace spans","summary":"Trace spans","parent":"observability/Traces"},{"name":"observability/Traces/Project traces","summary":"Project traces","parent":"observability/Traces"},{"name":"observability/Traces/Trace Search","summary":"Trace Search","parent":"observability/Traces"},{"name":"observability/Metrics","summary":"Metrics","parent":"observability"},{"name":"observability/Metrics/Metric series","summary":"Metric series","parent":"observability/Metrics"},{"name":"observability/Alerts","summary":"Alerts","parent":"observability"},{"name":"observability/Alerts/Project alerts","summary":"Project alerts","parent":"observability/Alerts"},{"name":"observability/Error types","summary":"Error types","parent":"observability"},{"name":"observability/Error types/Error types","summary":"Error types","parent":"observability/Error types"},{"name":"identity-access/Users","summary":"Users","parent":"identity-access"},{"name":"identity-access/Users/Account users","summary":"Account users","parent":"identity-access/Users"},{"name":"identity-access/Users/Project members","summary":"Project members","parent":"identity-access/Users"},{"name":"identity-access/Users/Current user","summary":"Current user","parent":"identity-access/Users"},{"name":"identity-access/Accounts","summary":"Accounts","parent":"identity-access"},{"name":"identity-access/Accounts/Accounts","summary":"Accounts","parent":"identity-access/Accounts"},{"name":"identity-access/Invitations","summary":"Invitations","parent":"identity-access"},{"name":"identity-access/Invitations/Invitations","summary":"Invitations","parent":"identity-access/Invitations"},{"name":"identity-access/API keys","summary":"API keys","parent":"identity-access"},{"name":"identity-access/API keys/API keys","summary":"API keys","parent":"identity-access/API keys"},{"name":"identity-access/Authentication","summary":"Authentication","parent":"identity-access"},{"name":"identity-access/Authentication/Sign-in","summary":"Sign-in","parent":"identity-access/Authentication"},{"name":"identity-access/Authentication/Tokens","summary":"Tokens","parent":"identity-access/Authentication"},{"name":"identity-access/Authorization","summary":"Authorization","parent":"identity-access"},{"name":"identity-access/Authorization/Authorized apps","summary":"Authorized apps","parent":"identity-access/Authorization"},{"name":"identity-access/Authorization/General OAuth","summary":"General OAuth","parent":"identity-access/Authorization"},{"name":"identity-access/Authorization/Consent","summary":"Consent","parent":"identity-access/Authorization"},{"name":"billing-usage/Subscriptions","summary":"Subscriptions","parent":"billing-usage"},{"name":"billing-usage/Subscriptions/Subscription","summary":"Subscription","parent":"billing-usage/Subscriptions"},{"name":"billing-usage/Subscriptions/Seats","summary":"Seats","parent":"billing-usage/Subscriptions"},{"name":"billing-usage/Billing","summary":"Billing","parent":"billing-usage"},{"name":"billing-usage/Billing/Billing details","summary":"Billing details","parent":"billing-usage/Billing"},{"name":"billing-usage/Billing/Invoices and payments","summary":"Invoices and payments","parent":"billing-usage/Billing"},{"name":"billing-usage/Credits","summary":"Credits","parent":"billing-usage"},{"name":"billing-usage/Credits/Credits","summary":"Credits","parent":"billing-usage/Credits"},{"name":"billing-usage/Feature gates","summary":"Feature gates","parent":"billing-usage"},{"name":"billing-usage/Feature gates/Feature gates","summary":"Feature gates","parent":"billing-usage/Feature gates"},{"name":"billing-usage/Budgets","summary":"Budgets","parent":"billing-usage"},{"name":"billing-usage/Budgets/Budgets","summary":"Budgets","parent":"billing-usage/Budgets"},{"name":"billing-usage/Usage","summary":"Usage","parent":"billing-usage"},{"name":"billing-usage/Usage/API key usage","summary":"API key usage","parent":"billing-usage/Usage"},{"name":"billing-usage/Usage/Usage","summary":"Usage","parent":"billing-usage/Usage"},{"name":"billing-usage/Usage/Project usage","summary":"Project usage","parent":"billing-usage/Usage"},{"name":"billing-usage/Analytics","summary":"Analytics","parent":"billing-usage"},{"name":"billing-usage/Analytics/Conversation Analytics","summary":"Conversation Analytics","parent":"billing-usage/Analytics"},{"name":"billing-usage/Analytics/Run Analytics","summary":"Run Analytics","parent":"billing-usage/Analytics"},{"name":"platform/Other","summary":"Other","parent":"platform"},{"name":"platform/Other/API metadata","summary":"API metadata","parent":"platform/Other"}],"x-tagGroups":[{"name":"Projects","tags":["projects","projects/Projects","projects/Projects/Favorites","projects/Projects/Account Projects","projects/Projects/Projects","projects/Projects/Project Labels","projects/Projects/Project templates","projects/Files","projects/Files/Files","projects/Files/File Chunks","projects/Files/Branch File Versions","projects/Files/Branch Files","projects/Files/Environment Files","projects/Files/File Versions","projects/Files/Branch File Drafts","projects/Files/Release Files","projects/Files/Sandbox Files","projects/Files/File Search","projects/Branches","projects/Branches/Branches","projects/Branches/Branch Policies","projects/Branches/Branch Approvals","projects/Branches/Branch Status Checks","projects/Branches/Project Commits","projects/Branches/Branch Merges","projects/Uploads","projects/Uploads/Upload Folders","projects/Uploads/Upload Grants","projects/Uploads/Project Uploads","projects/Uploads/Upload Visibility"]},{"name":"Agents","tags":["agents","agents/Agents","agents/Agents/Agents","agents/Agents/Agent Labels","agents/Agents/Agent templates","agents/Agents/Agent Tool References","agents/Agents/Agent Avatars","agents/Agents/Agent Capabilities","agents/Agents/Agent Installation","agents/Prompts","agents/Prompts/Project prompts","agents/Tools","agents/Tools/Project tools","agents/Skills","agents/Skills/Project skills","agents/Resources","agents/Resources/Project resources","agents/Tasks","agents/Tasks/Tasks","agents/Workflows","agents/Workflows/Workflows"]},{"name":"Orchestration","tags":["execution","execution/Conversations","execution/Conversations/Conversations","execution/Conversations/Conversation messages","execution/Conversations/Conversation participants","execution/Conversations/Conversation read state","execution/Triggers","execution/Triggers/Project schedules","execution/Triggers/Webhooks","execution/Triggers/Webhook events","execution/Triggers/Webhook ingress","execution/Runs","execution/Runs/Run Input Requests","execution/Runs/Runs","execution/Runs/Runtime","execution/Runs/Child Runs","execution/Runs/Conversation Runs","execution/Runs/Project Runs","execution/Runs/Webhook Runs","execution/Runs/Run Events","execution/Runs/Run Actions","execution/Runs/Run Artifacts","execution/Executors","execution/Executors/Connected agents","execution/Executors/Agent runtime registration","execution/Executors/Agent workers"]},{"name":"Evaluations","tags":["evaluations","evaluations/Evaluations","evaluations/Evaluations/Evaluations","evaluations/Evaluations/Evaluation Runs"]},{"name":"AI Gateway","tags":["ai-gateway","ai-gateway/Models","ai-gateway/Models/Model discovery","ai-gateway/Models/Inference Models","ai-gateway/Models/Project inference policy","ai-gateway/Models/Account inference policy","ai-gateway/Provider credentials","ai-gateway/Provider credentials/Account provider credentials","ai-gateway/Inference","ai-gateway/Inference/OpenAI Decisions","ai-gateway/Inference/OpenAI Chat Completions","ai-gateway/Inference/Embeddings","ai-gateway/Inference/OpenAI Responses","ai-gateway/Inference/Proxy metadata","ai-gateway/Inference/Application Inference","ai-gateway/Inference/Anthropic Messages","ai-gateway/Inference/Provider gateway","ai-gateway/Inference/Gemini inference","ai-gateway/Inference/Image generation","ai-gateway/Model usage","ai-gateway/Model usage/Model usage"]},{"name":"MCP","tags":["mcp","mcp/Tools","mcp/Tools/MCP discovery","mcp/Authorization","mcp/Authorization/Protected resource discovery"]},{"name":"Integrations","tags":["integrations","integrations/Integrations","integrations/Integrations/Integration tools","integrations/Integrations/Integration catalog","integrations/Integrations/Project integrations","integrations/Connections","integrations/Connections/Connections","integrations/Channels","integrations/Channels/Channels","integrations/Channels/Setup lookups","integrations/Channels/Channel delivery","integrations/External storage","integrations/External storage/External Files"]},{"name":"Knowledge","tags":["knowledge","knowledge/Documents","knowledge/Documents/Project knowledge","knowledge/Documents/Retrieval documents","knowledge/Documents/Knowledge assets","knowledge/Search","knowledge/Search/Search","knowledge/Embeddings","knowledge/Embeddings/Project embeddings"]},{"name":"Deployments","tags":["deployments","deployments/Releases","deployments/Releases/Releases","deployments/Releases/Release Source Manifests","deployments/Deployments","deployments/Deployments/Project deployments","deployments/Artifacts","deployments/Artifacts/Dependencies","deployments/Artifacts/Release Asset Manifests","deployments/Artifacts/Style artifacts","deployments/Artifacts/Dependency artifacts"]},{"name":"Runtime","tags":["runtime","runtime/Environments","runtime/Environments/Environments","runtime/Environments/Environment Domains","runtime/Environments/Environment variables","runtime/Servers","runtime/Servers/Servers","runtime/Servers/Server Environments","runtime/Sandboxes","runtime/Sandboxes/Sandbox Lifecycle","runtime/Sandboxes/Sandbox Commands","runtime/Sandboxes/Sandbox Environment","runtime/Sandboxes/Sandbox Health","runtime/Sandboxes/Sandbox Terminal","runtime/Cache","runtime/Cache/Project Cache"]},{"name":"Observability","tags":["observability","observability/Logs","observability/Logs/Log entries","observability/Traces","observability/Traces/Trace spans","observability/Traces/Project traces","observability/Traces/Trace Search","observability/Metrics","observability/Metrics/Metric series","observability/Alerts","observability/Alerts/Project alerts","observability/Error types","observability/Error types/Error types"]},{"name":"Identity & Access","tags":["identity-access","identity-access/Users","identity-access/Users/Account users","identity-access/Users/Project members","identity-access/Users/Current user","identity-access/Accounts","identity-access/Accounts/Accounts","identity-access/Invitations","identity-access/Invitations/Invitations","identity-access/API keys","identity-access/API keys/API keys","identity-access/Authentication","identity-access/Authentication/Sign-in","identity-access/Authentication/Tokens","identity-access/Authorization","identity-access/Authorization/Authorized apps","identity-access/Authorization/General OAuth","identity-access/Authorization/Consent"]},{"name":"Billing & Usage","tags":["billing-usage","billing-usage/Subscriptions","billing-usage/Subscriptions/Subscription","billing-usage/Subscriptions/Seats","billing-usage/Billing","billing-usage/Billing/Billing details","billing-usage/Billing/Invoices and payments","billing-usage/Credits","billing-usage/Credits/Credits","billing-usage/Feature gates","billing-usage/Feature gates/Feature gates","billing-usage/Budgets","billing-usage/Budgets/Budgets","billing-usage/Usage","billing-usage/Usage/API key usage","billing-usage/Usage/Usage","billing-usage/Usage/Project usage","billing-usage/Analytics","billing-usage/Analytics/Conversation Analytics","billing-usage/Analytics/Run Analytics"]},{"name":"Other","tags":["platform","platform/Other","platform/Other/API metadata"]}],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"servers":[{"url":"https://api.veryfront.com","description":"Current request origin"},{"url":"http://localhost:4000","description":"Local development"}],"externalDocs":{"description":"Interactive REST reference","url":"https://api.veryfront.com/docs"}}