{"openapi":"3.1.0","info":{"title":"Developer API","description":"Stable REST interface for automations and agents operating a workspace.\n\n## Authentication\n\nSend an API key as `Authorization: Bearer <api-key>` or `x-api-key: <api-key>`. Each key carries explicit capabilities; grant only the ones an integration needs. Discovery documents (`/`, `/health`, `/openapi.json`) are readable without credentials, and every execution surface is authenticated.\n\n## Errors\n\nEvery documented non-success response uses the shared `Error` schema: `error.code` is a stable machine-readable code and `error.message` is a human-readable explanation, with optional endpoint-specific `error.details`. Branch on `error.code`, never on the message text. Every response carries an `x-request-id` header for support and log correlation, and IETF `RateLimit-*` headers describe the current request budget.\n\n## Versioning\n\nStable endpoints are versioned in the URL path under `/v1`. Backward-compatible additions - new endpoints, new optional request fields, new response fields - ship inside that version, so clients must ignore response members they do not recognise. A breaking change ships under a new version prefix.\n\n## Deprecation and sunset policy\n\nA retirement is announced in the changelog and in the developer documentation before it ships. During the retirement window the operation is marked `deprecated: true` in this specification and its responses carry the IETF `Deprecation` and `Sunset` headers naming the date the endpoint stops answering. No endpoint is deprecated merely because this policy is published.","version":"0.0.0"},"paths":{"/":{"get":{"operationId":"getRoot","tags":["Health"],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"service":{"description":"Identifier of the service answering the request.","type":"string"}},"required":["service"],"type":"object"}}},"description":"Service metadata"}},"description":"Service metadata","summary":"Get Root"}},"/health":{"get":{"operationId":"getHealth","tags":["Health"],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"issues":{"description":"Issues that made the check fail.","items":{"properties":{"code":{"description":"Stable machine-readable identifier for the issue.","type":"string"},"dependency":{"description":"Dependency the issue was observed on.","type":"string"},"message":{"description":"Human-readable explanation of the issue.","type":"string"},"missingEnv":{"description":"Environment variables the service requires but cannot read.","items":{"type":"string"},"type":"array"},"service":{"description":"Service the issue was observed on.","type":"string"}},"required":["code","message"],"type":"object"},"type":"array"},"ok":{"description":"Whether every checked dependency is healthy.","type":"boolean"},"service":{"description":"Identifier of the service answering the request.","type":"string"}},"required":["ok"],"type":"object"}}},"description":"Health check"},"503":{"content":{"application/json":{"schema":{"properties":{"issues":{"description":"Issues that made the check fail.","items":{"properties":{"code":{"description":"Stable machine-readable identifier for the issue.","type":"string"},"dependency":{"description":"Dependency the issue was observed on.","type":"string"},"message":{"description":"Human-readable explanation of the issue.","type":"string"},"missingEnv":{"description":"Environment variables the service requires but cannot read.","items":{"type":"string"},"type":"array"},"service":{"description":"Service the issue was observed on.","type":"string"}},"required":["code","message"],"type":"object"},"type":"array"},"ok":{"description":"Whether every checked dependency is healthy.","type":"boolean"},"service":{"description":"Identifier of the service answering the request.","type":"string"}},"required":["ok"],"type":"object"}}},"description":"Health check failed"}},"description":"Health check","summary":"Get Health"}},"/version":{"get":{"operationId":"getVersion","tags":["Health"],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"commit":{"description":"Git commit the running build was produced from.","type":"string"},"deployedAt":{"description":"ISO 8601 timestamp of the running deployment.","type":"string"},"uptime":{"description":"Seconds elapsed since the process started.","type":"number"},"version":{"description":"Released version of the running build.","type":"string"}},"required":["commit","deployedAt","uptime"],"type":"object"}}},"description":"Service version metadata"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"description":"Service version metadata","summary":"Get Version"}},"/v1/me":{"get":{"operationId":"getApiKey","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"apiKey":{"discriminator":{"propertyName":"credentialKind"},"oneOf":[{"additionalProperties":false,"properties":{"actionGrants":{"items":{"type":"string"},"type":"array"},"capabilities":{"additionalProperties":false,"properties":{"automation":{"type":"string"},"billing":{"type":"string"},"compute":{"type":"string"},"projects":{"type":"string"},"webhooks":{"type":"string"},"workspace":{"type":"string"}},"required":["automation","billing","compute","projects","webhooks","workspace"],"type":"object"},"id":{"type":"string"},"quota":{"additionalProperties":false,"properties":{"requestsPerMinute":{"type":"integer"}},"type":"object"},"teamScope":{"additionalProperties":false,"properties":{"teamId":{"type":"string"}},"required":["teamId"],"type":"object"},"user":{"additionalProperties":false,"properties":{"createdAt":{"type":"string"},"email":{"type":"string"},"id":{"type":"string"},"image":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"}},"required":["id"],"type":"object"},"credentialKind":{"const":"bot","type":"string"}},"required":["actionGrants","capabilities","credentialKind","id"],"type":"object"},{"additionalProperties":false,"properties":{"actionGrants":{"items":{"type":"string"},"type":"array"},"capabilities":{"additionalProperties":false,"properties":{"automation":{"type":"string"},"billing":{"type":"string"},"compute":{"type":"string"},"projects":{"type":"string"},"webhooks":{"type":"string"},"workspace":{"type":"string"}},"required":["automation","billing","compute","projects","webhooks","workspace"],"type":"object"},"id":{"type":"string"},"quota":{"additionalProperties":false,"properties":{"requestsPerMinute":{"type":"integer"}},"type":"object"},"teamScope":{"additionalProperties":false,"properties":{"teamId":{"type":"string"}},"required":["teamId"],"type":"object"},"user":{"additionalProperties":false,"properties":{"createdAt":{"type":"string"},"email":{"type":"string"},"id":{"type":"string"},"image":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"}},"required":["id"],"type":"object"},"credentialKind":{"const":"personal","type":"string"},"issuerRoleAtIssue":{"enum":["manager","member"],"type":"string"},"issuerTeamMembershipId":{"type":"string"},"issuerTeamRole":{"enum":["admin","member","owner"],"type":"string"},"issuerUserId":{"type":"string"}},"required":["actionGrants","capabilities","credentialKind","id","issuerRoleAtIssue","issuerTeamMembershipId","issuerTeamRole","issuerUserId"],"type":"object"}]}},"required":["apiKey"],"type":"object"}}},"description":"Current API key principal"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Auth"],"description":"Current API key principal","summary":"Get Api Key"}},"/v1/teams":{"get":{"operationId":"listTeams","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"pagination":{"additionalProperties":false,"properties":{"count":{"type":"integer"},"next":{"type":"null"},"prev":{"type":"null"}},"required":["count","next","prev"],"type":"object"},"teams":{"items":{"additionalProperties":false,"properties":{"avatar":{"type":"null"},"createdAt":{"type":"string"},"id":{"type":"string"},"limited":{"type":"boolean"},"limitedBy":{"items":{"type":"string"},"type":"array"},"membership":{"additionalProperties":false,"properties":{"confirmed":{"type":"boolean"},"createdAt":{"type":"string"},"isDefault":{"type":"boolean"},"role":{"type":"string"},"teamId":{"type":"string"},"userId":{"type":"string"}},"required":["confirmed","createdAt","isDefault","role","teamId","userId"],"type":"object"},"name":{"type":"string"},"planKey":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string"},"updatedAt":{"type":"string"}},"required":["createdAt","id","limited","limitedBy","membership","name","planKey","slug","status","updatedAt"],"type":"object"},"type":"array"}},"required":["pagination","teams"],"type":"object"}}},"description":"Teams bound to the API key"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Teams"],"description":"Teams bound to the API key","summary":"List Teams"}},"/v1/teams/{teamId}":{"get":{"operationId":"getTeam","parameters":[{"in":"path","name":"teamId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"avatar":{"type":"null"},"createdAt":{"type":"string"},"id":{"type":"string"},"limited":{"type":"boolean"},"limitedBy":{"items":{"type":"string"},"type":"array"},"membership":{"additionalProperties":false,"properties":{"confirmed":{"type":"boolean"},"createdAt":{"type":"string"},"isDefault":{"type":"boolean"},"role":{"type":"string"},"teamId":{"type":"string"},"userId":{"type":"string"}},"required":["confirmed","createdAt","isDefault","role","teamId","userId"],"type":"object"},"name":{"type":"string"},"planKey":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string"},"updatedAt":{"type":"string"}},"required":["createdAt","id","limited","limitedBy","membership","name","planKey","slug","status","updatedAt"],"type":"object"}}},"description":"The requested team"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Team not found","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Teams"],"description":"The requested team","summary":"Get Team"}},"/v1/teams/{teamId}/members":{"get":{"operationId":"getTeamMembers","parameters":[{"in":"path","name":"teamId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"members":{"items":{"additionalProperties":false,"properties":{"avatar":{"type":"string"},"confirmed":{"type":"boolean"},"createdAt":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"userId":{"type":"string"},"username":{"type":"string"}},"required":["confirmed","createdAt","email","role","userId","username"],"type":"object"},"type":"array"}},"required":["members"],"type":"object"}}},"description":"Team members"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Team not found","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Teams"],"description":"Team members","summary":"Get Team Members"}},"/v1/projects":{"get":{"operationId":"listProjects","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"projects":{"items":{"type":"object","properties":{"access":{"type":"string","enum":["OPEN","RESTRICTED"]},"agentConfig":{"anyOf":[{"anyOf":[{"type":"object"},{"type":"null"}]},{"type":"null"}]},"agentTemplateSlug":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"kpis":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"format":{"type":"string","enum":["number","percent","currency"]},"id":{"type":"string"},"label":{"type":"string"},"source":{"type":"object","properties":{"aggregation":{"type":"string","enum":["count","sum"]},"filter":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"metric":{"type":"string"},"recordType":{"type":"string"}},"required":["aggregation","metric","recordType"],"additionalProperties":false},"windowDays":{"type":"integer","exclusiveMinimum":0}},"required":["format","id","label","source","windowDays"],"additionalProperties":false},"maxItems":3},{"type":"null"}]},"createdAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string","minLength":1},"name":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","ARCHIVED","DELETED"]},"teamId":{"type":"string","minLength":1},"updatedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"}},"required":["access","createdAt","description","id","name","slug","status","teamId","updatedAt"],"additionalProperties":false},"type":"array"}},"required":["projects"],"type":"object"}}},"description":"A list of projects for the requested team"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Projects"],"description":"A list of projects for the requested team","summary":"List Projects"}},"/v1/teams/{teamId}/projects":{"post":{"operationId":"createProject","parameters":[{"in":"path","name":"teamId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"slug":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string","maxLength":1024},"access":{"type":"string","enum":["open","restricted"]},"agentTemplateSlug":{"type":"string","minLength":1,"maxLength":128},"agentConfig":{"type":"object"},"kpis":{"type":"array","items":{"type":"object","properties":{"format":{"type":"string","enum":["number","percent","currency"]},"id":{"type":"string"},"label":{"type":"string"},"source":{"type":"object","properties":{"aggregation":{"type":"string","enum":["count","sum"]},"filter":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"metric":{"type":"string"},"recordType":{"type":"string"}},"required":["aggregation","metric","recordType"],"additionalProperties":false},"windowDays":{"type":"integer","exclusiveMinimum":0}},"required":["format","id","label","source","windowDays"],"additionalProperties":false},"maxItems":3}},"required":["name"],"additionalProperties":false}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"type":"object","properties":{"access":{"type":"string","enum":["OPEN","RESTRICTED"]},"agentConfig":{"anyOf":[{"anyOf":[{"type":"object"},{"type":"null"}]},{"type":"null"}]},"agentTemplateSlug":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"kpis":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"format":{"type":"string","enum":["number","percent","currency"]},"id":{"type":"string"},"label":{"type":"string"},"source":{"type":"object","properties":{"aggregation":{"type":"string","enum":["count","sum"]},"filter":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"metric":{"type":"string"},"recordType":{"type":"string"}},"required":["aggregation","metric","recordType"],"additionalProperties":false},"windowDays":{"type":"integer","exclusiveMinimum":0}},"required":["format","id","label","source","windowDays"],"additionalProperties":false},"maxItems":3},{"type":"null"}]},"createdAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string","minLength":1},"name":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","ARCHIVED","DELETED"]},"teamId":{"type":"string","minLength":1},"updatedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"}},"required":["access","createdAt","description","id","name","slug","status","teamId","updatedAt"],"additionalProperties":false}}},"description":"The created project"},"202":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"action":{"type":"string"},"approval":{"additionalProperties":false,"properties":{"actionPermissionSource":{"additionalProperties":true,"type":"object"},"reason":{"type":"string"},"requestId":{"type":"string"},"status":{"const":"approval_required","type":"string"}},"required":["actionPermissionSource","reason","requestId","status"],"type":"object"}},"required":["action","approval"],"type":"object"}}},"description":"The action requires approval; the persisted request executes once an approver resolves it"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Project slug already exists","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request body","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Project limit reached","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Projects"],"description":"The created project","summary":"Create Project"}},"/v1/teams/{teamId}/projects/{projectId}":{"get":{"operationId":"getProject","parameters":[{"in":"path","name":"teamId","required":true,"schema":{"type":"string"}},{"in":"path","name":"projectId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"access":{"type":"string","enum":["OPEN","RESTRICTED"]},"agentConfig":{"anyOf":[{"anyOf":[{"type":"object"},{"type":"null"}]},{"type":"null"}]},"agentTemplateSlug":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"kpis":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"format":{"type":"string","enum":["number","percent","currency"]},"id":{"type":"string"},"label":{"type":"string"},"source":{"type":"object","properties":{"aggregation":{"type":"string","enum":["count","sum"]},"filter":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"metric":{"type":"string"},"recordType":{"type":"string"}},"required":["aggregation","metric","recordType"],"additionalProperties":false},"windowDays":{"type":"integer","exclusiveMinimum":0}},"required":["format","id","label","source","windowDays"],"additionalProperties":false},"maxItems":3},{"type":"null"}]},"createdAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string","minLength":1},"name":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","ARCHIVED","DELETED"]},"teamId":{"type":"string","minLength":1},"updatedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"}},"required":["access","createdAt","description","id","name","slug","status","teamId","updatedAt"],"additionalProperties":false}}},"description":"The requested project"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Project not found","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Projects"],"description":"The requested project","summary":"Get Project"},"patch":{"operationId":"updateProject","parameters":[{"in":"path","name":"teamId","required":true,"schema":{"type":"string"}},{"in":"path","name":"projectId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"slug":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string","maxLength":1024},"access":{"type":"string","enum":["open","restricted"]},"kpis":{"type":"array","items":{"type":"object","properties":{"format":{"type":"string","enum":["number","percent","currency"]},"id":{"type":"string"},"label":{"type":"string"},"source":{"type":"object","properties":{"aggregation":{"type":"string","enum":["count","sum"]},"filter":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"metric":{"type":"string"},"recordType":{"type":"string"}},"required":["aggregation","metric","recordType"],"additionalProperties":false},"windowDays":{"type":"integer","exclusiveMinimum":0}},"required":["format","id","label","source","windowDays"],"additionalProperties":false},"maxItems":3}},"additionalProperties":false}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"access":{"type":"string","enum":["OPEN","RESTRICTED"]},"agentConfig":{"anyOf":[{"anyOf":[{"type":"object"},{"type":"null"}]},{"type":"null"}]},"agentTemplateSlug":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"null"}]},{"type":"null"}]},"kpis":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"format":{"type":"string","enum":["number","percent","currency"]},"id":{"type":"string"},"label":{"type":"string"},"source":{"type":"object","properties":{"aggregation":{"type":"string","enum":["count","sum"]},"filter":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"metric":{"type":"string"},"recordType":{"type":"string"}},"required":["aggregation","metric","recordType"],"additionalProperties":false},"windowDays":{"type":"integer","exclusiveMinimum":0}},"required":["format","id","label","source","windowDays"],"additionalProperties":false},"maxItems":3},{"type":"null"}]},"createdAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string","minLength":1},"name":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","ARCHIVED","DELETED"]},"teamId":{"type":"string","minLength":1},"updatedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"}},"required":["access","createdAt","description","id","name","slug","status","teamId","updatedAt"],"additionalProperties":false}}},"description":"The updated project"},"202":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"action":{"type":"string"},"approval":{"additionalProperties":false,"properties":{"actionPermissionSource":{"additionalProperties":true,"type":"object"},"reason":{"type":"string"},"requestId":{"type":"string"},"status":{"const":"approval_required","type":"string"}},"required":["actionPermissionSource","reason","requestId","status"],"type":"object"}},"required":["action","approval"],"type":"object"}}},"description":"The action requires approval; the persisted request executes once an approver resolves it"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient permissions","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Project not found","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Project slug already exists","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request body","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Projects"],"description":"The updated project","summary":"Update Project"},"delete":{"operationId":"deleteProject","parameters":[{"in":"path","name":"teamId","required":true,"schema":{"type":"string"}},{"in":"path","name":"projectId","required":true,"schema":{"type":"string"}}],"responses":{"202":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"action":{"type":"string"},"approval":{"additionalProperties":false,"properties":{"actionPermissionSource":{"additionalProperties":true,"type":"object"},"reason":{"type":"string"},"requestId":{"type":"string"},"status":{"const":"approval_required","type":"string"}},"required":["actionPermissionSource","reason","requestId","status"],"type":"object"}},"required":["action","approval"],"type":"object"}}},"description":"The action requires approval; the persisted request executes once an approver resolves it"},"204":{"description":"Project archived successfully"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient permissions","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Project not found","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Projects"],"description":"The action requires approval; the persisted request executes once an approver resolves it","summary":"Delete Project"}},"/v1/teams/{teamId}/projects/{projectId}/agent/deploy":{"post":{"operationId":"deployProjectAgent","parameters":[{"in":"path","name":"teamId","required":true,"schema":{"type":"string"}},{"in":"path","name":"projectId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"manifest":{"type":"object","properties":{"abiVersion":{"type":"string","enum":["openfactor.agent.v1"]},"defaultConfig":{"type":"object"},"description":{"type":"string"},"displayName":{"type":"string"},"instructions":{"type":"array","items":{"type":"object","properties":{"markdown":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"}},"required":["markdown","name","path"],"additionalProperties":false},"minItems":1},"maxSteps":{"type":"integer","exclusiveMinimum":0},"model":{"type":"string","minLength":1},"packageName":{"type":"string"},"reasoning":{"type":"string","enum":["provider-default","minimal","low","medium","high"]},"slug":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"tools":{"type":"array","items":{"type":"object","properties":{"capabilities":{"type":"array","items":{"type":"string","enum":["browser","external-write","filesystem-read","filesystem-write","network","scheduling"]}},"description":{"type":"string"},"inputSchema":{"type":"object"},"modulePath":{"type":"string"},"name":{"type":"string"},"outputSchema":{"type":"object"},"risk":{"type":"string","enum":["read-only","local-mutation","external-side-effect"]}},"required":["capabilities","description","inputSchema","modulePath","name","risk"],"additionalProperties":false}},"workflow":{"type":"object","properties":{"kind":{"type":"string","enum":["json-file"]},"path":{"type":"string","minLength":1}},"required":["kind","path"],"additionalProperties":false}},"required":["abiVersion","defaultConfig","instructions","slug","tools"],"additionalProperties":false}},"required":["manifest"],"additionalProperties":false}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"abiVersion":{"type":"string","enum":["openfactor.agent.v1"]},"manifestSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"projectId":{"type":"string","minLength":1},"revisionId":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1},"status":{"type":"string","enum":["deployed","unchanged"]}},"required":["abiVersion","manifestSha256","projectId","revisionId","slug","status"],"additionalProperties":false}}},"description":"The already-current immutable agent deployment"},"201":{"content":{"application/json":{"schema":{"type":"object","properties":{"abiVersion":{"type":"string","enum":["openfactor.agent.v1"]},"manifestSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"projectId":{"type":"string","minLength":1},"revisionId":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1},"status":{"type":"string","enum":["deployed","unchanged"]}},"required":["abiVersion","manifestSha256","projectId","revisionId","slug","status"],"additionalProperties":false}}},"description":"The promoted immutable agent deployment"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient permissions","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Project not found","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Project head changed during deployment","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid compiled agent manifest","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Projects"],"description":"The already-current immutable agent deployment","summary":"Deploy Project Agent"}},"/v1/teams/{teamId}/projects/{projectId}/agent/invoke":{"post":{"operationId":"invokeProjectAgent","parameters":[{"in":"path","name":"teamId","required":true,"schema":{"type":"string"}},{"in":"path","name":"projectId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"idempotencyKey":{"type":"string","minLength":1,"maxLength":256},"prompt":{"type":"string","minLength":1,"maxLength":100000}},"required":["idempotencyKey","prompt"],"additionalProperties":false}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"boolean"},"deploymentRevisionId":{"type":"string","minLength":1},"runAttemptId":{"type":"string","minLength":1},"runId":{"type":"string","minLength":1},"runRevisionId":{"type":"string","minLength":1}},"required":["created","deploymentRevisionId","runAttemptId","runId","runRevisionId"],"additionalProperties":false}}},"description":"The idempotently replayed managed agent invocation"},"201":{"content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"boolean"},"deploymentRevisionId":{"type":"string","minLength":1},"runAttemptId":{"type":"string","minLength":1},"runId":{"type":"string","minLength":1},"runRevisionId":{"type":"string","minLength":1}},"required":["created","deploymentRevisionId","runAttemptId","runId","runRevisionId"],"additionalProperties":false}}},"description":"The dispatched managed agent invocation"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient permissions","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Project or promoted agent deployment not found","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"The promoted deployment cannot execute","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid invocation request or deployment","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Projects"],"description":"The idempotently replayed managed agent invocation","summary":"Invoke Project Agent"}},"/v1/teams/{teamId}/projects/{projectId}/agent/invocations/{runId}":{"get":{"operationId":"getProjectAgentInvocation","parameters":[{"in":"path","name":"teamId","required":true,"schema":{"type":"string"}},{"in":"path","name":"projectId","required":true,"schema":{"type":"string"}},{"in":"path","name":"runId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"createdAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z$"},"lastUpdatedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z$"},"runId":{"type":"string","minLength":1},"result":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"],"additionalProperties":false},"status":{"type":"string","enum":["completed"]}},"required":["createdAt","lastUpdatedAt","runId","result","status"],"additionalProperties":false},{"type":"object","properties":{"createdAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z$"},"lastUpdatedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z$"},"runId":{"type":"string","minLength":1},"status":{"type":"string","enum":["pending","running","waiting","failed","cancelled"]}},"required":["createdAt","lastUpdatedAt","runId","status"],"additionalProperties":false}]}}},"description":"The managed agent invocation status"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient permissions","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Agent invocation not found","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Completed invocation result unavailable","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Projects"],"description":"The managed agent invocation status","summary":"Get Project Agent Invocation"}},"/v1/teams/{teamId}/projects/{projectId}/agent/invocations/{runId}/cancel":{"post":{"operationId":"cancelProjectAgentInvocation","parameters":[{"in":"path","name":"teamId","required":true,"schema":{"type":"string"}},{"in":"path","name":"projectId","required":true,"schema":{"type":"string"}},{"in":"path","name":"runId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"cancellationRequested":{"type":"boolean"},"runId":{"type":"string","minLength":1}},"required":["cancellationRequested","runId"],"additionalProperties":false}}},"description":"The managed agent invocation cancellation acknowledgement"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient permissions","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Agent invocation not found","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Cancellation was only partially accepted","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Projects"],"description":"The managed agent invocation cancellation acknowledgement","summary":"Cancel Project Agent Invocation"}},"/v1/teams/{teamId}/projects/{projectId}/members":{"get":{"operationId":"listProjectMembers","parameters":[{"in":"path","name":"teamId","required":true,"schema":{"type":"string"}},{"in":"path","name":"projectId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"members":{"items":{"type":"object","properties":{"createdAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"role":{"type":"string","enum":["ADMIN","WRITE","READ"]},"userId":{"type":"string"}},"required":["createdAt","role","userId"],"additionalProperties":false},"type":"array"}},"required":["members"],"type":"object"}}},"description":"Project members"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient permissions","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Projects"],"description":"Project members","summary":"List Project Members"},"post":{"operationId":"addProjectMember","parameters":[{"in":"path","name":"teamId","required":true,"schema":{"type":"string"}},{"in":"path","name":"projectId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","minLength":1},"role":{"type":"string","enum":["admin","write","read"]}},"required":["userId"],"additionalProperties":false}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"role":{"type":"string","enum":["ADMIN","WRITE","READ"]},"userId":{"type":"string"}},"required":["createdAt","role","userId"],"additionalProperties":false}}},"description":"The added project member"},"202":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"action":{"type":"string"},"approval":{"additionalProperties":false,"properties":{"actionPermissionSource":{"additionalProperties":true,"type":"object"},"reason":{"type":"string"},"requestId":{"type":"string"},"status":{"const":"approval_required","type":"string"}},"required":["actionPermissionSource","reason","requestId","status"],"type":"object"}},"required":["action","approval"],"type":"object"}}},"description":"The action requires approval; the persisted request executes once an approver resolves it"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient permissions","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request body","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Projects"],"description":"The added project member","summary":"Add Project Member"}},"/v1/teams/{teamId}/projects/{projectId}/members/{userId}":{"delete":{"operationId":"removeProjectMember","parameters":[{"in":"path","name":"teamId","required":true,"schema":{"type":"string"}},{"in":"path","name":"projectId","required":true,"schema":{"type":"string"}},{"in":"path","name":"userId","required":true,"schema":{"type":"string"}}],"responses":{"202":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"action":{"type":"string"},"approval":{"additionalProperties":false,"properties":{"actionPermissionSource":{"additionalProperties":true,"type":"object"},"reason":{"type":"string"},"requestId":{"type":"string"},"status":{"const":"approval_required","type":"string"}},"required":["actionPermissionSource","reason","requestId","status"],"type":"object"}},"required":["action","approval"],"type":"object"}}},"description":"The action requires approval; the persisted request executes once an approver resolves it"},"204":{"description":"Member removed"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient permissions","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Member not found","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Projects"],"description":"The action requires approval; the persisted request executes once an approver resolves it","summary":"Remove Project Member"}},"/v1/config":{"get":{"operationId":"getConfig","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"planKey":{"type":"string"},"resourceConfig":{"additionalProperties":true,"type":"object"}},"required":["planKey","resourceConfig"],"type":"object"}}},"description":"Plan configuration for the authenticated team"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Config"],"description":"Plan configuration for the authenticated team","summary":"Get Config"}},"/v1/billing/charges":{"get":{"operationId":"listBillingCharges","parameters":[{"in":"query","name":"from","required":true,"schema":{"type":"string"}},{"in":"query","name":"to","required":true,"schema":{"type":"string"}},{"in":"query","name":"teamId","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/jsonl":{"schema":{"type":"object"}}},"description":"FOCUS records as newline-delimited JSON"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid date range","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"FOCUS records as newline-delimited JSON","summary":"List Billing Charges"}},"/v1/billing/contract-commitments":{"get":{"operationId":"listContractCommitments","parameters":[{"in":"query","name":"teamId","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/jsonl":{"schema":{"type":"object"}}},"description":"FOCUS records as newline-delimited JSON"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"FOCUS records as newline-delimited JSON","summary":"List Contract Commitments"}},"/v1/billing/metering/events":{"get":{"operationId":"listBillingMeteringEvents","parameters":[{"description":"Restrict to one billing account reference.","in":"query","name":"accountRef","required":false,"schema":{"type":"string"}},{"description":"Restrict to one metering event type.","in":"query","name":"eventType","required":false,"schema":{"type":"string"}},{"description":"Inclusive ISO 8601 start of the range.","in":"query","name":"from","required":false,"schema":{"type":"string"}},{"description":"Exclusive ISO 8601 end of the range.","in":"query","name":"to","required":false,"schema":{"type":"string"}},{"description":"Maximum number of items to return.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"events":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["events"],"type":"object"}}},"description":"Metering events"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"Metering events","summary":"List Billing Metering Events"}},"/v1/billing/metering/events/search":{"post":{"operationId":"searchBillingMeteringEvents","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"eventIds":{"type":"array","items":{"type":"string"},"description":"Metering event ids to return."}},"required":["eventIds"],"additionalProperties":false}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"events":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["events"],"type":"object"}}},"description":"Metering event search result"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"Metering event search result","summary":"Search Billing Metering Events"}},"/v1/billing/usage/query":{"post":{"operationId":"queryBillingUsage","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","description":"Inclusive ISO 8601 start of the range. Defaults to 30 days before `to`."},"groupBy":{"type":"array","items":{"type":"string","enum":["billingMode","chatId","eventType","managedIntegration","model","projectId","providerConnectionId","providerKind","runAttemptId","runId","sourceKind","taskId","usageEventId","userId"]},"description":"Dimensions to group usage by."},"projectId":{"type":"string","minLength":1},"to":{"type":"string","description":"Exclusive ISO 8601 end of the range. Defaults to now."},"window":{"type":"string","enum":["day","hour","month","total"],"description":"Time bucket for each usage item."}},"additionalProperties":false}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"from":{"type":"string"},"groupBy":{"items":{"type":"string"},"type":"array"},"items":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"to":{"type":"string"},"window":{"type":"string"}},"required":["from","groupBy","items","to","window"],"type":"object"}}},"description":"Grouped billing usage"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"Grouped billing usage","summary":"Query Billing Usage"}},"/v1/billing/usage/summary":{"get":{"operationId":"getBillingUsageSummary","parameters":[{"description":"Inclusive ISO 8601 start of the range.","in":"query","name":"from","required":false,"schema":{"type":"string"}},{"description":"Exclusive ISO 8601 end of the range.","in":"query","name":"to","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"dailySpend":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"remainingCreditsMicroUsd":{"type":"string"},"topModels":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"topUsers":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"totalCreditSpendMicroUsd":{"type":"string"}},"required":["dailySpend","remainingCreditsMicroUsd","topModels","topUsers","totalCreditSpendMicroUsd"],"type":"object"}}},"description":"Billing usage summary"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"Billing usage summary","summary":"Get Billing Usage Summary"}},"/v1/billing/credits/balance":{"get":{"operationId":"getBillingCreditBalance","parameters":[{"description":"Restrict to one billing entity.","in":"query","name":"entityId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"account":{"additionalProperties":false,"properties":{"platformId":{"type":"string"},"teamId":{"type":"string"}},"required":["platformId","teamId"],"type":"object"},"balance":{"additionalProperties":false,"properties":{"breakdown":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"customerId":{"type":"string"},"entityId":{"type":"string"},"featureId":{"type":"string"},"grantedMicroUsd":{"type":"string"},"maxPurchaseMicroUsd":{"anyOf":[{"type":"string"},{"type":"null"}]},"nextResetAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"overageAllowed":{"type":"boolean"},"remainingMicroUsd":{"type":"string"},"teamId":{"type":"string"},"unlimited":{"type":"boolean"},"usageMicroUsd":{"type":"string"}},"required":["featureId","overageAllowed","remainingMicroUsd","unlimited","usageMicroUsd"],"type":"object"}},"required":["account","balance"],"type":"object"}}},"description":"Billing credit balance"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"Billing credit balance","summary":"Get Billing Credit Balance"}},"/v1/billing/credits/ledger":{"get":{"operationId":"listBillingCreditLedger","parameters":[{"description":"Restrict to one billing entity.","in":"query","name":"entityId","required":false,"schema":{"type":"string"}},{"description":"Maximum number of items to return.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"account":{"additionalProperties":false,"properties":{"platformId":{"type":"string"},"teamId":{"type":"string"}},"required":["platformId","teamId"],"type":"object"},"ledgerEntries":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["account","ledgerEntries"],"type":"object"}}},"description":"Billing credit ledger"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"Billing credit ledger","summary":"List Billing Credit Ledger"}},"/v1/billing/plans":{"get":{"operationId":"listNativeBillingPlans","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"account":{"additionalProperties":false,"properties":{"platformId":{"type":"string"},"teamId":{"type":"string"}},"required":["platformId","teamId"],"type":"object"},"catalogVersion":{"type":"string"},"currentPlanKey":{"type":"string"},"plans":{"items":{"additionalProperties":false,"properties":{"canBuyTopUpCredits":{"type":"boolean"},"current":{"type":"boolean"},"dailyLoginCreditsMicroUsd":{"type":"string"},"includedMonthlyCreditsMicroUsd":{"type":"string"},"limits":{"additionalProperties":true,"type":"object"},"monthlyPriceCents":{"anyOf":[{"type":"number"},{"type":"null"}]},"name":{"type":"string"},"perSeat":{"type":"boolean"},"planKey":{"type":"string"}},"required":["name","planKey"],"type":"object"},"type":"array"}},"required":["account","catalogVersion","currentPlanKey","plans"],"type":"object"}}},"description":"Native billing plans"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"Native billing plans","summary":"List Native Billing Plans"}},"/v1/billing/subscription":{"get":{"operationId":"getNativeBillingSubscription","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"account":{"additionalProperties":false,"properties":{"platformId":{"type":"string"},"teamId":{"type":"string"}},"required":["platformId","teamId"],"type":"object"},"subscription":{"additionalProperties":false,"properties":{"billingProvider":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelAtPeriodEnd":{"type":"boolean"},"currentPeriodEnd":{"type":"string"},"currentPeriodStart":{"type":"string"},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"limits":{"additionalProperties":true,"type":"object"},"monthlyTotalCents":{"anyOf":[{"type":"number"},{"type":"null"}]},"plan":{"additionalProperties":false,"properties":{"canBuyTopUpCredits":{"type":"boolean"},"current":{"type":"boolean"},"dailyLoginCreditsMicroUsd":{"type":"string"},"includedMonthlyCreditsMicroUsd":{"type":"string"},"limits":{"additionalProperties":true,"type":"object"},"monthlyPriceCents":{"anyOf":[{"type":"number"},{"type":"null"}]},"name":{"type":"string"},"perSeat":{"type":"boolean"},"planKey":{"type":"string"}},"required":["name","planKey"],"type":"object"},"planKey":{"type":"string"},"seatQuantity":{"type":"integer"},"source":{"type":"string"},"status":{"type":"string"}},"required":["cancelAtPeriodEnd","plan","planKey","seatQuantity","source","status"],"type":"object"}},"required":["account","subscription"],"type":"object"}}},"description":"Native billing subscription"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"Native billing subscription","summary":"Get Native Billing Subscription"},"put":{"operationId":"changeNativeBillingSubscriptionPlan","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"idempotencyKey":{"type":"string"},"metadata":{"type":"object"},"planKey":{"type":"string","enum":["hobby","pro"]},"seatQuantity":{"anyOf":[{"anyOf":[{"type":"number"},{"enum":["NaN"],"type":"string"},{"enum":["Infinity"],"type":"string"},{"enum":["-Infinity"],"type":"string"}]},{"type":"string"}]}},"required":["planKey"],"additionalProperties":true}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"account":{"additionalProperties":false,"properties":{"platformId":{"type":"string"},"teamId":{"type":"string"}},"required":["platformId","teamId"],"type":"object"},"change":{"additionalProperties":true,"type":"object"},"subscription":{"additionalProperties":false,"properties":{"billingProvider":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelAtPeriodEnd":{"type":"boolean"},"currentPeriodEnd":{"type":"string"},"currentPeriodStart":{"type":"string"},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"limits":{"additionalProperties":true,"type":"object"},"monthlyTotalCents":{"anyOf":[{"type":"number"},{"type":"null"}]},"plan":{"additionalProperties":false,"properties":{"canBuyTopUpCredits":{"type":"boolean"},"current":{"type":"boolean"},"dailyLoginCreditsMicroUsd":{"type":"string"},"includedMonthlyCreditsMicroUsd":{"type":"string"},"limits":{"additionalProperties":true,"type":"object"},"monthlyPriceCents":{"anyOf":[{"type":"number"},{"type":"null"}]},"name":{"type":"string"},"perSeat":{"type":"boolean"},"planKey":{"type":"string"}},"required":["name","planKey"],"type":"object"},"planKey":{"type":"string"},"seatQuantity":{"type":"integer"},"source":{"type":"string"},"status":{"type":"string"}},"required":["cancelAtPeriodEnd","plan","planKey","seatQuantity","source","status"],"type":"object"}},"required":["account","change","subscription"],"type":"object"}}},"description":"Native subscription plan change"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"Native subscription plan change","summary":"Change Native Billing Subscription Plan"}},"/v1/billing/subscription/preview":{"post":{"operationId":"previewNativeBillingSubscription","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"planKey":{"type":"string","enum":["hobby","pro","admin","enterprise"]},"seatQuantity":{"anyOf":[{"anyOf":[{"type":"number"},{"enum":["NaN"],"type":"string"},{"enum":["Infinity"],"type":"string"},{"enum":["-Infinity"],"type":"string"}]},{"type":"string"}]}},"additionalProperties":true}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"account":{"additionalProperties":false,"properties":{"platformId":{"type":"string"},"teamId":{"type":"string"}},"required":["platformId","teamId"],"type":"object"},"catalogVersion":{"type":"string"},"change":{"additionalProperties":true,"type":"object"},"current":{"additionalProperties":false,"properties":{"billingProvider":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelAtPeriodEnd":{"type":"boolean"},"currentPeriodEnd":{"type":"string"},"currentPeriodStart":{"type":"string"},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"limits":{"additionalProperties":true,"type":"object"},"monthlyTotalCents":{"anyOf":[{"type":"number"},{"type":"null"}]},"plan":{"additionalProperties":false,"properties":{"canBuyTopUpCredits":{"type":"boolean"},"current":{"type":"boolean"},"dailyLoginCreditsMicroUsd":{"type":"string"},"includedMonthlyCreditsMicroUsd":{"type":"string"},"limits":{"additionalProperties":true,"type":"object"},"monthlyPriceCents":{"anyOf":[{"type":"number"},{"type":"null"}]},"name":{"type":"string"},"perSeat":{"type":"boolean"},"planKey":{"type":"string"}},"required":["name","planKey"],"type":"object"},"planKey":{"type":"string"},"seatQuantity":{"type":"integer"},"source":{"type":"string"},"status":{"type":"string"}},"required":["cancelAtPeriodEnd","plan","planKey","seatQuantity","source","status"],"type":"object"},"target":{"additionalProperties":true,"type":"object"}},"required":["account","catalogVersion","change","current","target"],"type":"object"}}},"description":"Native subscription change preview"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"Native subscription change preview","summary":"Preview Native Billing Subscription"}},"/v1/billing/subscription/cancel":{"post":{"operationId":"cancelNativeBillingSubscription","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"idempotencyKey":{"type":"string"},"metadata":{"type":"object"}},"additionalProperties":true}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"account":{"additionalProperties":false,"properties":{"platformId":{"type":"string"},"teamId":{"type":"string"}},"required":["platformId","teamId"],"type":"object"},"change":{"additionalProperties":true,"type":"object"},"subscription":{"additionalProperties":false,"properties":{"billingProvider":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelAtPeriodEnd":{"type":"boolean"},"currentPeriodEnd":{"type":"string"},"currentPeriodStart":{"type":"string"},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"limits":{"additionalProperties":true,"type":"object"},"monthlyTotalCents":{"anyOf":[{"type":"number"},{"type":"null"}]},"plan":{"additionalProperties":false,"properties":{"canBuyTopUpCredits":{"type":"boolean"},"current":{"type":"boolean"},"dailyLoginCreditsMicroUsd":{"type":"string"},"includedMonthlyCreditsMicroUsd":{"type":"string"},"limits":{"additionalProperties":true,"type":"object"},"monthlyPriceCents":{"anyOf":[{"type":"number"},{"type":"null"}]},"name":{"type":"string"},"perSeat":{"type":"boolean"},"planKey":{"type":"string"}},"required":["name","planKey"],"type":"object"},"planKey":{"type":"string"},"seatQuantity":{"type":"integer"},"source":{"type":"string"},"status":{"type":"string"}},"required":["cancelAtPeriodEnd","plan","planKey","seatQuantity","source","status"],"type":"object"}},"required":["account","change","subscription"],"type":"object"}}},"description":"Native subscription cancellation"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"Native subscription cancellation","summary":"Cancel Native Billing Subscription"}},"/v1/billing/subscription/resume":{"post":{"operationId":"resumeNativeBillingSubscription","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"idempotencyKey":{"type":"string"},"metadata":{"type":"object"}},"additionalProperties":true}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"account":{"additionalProperties":false,"properties":{"platformId":{"type":"string"},"teamId":{"type":"string"}},"required":["platformId","teamId"],"type":"object"},"change":{"additionalProperties":true,"type":"object"},"subscription":{"additionalProperties":false,"properties":{"billingProvider":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelAtPeriodEnd":{"type":"boolean"},"currentPeriodEnd":{"type":"string"},"currentPeriodStart":{"type":"string"},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"limits":{"additionalProperties":true,"type":"object"},"monthlyTotalCents":{"anyOf":[{"type":"number"},{"type":"null"}]},"plan":{"additionalProperties":false,"properties":{"canBuyTopUpCredits":{"type":"boolean"},"current":{"type":"boolean"},"dailyLoginCreditsMicroUsd":{"type":"string"},"includedMonthlyCreditsMicroUsd":{"type":"string"},"limits":{"additionalProperties":true,"type":"object"},"monthlyPriceCents":{"anyOf":[{"type":"number"},{"type":"null"}]},"name":{"type":"string"},"perSeat":{"type":"boolean"},"planKey":{"type":"string"}},"required":["name","planKey"],"type":"object"},"planKey":{"type":"string"},"seatQuantity":{"type":"integer"},"source":{"type":"string"},"status":{"type":"string"}},"required":["cancelAtPeriodEnd","plan","planKey","seatQuantity","source","status"],"type":"object"}},"required":["account","change","subscription"],"type":"object"}}},"description":"Native subscription resumption"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"Native subscription resumption","summary":"Resume Native Billing Subscription"}},"/v1/billing/controls":{"get":{"operationId":"getBillingControls","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"autoTopUps":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"balance":{"additionalProperties":true,"type":"object"},"lowBalanceAlerts":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"postpaidUsage":{"additionalProperties":true,"type":"object"},"spendLimits":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["autoTopUps","balance","lowBalanceAlerts","postpaidUsage","spendLimits"],"type":"object"}}},"description":"Billing controls"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"Billing controls","summary":"Get Billing Controls"}},"/v1/billing/invoices":{"get":{"operationId":"listBillingInvoices","parameters":[{"description":"Inclusive ISO 8601 start of the range.","in":"query","name":"from","required":false,"schema":{"type":"string"}},{"description":"Exclusive ISO 8601 end of the range.","in":"query","name":"to","required":false,"schema":{"type":"string"}},{"description":"Restrict to one invoice status.","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"description":"Maximum number of items to return.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"invoices":{"items":{"additionalProperties":false,"properties":{"amountMicroUsd":{"type":"string"},"createdAt":{"type":"string"},"currency":{"type":"string"},"invoiceId":{"type":"string"},"lineItems":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"periodEnd":{"anyOf":[{"type":"string"},{"type":"null"}]},"periodStart":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"stripeInvoiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripeInvoiceUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"synthetic":{"type":"boolean"}},"required":["amountMicroUsd","currency","invoiceId","status"],"type":"object"},"type":"array"}},"required":["invoices"],"type":"object"}}},"description":"Billing invoices"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"Billing invoices","summary":"List Billing Invoices"}},"/v1/billing/invoices/upcoming":{"get":{"operationId":"getUpcomingBillingInvoice","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"amountMicroUsd":{"type":"string"},"createdAt":{"type":"string"},"currency":{"type":"string"},"invoiceId":{"type":"string"},"lineItems":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"periodEnd":{"anyOf":[{"type":"string"},{"type":"null"}]},"periodStart":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"stripeInvoiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripeInvoiceUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"synthetic":{"type":"boolean"}},"required":["amountMicroUsd","currency","invoiceId","status"],"type":"object"}}},"description":"Upcoming billing invoice"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"Upcoming billing invoice","summary":"Get Upcoming Billing Invoice"}},"/v1/billing/invoices/{invoiceId}":{"get":{"operationId":"getBillingInvoice","parameters":[{"in":"path","name":"invoiceId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"properties":{"amountMicroUsd":{"type":"string"},"createdAt":{"type":"string"},"currency":{"type":"string"},"invoiceId":{"type":"string"},"lineItems":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"periodEnd":{"anyOf":[{"type":"string"},{"type":"null"}]},"periodStart":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"stripeInvoiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripeInvoiceUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"synthetic":{"type":"boolean"}},"required":["amountMicroUsd","currency","invoiceId","status"],"type":"object"},{"type":"null"}]}}},"description":"Billing invoice"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"Billing invoice","summary":"Get Billing Invoice"}},"/v1/billing/usage/check":{"post":{"operationId":"checkBillingUsage","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"entityId":{"anyOf":[{"type":"string"},{"type":"null"}]},"featureId":{"type":"string"},"idempotencyKey":{"type":"string"},"properties":{"type":"object"},"requiredBalance":{"type":"number"},"requiredBalanceMicroUsd":{"type":"number"},"sendEvent":{"type":"boolean"}},"additionalProperties":false}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"allowed":{"type":"boolean"},"balance":{"additionalProperties":false,"properties":{"breakdown":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"customerId":{"type":"string"},"entityId":{"type":"string"},"featureId":{"type":"string"},"grantedMicroUsd":{"type":"string"},"maxPurchaseMicroUsd":{"anyOf":[{"type":"string"},{"type":"null"}]},"nextResetAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"overageAllowed":{"type":"boolean"},"remainingMicroUsd":{"type":"string"},"teamId":{"type":"string"},"unlimited":{"type":"boolean"},"usageMicroUsd":{"type":"string"}},"required":["featureId","overageAllowed","remainingMicroUsd","unlimited","usageMicroUsd"],"type":"object"},"balances":{"additionalProperties":true,"type":"object"},"customerId":{"type":"string"},"entityId":{"type":"string"},"featureId":{"type":"string"},"requiredBalanceMicroUsd":{"type":"string"}},"required":["allowed","balance","balances","customerId","entityId","featureId","requiredBalanceMicroUsd"],"type":"object"}}},"description":"Usage check result"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"Usage check result","summary":"Check Billing Usage"}},"/v1/billing/alerts":{"get":{"operationId":"listBillingUsageAlerts","parameters":[{"description":"Restrict to one billing feature.","in":"query","name":"featureId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"featureId":{"type":"string"},"id":{"type":"string"},"lastTriggeredAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"thresholdMicroUsd":{"type":"string"}},"required":["enabled","featureId","id","thresholdMicroUsd"],"type":"object"},"type":"array"}}},"description":"Usage alerts"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"Usage alerts","summary":"List Billing Usage Alerts"},"post":{"operationId":"upsertBillingUsageAlert","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}]},"featureId":{"type":"string"},"id":{"type":"string"},"metadata":{"type":"object"},"thresholdMicroUsd":{"type":"number"}},"required":["thresholdMicroUsd"],"additionalProperties":false}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"featureId":{"type":"string"},"id":{"type":"string"},"lastTriggeredAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"thresholdMicroUsd":{"type":"string"}},"required":["enabled","featureId","id","thresholdMicroUsd"],"type":"object"},{"type":"null"}]}}},"description":"Usage alert"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"Usage alert","summary":"Upsert Billing Usage Alert"},"delete":{"operationId":"deleteBillingUsageAlert","parameters":[{"description":"Id of the usage alert to delete.","in":"query","name":"id","required":true,"schema":{"type":"string"}},{"description":"Restrict to one billing feature.","in":"query","name":"featureId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"featureId":{"type":"string"},"id":{"type":"string"},"lastTriggeredAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"thresholdMicroUsd":{"type":"string"}},"required":["enabled","featureId","id","thresholdMicroUsd"],"type":"object"},{"type":"null"}]}}},"description":"Deleted usage alert"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"Deleted usage alert","summary":"Delete Billing Usage Alert"}},"/v1/billing/spend-limits":{"get":{"operationId":"listBillingSpendLimits","parameters":[{"description":"Restrict to one billing feature.","in":"query","name":"featureId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"featureId":{"type":"string"},"id":{"type":"string"},"limitMicroUsd":{"type":"string"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"period":{"type":"string"}},"required":["enabled","featureId","id","limitMicroUsd","period"],"type":"object"},"type":"array"}}},"description":"Spend limits"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"Spend limits","summary":"List Billing Spend Limits"},"post":{"operationId":"upsertBillingSpendLimit","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}]},"featureId":{"type":"string"},"id":{"type":"string"},"limitMicroUsd":{"type":"number"},"metadata":{"type":"object"},"period":{"type":"string","enum":["billing_period","day","lifetime","month"]}},"required":["limitMicroUsd"],"additionalProperties":false}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"featureId":{"type":"string"},"id":{"type":"string"},"limitMicroUsd":{"type":"string"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"period":{"type":"string"}},"required":["enabled","featureId","id","limitMicroUsd","period"],"type":"object"},{"type":"null"}]}}},"description":"Spend limit"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"Spend limit","summary":"Upsert Billing Spend Limit"},"delete":{"operationId":"deleteBillingSpendLimit","parameters":[{"description":"Id of the spend limit to delete.","in":"query","name":"id","required":true,"schema":{"type":"string"}},{"description":"Restrict to one billing feature.","in":"query","name":"featureId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"featureId":{"type":"string"},"id":{"type":"string"},"limitMicroUsd":{"type":"string"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"period":{"type":"string"}},"required":["enabled","featureId","id","limitMicroUsd","period"],"type":"object"},{"type":"null"}]}}},"description":"Deleted spend limit"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"Deleted spend limit","summary":"Delete Billing Spend Limit"}},"/v1/billing/features":{"get":{"operationId":"listBillingFeatures","responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"properties":{"featureId":{"type":"string"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"name":{"type":"string"},"unitName":{"type":"string"}},"required":["featureId","name"],"type":"object"},"type":"array"}}},"description":"Billing features"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"Billing features","summary":"List Billing Features"}},"/v1/billing/entities":{"get":{"operationId":"listBillingEntities","parameters":[{"description":"Restrict to one billing feature.","in":"query","name":"featureId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"properties":{"createdAt":{"type":"string"},"entityId":{"type":"string"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["entityId"],"type":"object"},"type":"array"}}},"description":"Billing entities"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"Billing entities","summary":"List Billing Entities"}},"/v1/billing/rewards":{"get":{"operationId":"listBillingRewards","responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}}},"description":"Billing rewards"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"Billing rewards","summary":"List Billing Rewards"}},"/v1/billing/reward-programs":{"get":{"operationId":"listBillingRewardPrograms","responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}}},"description":"Billing reward programs"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"Billing reward programs","summary":"List Billing Reward Programs"}},"/v1/billing/referrals/overview":{"get":{"operationId":"getBillingReferralOverview","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"recent":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"rewardAmount":{"type":"string"},"rewardAmountMicroUsd":{"type":"string"},"shareUrl":{"type":"string"},"stats":{"additionalProperties":true,"type":"object"},"token":{"type":"string"}},"required":["recent","rewardAmount","rewardAmountMicroUsd","shareUrl","stats","token"],"type":"object"}}},"description":"Billing referral overview"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"Billing referral overview","summary":"Get Billing Referral Overview"}},"/v1/billing/auto-top-ups":{"get":{"operationId":"listBillingAutoTopUps","parameters":[{"description":"Restrict to one billing feature.","in":"query","name":"featureId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"featureId":{"type":"string"},"id":{"type":"string"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"thresholdMicroUsd":{"type":"string"},"topUpMicroUsd":{"type":"string"}},"required":["enabled","featureId","id","thresholdMicroUsd","topUpMicroUsd"],"type":"object"},"type":"array"}}},"description":"Billing auto top-ups"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"Billing auto top-ups","summary":"List Billing Auto Top Ups"},"post":{"operationId":"upsertBillingAutoTopUp","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"featureId":{"type":"string","minLength":1},"idempotencyKey":{"type":"string"},"metadata":{"type":"object"},"thresholdMicroUsd":{"type":"integer","minimum":0,"maximum":9007199254740991},"topUpMicroUsd":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"additionalProperties":false}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"featureId":{"type":"string"},"id":{"type":"string"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"thresholdMicroUsd":{"type":"string"},"topUpMicroUsd":{"type":"string"}},"required":["enabled","featureId","id","thresholdMicroUsd","topUpMicroUsd"],"type":"object"}}},"description":"Billing auto top-up"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or team binding","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request body","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Billing"],"description":"Billing auto top-up","summary":"Upsert Billing Auto Top Up"}},"/v1/schedules":{"get":{"operationId":"listSchedules","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"schedules":{"items":{"type":"object","properties":{"catchupWindow":{"anyOf":[{"type":"string"},{"type":"null"}]},"scheduleId":{"type":"string"},"platformId":{"type":"string"},"teamId":{"type":"string","minLength":1},"projectId":{"type":"string","minLength":1},"workflowName":{"type":"string"},"activityName":{"type":"string"},"payload":{},"spec":{"type":"object","properties":{"cron":{"type":"array","items":{"type":"string"}},"intervalMs":{"anyOf":[{"type":"number"},{"enum":["NaN"],"type":"string"},{"enum":["Infinity"],"type":"string"},{"enum":["-Infinity"],"type":"string"}]},"timezone":{"type":"string"}},"additionalProperties":false},"taskQueue":{"type":"string"},"target":{"anyOf":[{"type":"object","properties":{"activityName":{"type":"string"},"kind":{"type":"string","enum":["durable_action"]},"workflowName":{"type":"string"},"version":{"type":"number","enum":[1]}},"required":["activityName","kind","workflowName","version"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["product_run"]},"version":{"type":"number","enum":[1]}},"required":["kind","version"],"additionalProperties":false},{"type":"object","properties":{"occurrencePolicy":{"type":"string","enum":["allow_all","buffer_all","buffer_one","skip"]},"workflowId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["workflow"]},"revisionPolicy":{"type":"string","enum":["follow_current","pinned"]},"bootstrap":{},"version":{"type":"number","enum":[1]},"workflowContentSha256":{"type":"string"},"workflowRevisionId":{"type":"string","minLength":1}},"required":["occurrencePolicy","workflowId","kind","revisionPolicy","version"],"additionalProperties":false}]},"overlap":{"type":"string","enum":["skip","buffer-one","buffer-all","allow-all","cancel-other","terminate-other"]},"createdAt":{"anyOf":[{"type":"string"},{"type":"string"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string"}]},"scheduleInstanceId":{"type":"string"}},"required":["scheduleId","workflowName","activityName","spec"],"additionalProperties":false},"type":"array"}},"required":["schedules"],"type":"object"}}},"description":"List of registered schedules"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Scheduled"],"description":"List of registered schedules","summary":"List Schedules"},"post":{"operationId":"createSchedule","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"catchupWindow":{"type":"string","minLength":1,"maxLength":64},"overlap":{"type":"string","enum":["skip","buffer-one","buffer-all","allow-all","cancel-other","terminate-other"]},"payload":{},"spec":{"type":"object","properties":{"cron":{"type":"array","items":{"type":"string","minLength":1}},"intervalMs":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"timezone":{"type":"string","minLength":1}},"additionalProperties":false},"target":{"anyOf":[{"type":"object","properties":{"activityName":{"type":"string","minLength":1,"maxLength":256},"kind":{"type":"string","enum":["durable_action"]},"workflowName":{"type":"string","minLength":1,"maxLength":256}},"required":["activityName","kind","workflowName"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["product_run"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"occurrencePolicy":{"type":"string","enum":["allow_all","buffer_all","buffer_one","skip"]},"workflowId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["workflow"]},"revisionPolicy":{"type":"string","enum":["follow_current"]}},"required":["occurrencePolicy","workflowId","kind","revisionPolicy"],"additionalProperties":false},{"type":"object","properties":{"occurrencePolicy":{"type":"string","enum":["allow_all","buffer_all","buffer_one","skip"]},"workflowId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["workflow"]},"revisionPolicy":{"type":"string","enum":["pinned"]},"workflowContentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"workflowRevisionId":{"type":"string","minLength":1}},"required":["occurrencePolicy","workflowId","kind","revisionPolicy","workflowContentSha256","workflowRevisionId"],"additionalProperties":false}]},"taskQueue":{"type":"string","minLength":1,"maxLength":256},"scheduleId":{"type":"string","minLength":1,"maxLength":256}},"required":["payload","spec","target","scheduleId"],"additionalProperties":false}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"mode":{"type":"string"},"scheduleId":{"type":"string"}},"required":["mode","scheduleId"],"type":"object"}}},"description":"Schedule created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid JSON","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Schedule scope or lifecycle conflict","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Validation error","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Scheduled"],"description":"Schedule created","summary":"Create Schedule"}},"/v1/schedules/{scheduleId}/firings":{"get":{"operationId":"listScheduleFirings","parameters":[{"in":"path","name":"scheduleId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"firings":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["firings"],"type":"object"}}},"description":"Schedule firing history"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Schedule not found","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Scheduled"],"description":"Schedule firing history","summary":"List Schedule Firings"}},"/v1/schedules/{scheduleId}":{"get":{"operationId":"getSchedule","parameters":[{"in":"path","name":"scheduleId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"schedule":{"type":"object","properties":{"catchupWindow":{"anyOf":[{"type":"string"},{"type":"null"}]},"scheduleId":{"type":"string"},"platformId":{"type":"string"},"teamId":{"type":"string","minLength":1},"projectId":{"type":"string","minLength":1},"workflowName":{"type":"string"},"activityName":{"type":"string"},"payload":{},"spec":{"type":"object","properties":{"cron":{"type":"array","items":{"type":"string"}},"intervalMs":{"anyOf":[{"type":"number"},{"enum":["NaN"],"type":"string"},{"enum":["Infinity"],"type":"string"},{"enum":["-Infinity"],"type":"string"}]},"timezone":{"type":"string"}},"additionalProperties":false},"taskQueue":{"type":"string"},"target":{"anyOf":[{"type":"object","properties":{"activityName":{"type":"string"},"kind":{"type":"string","enum":["durable_action"]},"workflowName":{"type":"string"},"version":{"type":"number","enum":[1]}},"required":["activityName","kind","workflowName","version"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["product_run"]},"version":{"type":"number","enum":[1]}},"required":["kind","version"],"additionalProperties":false},{"type":"object","properties":{"occurrencePolicy":{"type":"string","enum":["allow_all","buffer_all","buffer_one","skip"]},"workflowId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["workflow"]},"revisionPolicy":{"type":"string","enum":["follow_current","pinned"]},"bootstrap":{},"version":{"type":"number","enum":[1]},"workflowContentSha256":{"type":"string"},"workflowRevisionId":{"type":"string","minLength":1}},"required":["occurrencePolicy","workflowId","kind","revisionPolicy","version"],"additionalProperties":false}]},"overlap":{"type":"string","enum":["skip","buffer-one","buffer-all","allow-all","cancel-other","terminate-other"]},"createdAt":{"anyOf":[{"type":"string"},{"type":"string"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string"}]},"scheduleInstanceId":{"type":"string"}},"required":["scheduleId","workflowName","activityName","spec"],"additionalProperties":false}},"required":["schedule"],"type":"object"}}},"description":"Schedule description"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Schedule not found","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Scheduled"],"description":"Schedule description","summary":"Get Schedule"},"put":{"operationId":"updateSchedule","parameters":[{"in":"path","name":"scheduleId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1},"catchupWindow":{"type":"string","minLength":1,"maxLength":64},"overlap":{"type":"string","enum":["skip","buffer-one","buffer-all","allow-all","cancel-other","terminate-other"]},"payload":{},"spec":{"type":"object","properties":{"cron":{"type":"array","items":{"type":"string","minLength":1}},"intervalMs":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"timezone":{"type":"string","minLength":1}},"additionalProperties":false},"target":{"anyOf":[{"type":"object","properties":{"activityName":{"type":"string","minLength":1,"maxLength":256},"kind":{"type":"string","enum":["durable_action"]},"workflowName":{"type":"string","minLength":1,"maxLength":256}},"required":["activityName","kind","workflowName"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["product_run"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"occurrencePolicy":{"type":"string","enum":["allow_all","buffer_all","buffer_one","skip"]},"workflowId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["workflow"]},"revisionPolicy":{"type":"string","enum":["follow_current"]}},"required":["occurrencePolicy","workflowId","kind","revisionPolicy"],"additionalProperties":false},{"type":"object","properties":{"occurrencePolicy":{"type":"string","enum":["allow_all","buffer_all","buffer_one","skip"]},"workflowId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["workflow"]},"revisionPolicy":{"type":"string","enum":["pinned"]},"workflowContentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"workflowRevisionId":{"type":"string","minLength":1}},"required":["occurrencePolicy","workflowId","kind","revisionPolicy","workflowContentSha256","workflowRevisionId"],"additionalProperties":false}]},"taskQueue":{"type":"string","minLength":1,"maxLength":256}},"required":["payload","spec","target"],"additionalProperties":false}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"schedule":{"type":"object","properties":{"catchupWindow":{"anyOf":[{"type":"string"},{"type":"null"}]},"scheduleId":{"type":"string"},"platformId":{"type":"string"},"teamId":{"type":"string","minLength":1},"projectId":{"type":"string","minLength":1},"workflowName":{"type":"string"},"activityName":{"type":"string"},"payload":{},"spec":{"type":"object","properties":{"cron":{"type":"array","items":{"type":"string"}},"intervalMs":{"anyOf":[{"type":"number"},{"enum":["NaN"],"type":"string"},{"enum":["Infinity"],"type":"string"},{"enum":["-Infinity"],"type":"string"}]},"timezone":{"type":"string"}},"additionalProperties":false},"taskQueue":{"type":"string"},"target":{"anyOf":[{"type":"object","properties":{"activityName":{"type":"string"},"kind":{"type":"string","enum":["durable_action"]},"workflowName":{"type":"string"},"version":{"type":"number","enum":[1]}},"required":["activityName","kind","workflowName","version"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["product_run"]},"version":{"type":"number","enum":[1]}},"required":["kind","version"],"additionalProperties":false},{"type":"object","properties":{"occurrencePolicy":{"type":"string","enum":["allow_all","buffer_all","buffer_one","skip"]},"workflowId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["workflow"]},"revisionPolicy":{"type":"string","enum":["follow_current","pinned"]},"bootstrap":{},"version":{"type":"number","enum":[1]},"workflowContentSha256":{"type":"string"},"workflowRevisionId":{"type":"string","minLength":1}},"required":["occurrencePolicy","workflowId","kind","revisionPolicy","version"],"additionalProperties":false}]},"overlap":{"type":"string","enum":["skip","buffer-one","buffer-all","allow-all","cancel-other","terminate-other"]},"createdAt":{"anyOf":[{"type":"string"},{"type":"string"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string"}]},"scheduleInstanceId":{"type":"string"}},"required":["scheduleId","workflowName","activityName","spec"],"additionalProperties":false}},"required":["schedule"],"type":"object"}}},"description":"Schedule updated"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Schedule not found","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Schedule scope or lifecycle conflict","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Validation error","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Scheduled"],"description":"Schedule updated","summary":"Update Schedule"},"delete":{"operationId":"deleteSchedule","parameters":[{"in":"path","name":"scheduleId","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Schedule deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Schedule scope or lifecycle conflict","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Validation error","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Scheduled"],"description":"Schedule deleted","summary":"Delete Schedule"}},"/v1/schedules/{scheduleId}/trigger":{"post":{"operationId":"triggerSchedule","parameters":[{"in":"path","name":"scheduleId","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Schedule triggered"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Schedule scope or lifecycle conflict","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Schedule cannot be triggered through this operation","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Scheduled"],"description":"Schedule triggered","summary":"Trigger Schedule"}},"/v1/webhooks/custom":{"post":{"operationId":"ingestCustomWebhook","requestBody":{"content":{"application/json":{"schema":{}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"ingested":{"type":"integer","minimum":0,"maximum":9007199254740991},"eventIds":{"type":"array","items":{"type":"string","minLength":1}}},"required":["ok","ingested","eventIds"],"additionalProperties":false}}},"description":"Webhook events ingested"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid JSON or too many events","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability, team binding, or permission","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Webhooks"],"description":"Webhook events ingested","summary":"Ingest Custom Webhook"}},"/v1/workflows/templates":{"get":{"operationId":"listWorkflowTemplates","responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"templates":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["prompt-chaining","routing","parallelization","orchestrator-workers","evaluator-optimizer","classify-and-act","fan-out-and-synthesize","adversarial-verification","generate-and-filter","tournament","loop-until-done"]},"name":{"type":"string","minLength":1},"summary":{"type":"string","minLength":1},"family":{"type":"string","minLength":1},"aliases":{"type":"array","items":{"type":"string","minLength":1}},"guidance":{"type":"string","minLength":1},"planDescription":{"type":"string","minLength":1}},"required":["type","name","summary","family","guidance","planDescription"],"additionalProperties":false}}},"required":["templates"],"additionalProperties":false}}},"description":"Workflow Plan authoring references"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Workflows"],"description":"Workflow Plan authoring references","summary":"List Workflow Templates"}},"/v1/workflows/catalog":{"get":{"operationId":"listFirstPartyWorkflowCatalog","responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"templates":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1},"slug":{"type":"string","minLength":1},"summary":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"version":{"type":"string","minLength":1}},"required":["description","slug","summary","title","version"],"additionalProperties":false}}},"required":["templates"],"additionalProperties":false}}},"description":"First-party workflow templates that can be instantiated as private copies"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Workflows"],"description":"First-party workflow templates that can be instantiated as private copies","summary":"List First Party Workflow Catalog"}},"/v1/workflows/catalog/{slug}/instantiate":{"post":{"operationId":"instantiateFirstPartyWorkflowTemplate","parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1},"visibility":{"type":"string","enum":["private","project","team"]}},"additionalProperties":false}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"type":"object","properties":{"contentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"revisionId":{"type":"string","minLength":1},"revisionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"planSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"status":{"type":"string","enum":["created","unchanged"]},"templateSlug":{"type":"string"},"templateVersion":{"type":"string"},"title":{"type":"string"},"visibility":{"type":"string","enum":["private","project","team"]},"workflowId":{"type":"string","minLength":1}},"required":["contentSha256","description","revisionId","revisionNumber","planSha256","status","templateSlug","templateVersion","title","visibility","workflowId"],"additionalProperties":false}}},"description":"Instantiated team-owned Workflow from a first-party template"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid JSON","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or action permission","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Template not found","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid template Workflow Plan","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Workflow execution runtime unavailable","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Workflows"],"description":"Instantiated team-owned Workflow from a first-party template","summary":"Instantiate First Party Workflow Template"}},"/v1/workflows/prompts":{"post":{"operationId":"createWorkflowPrompt","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["prompt-chaining","routing","parallelization","orchestrator-workers","evaluator-optimizer","classify-and-act","fan-out-and-synthesize","adversarial-verification","generate-and-filter","tournament","loop-until-done"]},"goal":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"outputDir":{"type":"string","minLength":1},"constraints":{"type":"array","items":{"type":"string","minLength":1}},"model":{"type":"string","minLength":1},"maxSteps":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["goal"],"additionalProperties":false}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"object","properties":{"system":{"type":"string","minLength":1},"user":{"type":"string","minLength":1}},"required":["system","user"],"additionalProperties":false},"template":{"type":"object","properties":{"type":{"type":"string","enum":["prompt-chaining","routing","parallelization","orchestrator-workers","evaluator-optimizer","classify-and-act","fan-out-and-synthesize","adversarial-verification","generate-and-filter","tournament","loop-until-done"]},"name":{"type":"string","minLength":1},"summary":{"type":"string","minLength":1},"family":{"type":"string","minLength":1},"aliases":{"type":"array","items":{"type":"string","minLength":1}},"guidance":{"type":"string","minLength":1},"planDescription":{"type":"string","minLength":1}},"required":["type","name","summary","family","guidance","planDescription"],"additionalProperties":false},"templates":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["prompt-chaining","routing","parallelization","orchestrator-workers","evaluator-optimizer","classify-and-act","fan-out-and-synthesize","adversarial-verification","generate-and-filter","tournament","loop-until-done"]},"name":{"type":"string","minLength":1},"summary":{"type":"string","minLength":1},"family":{"type":"string","minLength":1},"aliases":{"type":"array","items":{"type":"string","minLength":1}},"guidance":{"type":"string","minLength":1},"planDescription":{"type":"string","minLength":1}},"required":["type","name","summary","family","guidance","planDescription"],"additionalProperties":false}}},"required":["prompt","templates"],"additionalProperties":false}}},"description":"Workflow Plan authoring prompt"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid JSON","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Validation error","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Workflows"],"description":"Workflow Plan authoring prompt","summary":"Create Workflow Prompt"}},"/v1/workflows":{"post":{"operationId":"publishWorkflow","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"plan":{"type":"object","properties":{"version":{"type":"string","enum":["1"]},"goal":{"type":"string"},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"pattern":"^(?!(?:__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__proto__|constructor|hasOwnProperty|isPrototypeOf|propertyIsEnumerable|prototype|toJSON|toLocaleString|toString|valueOf)$)[A-Za-z0-9][A-Za-z0-9._:-]*$"},"task":{"type":"string","minLength":1,"pattern":"^(?!(?:__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__proto__|constructor|hasOwnProperty|isPrototypeOf|propertyIsEnumerable|prototype|toJSON|toLocaleString|toString|valueOf)$)[A-Za-z0-9][A-Za-z0-9._:-]*$"},"taskVersion":{"type":"string","minLength":1},"description":{"type":"string"},"input":{"$ref":"#/components/schemas/WorkflowJsonValue_fdf687c7","description":"A finite, acyclic JSON value no deeper than 256 levels"},"deps":{"type":"object","additionalProperties":{"type":"string","minLength":1,"pattern":"^(?!(?:__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__proto__|constructor|hasOwnProperty|isPrototypeOf|propertyIsEnumerable|prototype|toJSON|toLocaleString|toString|valueOf)$)[A-Za-z0-9][A-Za-z0-9._:-]*$"},"propertyNames":{"type":"string","minLength":1,"pattern":"^(?!(?:__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__proto__|constructor|hasOwnProperty|isPrototypeOf|propertyIsEnumerable|prototype|toJSON|toLocaleString|toString|valueOf)$)[A-Za-z0-9][A-Za-z0-9._:-]*$"}}},"required":["id","task","taskVersion","deps"],"additionalProperties":false},"minItems":1}},"required":["version","nodes"],"additionalProperties":false},"title":{"type":"string","minLength":1},"visibility":{"type":"string","enum":["private","project","team"]}},"required":["plan","title"],"additionalProperties":false}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"type":"object","properties":{"contentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"revisionId":{"type":"string","minLength":1},"revisionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"planSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"status":{"type":"string","enum":["created","unchanged"]},"title":{"type":"string"},"visibility":{"type":"string","enum":["private","project","team"]},"workflowId":{"type":"string","minLength":1}},"required":["contentSha256","description","revisionId","revisionNumber","planSha256","status","title","visibility","workflowId"],"additionalProperties":false}}},"description":"Published Workflow and immutable first revision"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid JSON","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or action permission","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Workflow publication conflict","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid Workflow Plan","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Workflow execution runtime unavailable","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Workflows"],"description":"Published Workflow and immutable first revision","summary":"Publish Workflow"},"get":{"operationId":"listWorkflows","parameters":[{"description":"Maximum number of items to return (1-200).","in":"query","name":"limit","required":false,"schema":{"maximum":200,"minimum":1,"type":"integer"}},{"description":"Opaque `nextCursor` value from the previous page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"totalCount":{"type":"integer","minimum":0},"workflows":{"type":"array","items":{"type":"object","properties":{"summary":{"type":"object","properties":{"attention":{"type":"object","properties":{"pendingCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["pendingCount"],"additionalProperties":false},"controllers":{"type":"array","items":{"type":"object","properties":{"admissionStatus":{"type":"string","enum":["active","paused","finished"]},"lastAdmissionOutcome":{"anyOf":[{"type":"string","enum":["accepted","skipped","coalesced"]},{"type":"null"}]},"status":{"type":"string","enum":["initializing","active","paused","completed","failed","cancelled"]},"workflowRunId":{"type":"string","minLength":1}},"required":["admissionStatus","lastAdmissionOutcome","status","workflowRunId"],"additionalProperties":false}},"freshness":{"type":"object","properties":{"readAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"status":{"type":"string","enum":["complete","partial"]}},"required":["readAt","status"],"additionalProperties":false},"latestResult":{"anyOf":[{"type":"object","properties":{"completedAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},{"type":"null"}]},"firedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"firingId":{"type":"string"},"outcome":{"type":"string","enum":["executed","skipped","coalesced"]},"scheduleId":{"type":"string"},"status":{"type":"string","enum":["pending","completed","failed"]},"workflowRunId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["completedAt","firedAt","firingId","outcome","scheduleId","status","workflowRunId"],"additionalProperties":false},{"type":"null"}]},"nextTiming":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["none"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"kind":{"type":"string","enum":["estimate"]},"label":{"type":"string"}},"required":["at","kind","label"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["unknown"]},"reason":{"type":"string"}},"required":["kind","reason"],"additionalProperties":false}]}},"required":["attention","controllers","freshness","latestResult","nextTiming"],"additionalProperties":false},"workflow":{"type":"object","properties":{"id":{"type":"string","minLength":1},"projectId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ownerUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"type":"string","enum":["private","project","team"]},"currentRevisionId":{"type":"string","minLength":1},"lockVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"metadata":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/WorkflowJsonValue_fdf687c7"}},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"updatedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"archivedAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},{"type":"null"}]}},"required":["id","projectId","ownerUserId","title","description","visibility","currentRevisionId","lockVersion","metadata","createdByUserId","createdAt","updatedAt","archivedAt"],"additionalProperties":false},"revision":{"type":"object","properties":{"id":{"type":"string","minLength":1},"workflowId":{"type":"string","minLength":1},"revisionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"planVersion":{"type":"string","enum":["1"]},"goal":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"taskRegistryId":{"type":"string"},"taskRegistryManifestSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"metadata":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/WorkflowJsonValue_fdf687c7"}},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"}},"required":["id","workflowId","revisionNumber","planVersion","goal","contentSha256","taskRegistryId","taskRegistryManifestSha256","metadata","createdByUserId","createdAt"],"additionalProperties":false},"plan":{"type":"object","properties":{"version":{"type":"string","enum":["1"]},"goal":{"type":"string"},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"pattern":"^(?!(?:__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__proto__|constructor|hasOwnProperty|isPrototypeOf|propertyIsEnumerable|prototype|toJSON|toLocaleString|toString|valueOf)$)[A-Za-z0-9][A-Za-z0-9._:-]*$"},"task":{"type":"string","minLength":1,"pattern":"^(?!(?:__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__proto__|constructor|hasOwnProperty|isPrototypeOf|propertyIsEnumerable|prototype|toJSON|toLocaleString|toString|valueOf)$)[A-Za-z0-9][A-Za-z0-9._:-]*$"},"taskVersion":{"type":"string","minLength":1},"description":{"type":"string"},"input":{"$ref":"#/components/schemas/WorkflowJsonValue_fdf687c7","description":"A finite, acyclic JSON value no deeper than 256 levels"},"deps":{"type":"object","additionalProperties":{"type":"string","minLength":1,"pattern":"^(?!(?:__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__proto__|constructor|hasOwnProperty|isPrototypeOf|propertyIsEnumerable|prototype|toJSON|toLocaleString|toString|valueOf)$)[A-Za-z0-9][A-Za-z0-9._:-]*$"},"propertyNames":{"type":"string","minLength":1,"pattern":"^(?!(?:__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__proto__|constructor|hasOwnProperty|isPrototypeOf|propertyIsEnumerable|prototype|toJSON|toLocaleString|toString|valueOf)$)[A-Za-z0-9][A-Za-z0-9._:-]*$"}}},"required":["id","task","taskVersion","deps"],"additionalProperties":false},"minItems":1}},"required":["version","nodes"],"additionalProperties":false}},"required":["workflow","revision","plan"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"isComplete":{"type":"boolean"}},"required":["workflows","nextCursor","isComplete"],"additionalProperties":false}}},"description":"Workflows visible to the authenticated API principal"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Workflow storage unavailable","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Workflows"],"description":"Workflows visible to the authenticated API principal","summary":"List Workflows"}},"/v1/workflows/{workflowId}/revisions":{"post":{"operationId":"publishWorkflowRevision","parameters":[{"in":"path","name":"workflowId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedCurrentRevisionId":{"type":"string","minLength":1},"plan":{"type":"object","properties":{"version":{"type":"string","enum":["1"]},"goal":{"type":"string"},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"pattern":"^(?!(?:__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__proto__|constructor|hasOwnProperty|isPrototypeOf|propertyIsEnumerable|prototype|toJSON|toLocaleString|toString|valueOf)$)[A-Za-z0-9][A-Za-z0-9._:-]*$"},"task":{"type":"string","minLength":1,"pattern":"^(?!(?:__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__proto__|constructor|hasOwnProperty|isPrototypeOf|propertyIsEnumerable|prototype|toJSON|toLocaleString|toString|valueOf)$)[A-Za-z0-9][A-Za-z0-9._:-]*$"},"taskVersion":{"type":"string","minLength":1},"description":{"type":"string"},"input":{"$ref":"#/components/schemas/WorkflowJsonValue_fdf687c7","description":"A finite, acyclic JSON value no deeper than 256 levels"},"deps":{"type":"object","additionalProperties":{"type":"string","minLength":1,"pattern":"^(?!(?:__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__proto__|constructor|hasOwnProperty|isPrototypeOf|propertyIsEnumerable|prototype|toJSON|toLocaleString|toString|valueOf)$)[A-Za-z0-9][A-Za-z0-9._:-]*$"},"propertyNames":{"type":"string","minLength":1,"pattern":"^(?!(?:__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__proto__|constructor|hasOwnProperty|isPrototypeOf|propertyIsEnumerable|prototype|toJSON|toLocaleString|toString|valueOf)$)[A-Za-z0-9][A-Za-z0-9._:-]*$"}}},"required":["id","task","taskVersion","deps"],"additionalProperties":false},"minItems":1}},"required":["version","nodes"],"additionalProperties":false}},"required":["expectedCurrentRevisionId","plan"],"additionalProperties":false}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"contentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"revisionId":{"type":"string","minLength":1},"revisionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"planSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"status":{"type":"string","enum":["created","unchanged"]},"title":{"type":"string"},"visibility":{"type":"string","enum":["private","project","team"]},"workflowId":{"type":"string","minLength":1}},"required":["contentSha256","description","revisionId","revisionNumber","planSha256","status","title","visibility","workflowId"],"additionalProperties":false}}},"description":"Published immutable Workflow revision"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid JSON","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability or action permission","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Workflow not found","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Workflow revision conflict","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid Workflow Plan","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Workflow execution runtime unavailable","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Workflows"],"description":"Published immutable Workflow revision","summary":"Publish Workflow Revision"},"get":{"operationId":"listWorkflowRevisions","parameters":[{"in":"path","name":"workflowId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"revisions":{"type":"array","items":{"type":"object","properties":{"summary":{"type":"object","properties":{"attention":{"type":"object","properties":{"pendingCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["pendingCount"],"additionalProperties":false},"controllers":{"type":"array","items":{"type":"object","properties":{"admissionStatus":{"type":"string","enum":["active","paused","finished"]},"lastAdmissionOutcome":{"anyOf":[{"type":"string","enum":["accepted","skipped","coalesced"]},{"type":"null"}]},"status":{"type":"string","enum":["initializing","active","paused","completed","failed","cancelled"]},"workflowRunId":{"type":"string","minLength":1}},"required":["admissionStatus","lastAdmissionOutcome","status","workflowRunId"],"additionalProperties":false}},"freshness":{"type":"object","properties":{"readAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"status":{"type":"string","enum":["complete","partial"]}},"required":["readAt","status"],"additionalProperties":false},"latestResult":{"anyOf":[{"type":"object","properties":{"completedAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},{"type":"null"}]},"firedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"firingId":{"type":"string"},"outcome":{"type":"string","enum":["executed","skipped","coalesced"]},"scheduleId":{"type":"string"},"status":{"type":"string","enum":["pending","completed","failed"]},"workflowRunId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["completedAt","firedAt","firingId","outcome","scheduleId","status","workflowRunId"],"additionalProperties":false},{"type":"null"}]},"nextTiming":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["none"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"kind":{"type":"string","enum":["estimate"]},"label":{"type":"string"}},"required":["at","kind","label"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["unknown"]},"reason":{"type":"string"}},"required":["kind","reason"],"additionalProperties":false}]}},"required":["attention","controllers","freshness","latestResult","nextTiming"],"additionalProperties":false},"workflow":{"type":"object","properties":{"id":{"type":"string","minLength":1},"projectId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ownerUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"type":"string","enum":["private","project","team"]},"currentRevisionId":{"type":"string","minLength":1},"lockVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"metadata":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/WorkflowJsonValue_fdf687c7"}},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"updatedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"archivedAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},{"type":"null"}]}},"required":["id","projectId","ownerUserId","title","description","visibility","currentRevisionId","lockVersion","metadata","createdByUserId","createdAt","updatedAt","archivedAt"],"additionalProperties":false},"revision":{"type":"object","properties":{"id":{"type":"string","minLength":1},"workflowId":{"type":"string","minLength":1},"revisionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"planVersion":{"type":"string","enum":["1"]},"goal":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"taskRegistryId":{"type":"string"},"taskRegistryManifestSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"metadata":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/WorkflowJsonValue_fdf687c7"}},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"}},"required":["id","workflowId","revisionNumber","planVersion","goal","contentSha256","taskRegistryId","taskRegistryManifestSha256","metadata","createdByUserId","createdAt"],"additionalProperties":false},"plan":{"type":"object","properties":{"version":{"type":"string","enum":["1"]},"goal":{"type":"string"},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"pattern":"^(?!(?:__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__proto__|constructor|hasOwnProperty|isPrototypeOf|propertyIsEnumerable|prototype|toJSON|toLocaleString|toString|valueOf)$)[A-Za-z0-9][A-Za-z0-9._:-]*$"},"task":{"type":"string","minLength":1,"pattern":"^(?!(?:__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__proto__|constructor|hasOwnProperty|isPrototypeOf|propertyIsEnumerable|prototype|toJSON|toLocaleString|toString|valueOf)$)[A-Za-z0-9][A-Za-z0-9._:-]*$"},"taskVersion":{"type":"string","minLength":1},"description":{"type":"string"},"input":{"$ref":"#/components/schemas/WorkflowJsonValue_fdf687c7","description":"A finite, acyclic JSON value no deeper than 256 levels"},"deps":{"type":"object","additionalProperties":{"type":"string","minLength":1,"pattern":"^(?!(?:__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__proto__|constructor|hasOwnProperty|isPrototypeOf|propertyIsEnumerable|prototype|toJSON|toLocaleString|toString|valueOf)$)[A-Za-z0-9][A-Za-z0-9._:-]*$"},"propertyNames":{"type":"string","minLength":1,"pattern":"^(?!(?:__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__proto__|constructor|hasOwnProperty|isPrototypeOf|propertyIsEnumerable|prototype|toJSON|toLocaleString|toString|valueOf)$)[A-Za-z0-9][A-Za-z0-9._:-]*$"}}},"required":["id","task","taskVersion","deps"],"additionalProperties":false},"minItems":1}},"required":["version","nodes"],"additionalProperties":false}},"required":["workflow","revision","plan"],"additionalProperties":false}}},"required":["revisions"],"additionalProperties":false}}},"description":"Immutable Workflow revisions"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Workflow not found","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Workflow storage unavailable","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Workflows"],"description":"Immutable Workflow revisions","summary":"List Workflow Revisions"}},"/v1/workflows/{workflowId}/schedules":{"get":{"operationId":"listWorkflowSchedules","parameters":[{"in":"path","name":"workflowId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"schedules":{"type":"array","items":{"type":"object","properties":{"catchupWindow":{"type":"string"},"createdAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"occurrencePolicy":{"type":"string","enum":["allow_all","buffer_all","buffer_one","skip"]},"pinnedWorkflowContentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"pinnedWorkflowRevisionId":{"type":"string","minLength":1},"projectId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"revisionPolicy":{"type":"string","enum":["pinned","follow_current"]},"rootRunId":{"type":"string"},"rootRunRevisionId":{"type":"string"},"scheduleId":{"type":"string"},"spec":{"type":"object","properties":{"cron":{"type":"array","items":{"type":"string","minLength":1}},"intervalMs":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"timezone":{"type":"string","minLength":1}},"additionalProperties":false},"status":{"type":"string","enum":["initializing","active","cancelled"]},"updatedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"workflowId":{"type":"string","minLength":1},"workflowRunId":{"type":"string","minLength":1}},"required":["createdAt","occurrencePolicy","projectId","revisionPolicy","scheduleId","spec","status","updatedAt","workflowId"],"additionalProperties":false}}},"required":["schedules"],"additionalProperties":false}}},"description":"Workflow-owned schedules"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Workflow not found","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Workflow schedule persistence unavailable","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Workflows"],"description":"Workflow-owned schedules","summary":"List Workflow Schedules"}},"/v1/workflows/{workflowId}/schedules/{scheduleId}":{"get":{"operationId":"getWorkflowSchedule","parameters":[{"in":"path","name":"workflowId","required":true,"schema":{"type":"string"}},{"in":"path","name":"scheduleId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"schedule":{"type":"object","properties":{"catchupWindow":{"type":"string"},"createdAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"occurrencePolicy":{"type":"string","enum":["allow_all","buffer_all","buffer_one","skip"]},"pinnedWorkflowContentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"pinnedWorkflowRevisionId":{"type":"string","minLength":1},"projectId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"revisionPolicy":{"type":"string","enum":["pinned","follow_current"]},"rootRunId":{"type":"string"},"rootRunRevisionId":{"type":"string"},"scheduleId":{"type":"string"},"spec":{"type":"object","properties":{"cron":{"type":"array","items":{"type":"string","minLength":1}},"intervalMs":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"timezone":{"type":"string","minLength":1}},"additionalProperties":false},"status":{"type":"string","enum":["initializing","active","cancelled"]},"updatedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"workflowId":{"type":"string","minLength":1},"workflowRunId":{"type":"string","minLength":1}},"required":["createdAt","occurrencePolicy","projectId","revisionPolicy","scheduleId","spec","status","updatedAt","workflowId"],"additionalProperties":false}},"required":["schedule"],"additionalProperties":false}}},"description":"Workflow-owned schedule"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Workflow or schedule not found","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Workflow schedule persistence unavailable","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Workflows"],"description":"Workflow-owned schedule","summary":"Get Workflow Schedule"}},"/v1/workflows/{workflowId}":{"get":{"operationId":"getWorkflow","parameters":[{"in":"path","name":"workflowId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"object","properties":{"attention":{"type":"object","properties":{"pendingCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["pendingCount"],"additionalProperties":false},"controllers":{"type":"array","items":{"type":"object","properties":{"admissionStatus":{"type":"string","enum":["active","paused","finished"]},"lastAdmissionOutcome":{"anyOf":[{"type":"string","enum":["accepted","skipped","coalesced"]},{"type":"null"}]},"status":{"type":"string","enum":["initializing","active","paused","completed","failed","cancelled"]},"workflowRunId":{"type":"string","minLength":1}},"required":["admissionStatus","lastAdmissionOutcome","status","workflowRunId"],"additionalProperties":false}},"freshness":{"type":"object","properties":{"readAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"status":{"type":"string","enum":["complete","partial"]}},"required":["readAt","status"],"additionalProperties":false},"latestResult":{"anyOf":[{"type":"object","properties":{"completedAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},{"type":"null"}]},"firedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"firingId":{"type":"string"},"outcome":{"type":"string","enum":["executed","skipped","coalesced"]},"scheduleId":{"type":"string"},"status":{"type":"string","enum":["pending","completed","failed"]},"workflowRunId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["completedAt","firedAt","firingId","outcome","scheduleId","status","workflowRunId"],"additionalProperties":false},{"type":"null"}]},"nextTiming":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["none"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"at":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"kind":{"type":"string","enum":["estimate"]},"label":{"type":"string"}},"required":["at","kind","label"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["unknown"]},"reason":{"type":"string"}},"required":["kind","reason"],"additionalProperties":false}]}},"required":["attention","controllers","freshness","latestResult","nextTiming"],"additionalProperties":false},"workflow":{"type":"object","properties":{"id":{"type":"string","minLength":1},"projectId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ownerUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"visibility":{"type":"string","enum":["private","project","team"]},"currentRevisionId":{"type":"string","minLength":1},"lockVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"metadata":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/WorkflowJsonValue_fdf687c7"}},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"updatedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"archivedAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},{"type":"null"}]}},"required":["id","projectId","ownerUserId","title","description","visibility","currentRevisionId","lockVersion","metadata","createdByUserId","createdAt","updatedAt","archivedAt"],"additionalProperties":false},"revision":{"type":"object","properties":{"id":{"type":"string","minLength":1},"workflowId":{"type":"string","minLength":1},"revisionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"planVersion":{"type":"string","enum":["1"]},"goal":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"taskRegistryId":{"type":"string"},"taskRegistryManifestSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"metadata":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/WorkflowJsonValue_fdf687c7"}},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"}},"required":["id","workflowId","revisionNumber","planVersion","goal","contentSha256","taskRegistryId","taskRegistryManifestSha256","metadata","createdByUserId","createdAt"],"additionalProperties":false},"plan":{"type":"object","properties":{"version":{"type":"string","enum":["1"]},"goal":{"type":"string"},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"pattern":"^(?!(?:__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__proto__|constructor|hasOwnProperty|isPrototypeOf|propertyIsEnumerable|prototype|toJSON|toLocaleString|toString|valueOf)$)[A-Za-z0-9][A-Za-z0-9._:-]*$"},"task":{"type":"string","minLength":1,"pattern":"^(?!(?:__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__proto__|constructor|hasOwnProperty|isPrototypeOf|propertyIsEnumerable|prototype|toJSON|toLocaleString|toString|valueOf)$)[A-Za-z0-9][A-Za-z0-9._:-]*$"},"taskVersion":{"type":"string","minLength":1},"description":{"type":"string"},"input":{"$ref":"#/components/schemas/WorkflowJsonValue_fdf687c7","description":"A finite, acyclic JSON value no deeper than 256 levels"},"deps":{"type":"object","additionalProperties":{"type":"string","minLength":1,"pattern":"^(?!(?:__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__proto__|constructor|hasOwnProperty|isPrototypeOf|propertyIsEnumerable|prototype|toJSON|toLocaleString|toString|valueOf)$)[A-Za-z0-9][A-Za-z0-9._:-]*$"},"propertyNames":{"type":"string","minLength":1,"pattern":"^(?!(?:__defineGetter__|__defineSetter__|__lookupGetter__|__lookupSetter__|__proto__|constructor|hasOwnProperty|isPrototypeOf|propertyIsEnumerable|prototype|toJSON|toLocaleString|toString|valueOf)$)[A-Za-z0-9][A-Za-z0-9._:-]*$"}}},"required":["id","task","taskVersion","deps"],"additionalProperties":false},"minItems":1}},"required":["version","nodes"],"additionalProperties":false}},"required":["workflow","revision","plan"],"additionalProperties":false}}},"description":"Workflow and its current immutable revision"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Workflow not found","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Workflow storage unavailable","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Workflows"],"description":"Workflow and its current immutable revision","summary":"Get Workflow"}},"/v1/workflow-runs":{"get":{"operationId":"listWorkflowRuns","parameters":[{"description":"Maximum number of items to return (1-200).","in":"query","name":"limit","required":false,"schema":{"maximum":200,"minimum":1,"type":"integer"}},{"description":"Opaque `nextCursor` value from the previous page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"Restrict to runs of one Workflow.","in":"query","name":"workflowId","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"workflowRuns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"workflowId":{"type":"string","minLength":1},"initialWorkflowRevisionId":{"type":"string","minLength":1},"initialWorkflowContentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"rootRunId":{"type":"string"},"rootRunRevisionId":{"type":"string"},"activeRootRunAttemptId":{"anyOf":[{"type":"string"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"executionMode":{"type":"string","enum":["finite","continuous"]},"status":{"type":"string","enum":["initializing","active","paused","completed","failed","cancelled"]},"metadata":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/WorkflowJsonValue_fdf687c7"}},{"type":"null"}]},"createdByAgentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"updatedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"activatedAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},{"type":"null"}]},"settlementRequestedAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},{"type":"null"}]},"settlementKind":{"anyOf":[{"type":"string","enum":["complete","cancel"]},{"type":"null"}]},"settlementReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"settledAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},{"type":"null"}]},"failureReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"abortStatus":{"anyOf":[{"type":"string","enum":["cancelled","failed"]},{"type":"null"}]},"abortReason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workflowId","initialWorkflowRevisionId","initialWorkflowContentSha256","rootRunId","rootRunRevisionId","activeRootRunAttemptId","projectId","executionMode","status","metadata","createdByAgentId","createdByUserId","createdAt","updatedAt","activatedAt","settlementRequestedAt","settlementKind","settlementReason","settledAt","failureReason","abortStatus","abortReason"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"isComplete":{"type":"boolean"}},"required":["workflowRuns","nextCursor","isComplete"],"additionalProperties":false}}},"description":"Durable Workflow Runs visible to the authenticated API principal"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Workflow storage unavailable","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Workflows"],"description":"Durable Workflow Runs visible to the authenticated API principal","summary":"List Workflow Runs"}},"/v1/workflow-runs/{workflowRunId}":{"get":{"operationId":"getWorkflowRun","parameters":[{"in":"path","name":"workflowRunId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"workflowRun":{"type":"object","properties":{"id":{"type":"string","minLength":1},"workflowId":{"type":"string","minLength":1},"initialWorkflowRevisionId":{"type":"string","minLength":1},"initialWorkflowContentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"rootRunId":{"type":"string"},"rootRunRevisionId":{"type":"string"},"activeRootRunAttemptId":{"anyOf":[{"type":"string"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"executionMode":{"type":"string","enum":["finite","continuous"]},"status":{"type":"string","enum":["initializing","active","paused","completed","failed","cancelled"]},"metadata":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/WorkflowJsonValue_fdf687c7"}},{"type":"null"}]},"createdByAgentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"updatedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"activatedAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},{"type":"null"}]},"settlementRequestedAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},{"type":"null"}]},"settlementKind":{"anyOf":[{"type":"string","enum":["complete","cancel"]},{"type":"null"}]},"settlementReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"settledAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},{"type":"null"}]},"failureReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"abortStatus":{"anyOf":[{"type":"string","enum":["cancelled","failed"]},{"type":"null"}]},"abortReason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workflowId","initialWorkflowRevisionId","initialWorkflowContentSha256","rootRunId","rootRunRevisionId","activeRootRunAttemptId","projectId","executionMode","status","metadata","createdByAgentId","createdByUserId","createdAt","updatedAt","activatedAt","settlementRequestedAt","settlementKind","settlementReason","settledAt","failureReason","abortStatus","abortReason"],"additionalProperties":false}},"required":["workflowRun"],"additionalProperties":false}}},"description":"Durable Workflow Run execution"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Workflow Run not found","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Workflow storage unavailable","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Workflows"],"description":"Durable Workflow Run execution","summary":"Get Workflow Run"}},"/v1/workflow-runs/{workflowRunId}/controls/{commandId}":{"get":{"operationId":"getWorkflowControl","parameters":[{"in":"path","name":"workflowRunId","required":true,"schema":{"type":"string"}},{"in":"path","name":"commandId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"appliedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"command":{"type":"string","enum":["start","trigger","pause","resume","cancel","finish","rerun_task","rerun_occurrence","recompute_downstream"]},"commandId":{"type":"string"},"createdAt":{"type":"string"},"rejectionReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["pending","applied","failed"]},"workflowRunId":{"type":"string","minLength":1}},"required":["appliedAt","command","commandId","createdAt","rejectionReason","status","workflowRunId"],"additionalProperties":false}}},"description":"Persisted Workflow control outcome"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Workflow control not found","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Workflow storage unavailable","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Workflows"],"description":"Persisted Workflow control outcome","summary":"Get Workflow Control"}},"/v1/workflow-runs/{workflowRunId}/tasks":{"get":{"operationId":"getWorkflowTaskHistory","parameters":[{"in":"path","name":"workflowRunId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"workflowRun":{"type":"object","properties":{"id":{"type":"string","minLength":1},"workflowId":{"type":"string","minLength":1},"initialWorkflowRevisionId":{"type":"string","minLength":1},"initialWorkflowContentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"rootRunId":{"type":"string"},"rootRunRevisionId":{"type":"string"},"activeRootRunAttemptId":{"anyOf":[{"type":"string"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"executionMode":{"type":"string","enum":["finite","continuous"]},"status":{"type":"string","enum":["initializing","active","paused","completed","failed","cancelled"]},"metadata":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/WorkflowJsonValue_fdf687c7"}},{"type":"null"}]},"createdByAgentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"updatedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"activatedAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},{"type":"null"}]},"settlementRequestedAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},{"type":"null"}]},"settlementKind":{"anyOf":[{"type":"string","enum":["complete","cancel"]},{"type":"null"}]},"settlementReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"settledAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},{"type":"null"}]},"failureReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"abortStatus":{"anyOf":[{"type":"string","enum":["cancelled","failed"]},{"type":"null"}]},"abortReason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workflowId","initialWorkflowRevisionId","initialWorkflowContentSha256","rootRunId","rootRunRevisionId","activeRootRunAttemptId","projectId","executionMode","status","metadata","createdByAgentId","createdByUserId","createdAt","updatedAt","activatedAt","settlementRequestedAt","settlementKind","settlementReason","settledAt","failureReason","abortStatus","abortReason"],"additionalProperties":false},"triggers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"workflowRunId":{"type":"string","minLength":1},"workflowId":{"type":"string","minLength":1},"workflowRevisionId":{"type":"string","minLength":1},"workflowContentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"sourceKind":{"type":"string","enum":["initial","schedule_firing","manual","event"]},"sourceId":{"type":"string"},"fireId":{"type":"string"},"schedulerFiringId":{"anyOf":[{"type":"string"},{"type":"null"}]},"bindingGeneration":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"firedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"scheduledFor":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},{"type":"null"}]},"status":{"type":"string","enum":["received","materialized","failed"]},"admissionOutcome":{"anyOf":[{"type":"string","enum":["accepted","skipped","coalesced"]},{"type":"null"}]},"coalescedIntoTriggerId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"receivedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"materializedAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},{"type":"null"}]},"failedAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},{"type":"null"}]},"failureReason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workflowRunId","workflowId","workflowRevisionId","workflowContentSha256","sourceKind","sourceId","fireId","schedulerFiringId","bindingGeneration","sequence","firedAt","scheduledFor","status","admissionOutcome","coalescedIntoTriggerId","receivedAt","materializedAt","failedAt","failureReason"],"additionalProperties":false}},"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"workflowRunId":{"type":"string","minLength":1},"triggerFiringId":{"type":"string"},"workflowId":{"type":"string","minLength":1},"workflowRevisionId":{"type":"string","minLength":1},"workflowContentSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"rootTaskId":{"type":"string"},"parentTaskId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"depth":{"type":"integer","minimum":0,"maximum":9007199254740991},"taskRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"specSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"sourceProposalSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"proposalNodeKey":{"type":"string"},"sealed":{"type":"boolean"},"planNodeKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"proposedByRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"taskName":{"anyOf":[{"type":"string"},{"type":"null"}]},"taskVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"input":{"anyOf":[{"$ref":"#/components/schemas/WorkflowJsonValue_fdf687c7","description":"A finite, acyclic JSON value no deeper than 256 levels"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/WorkflowJsonValue_fdf687c7"}},{"type":"null"}]},"kind":{"type":"string","enum":["run","gate","group","structural"]},"runTemplate":{"anyOf":[{"type":"object","properties":{"version":{"type":"string","enum":["1"]},"title":{"type":"string"},"prompt":{"type":"string"},"input":{"anyOf":[{"$ref":"#/components/schemas/WorkflowJsonValue_fdf687c7","description":"A finite, acyclic JSON value no deeper than 256 levels"},{"type":"null"}]},"profileKey":{"type":"string"},"profileSnapshotSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"resultContractKey":{"type":"string"},"failurePolicyKey":{"type":"string"},"specSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["version","title","prompt","input","profileKey","profileSnapshotSha256","resultContractKey","failurePolicyKey","specSha256"],"additionalProperties":false},{"type":"null"}]},"runTemplateSha256":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}]},"expectsTaskProposal":{"type":"boolean"},"gateKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"permissionRequirement":{"anyOf":[{"type":"object","properties":{"permissionKey":{"type":"string","minLength":1,"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"},"action":{"type":"string","minLength":1,"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"},"resource":{"$ref":"#/components/schemas/WorkflowJsonValue_fdf687c7","description":"A finite, acyclic JSON value no deeper than 256 levels"}},"required":["permissionKey","action"],"additionalProperties":false},{"type":"null"}]},"resourceRequest":{"type":"array","items":{"type":"object","properties":{"resource":{"type":"string","minLength":1,"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"accountingMode":{"type":"string","enum":["concurrent","cumulative"]}},"required":["resource","quantity","accountingMode"],"additionalProperties":false}},"status":{"type":"string","enum":["pending","blocked","ready","dispatching","running","completed","failed","cancelled","skipped"]},"waitingReasons":{"type":"array","items":{"anyOf":[{"type":"string","enum":["children_active","child_cancellation_pending","child_dispatch_pending","child_retry_pending","deterministic_gate","dependency_pending","not_before","permission_pending","proposal_application_pending","root_attempt_replacement","retry_limit_pending","structural_task_unsealed","workflow_paused"]},{"type":"string","pattern":"^limit:[\\s\\S]*?$","minLength":7}]}},"output":{"anyOf":[{"$ref":"#/components/schemas/WorkflowJsonValue_fdf687c7","description":"A finite, acyclic JSON value no deeper than 256 levels"},{"type":"null"}]},"outputSha256":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"notBefore":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},{"type":"null"}]},"deadlineAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},{"type":"null"}]},"readyAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},{"type":"null"}]},"childRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"childRunRevisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"childRunAttemptId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"updatedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"startedAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},{"type":"null"}]},"settledAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},{"type":"null"}]}},"required":["id","workflowRunId","triggerFiringId","workflowId","workflowRevisionId","workflowContentSha256","rootTaskId","parentTaskId","sequence","depth","taskRevision","specSha256","sourceProposalSha256","proposalNodeKey","sealed","planNodeKey","proposedByRunId","taskName","taskVersion","title","description","input","metadata","kind","runTemplate","runTemplateSha256","expectsTaskProposal","gateKey","permissionRequirement","resourceRequest","status","waitingReasons","output","outputSha256","error","notBefore","deadlineAt","readyAt","childRunId","childRunRevisionId","childRunAttemptId","createdAt","updatedAt","startedAt","settledAt"],"additionalProperties":false}},"dependencies":{"type":"array","items":{"type":"object","properties":{"taskId":{"type":"string"},"dependencyTaskId":{"type":"string"},"bindingKey":{"type":"string","pattern":"^[a-f0-9]{64}$"},"inputPort":{"anyOf":[{"type":"string"},{"type":"null"}]},"condition":{"anyOf":[{"$ref":"#/components/schemas/WorkflowJsonValue_fdf687c7","description":"A finite, acyclic JSON value no deeper than 256 levels"},{"type":"null"}]}},"required":["taskId","dependencyTaskId","bindingKey","inputPort","condition"],"additionalProperties":false}},"permissionEvidence":{"type":"array","items":{"type":"object","properties":{"taskId":{"type":"string"},"taskRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"taskSpecSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"permissionKey":{"type":"string"},"sourceKind":{"type":"string","enum":["policy","request"]},"status":{"type":"string","enum":["pending","approved","denied","cancelled"]},"action":{"type":"string"},"permissionRequestId":{"anyOf":[{"type":"string"},{"type":"null"}]},"durableActionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"decisionReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},{"type":"null"}]},"linkedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},"resolvedAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"},{"type":"null"}]}},"required":["taskId","taskRevision","taskSpecSha256","permissionKey","sourceKind","status","action","permissionRequestId","durableActionId","decisionReason","expiresAt","linkedAt","resolvedAt"],"additionalProperties":false}}},"required":["workflowRun","triggers","tasks","dependencies","permissionEvidence"],"additionalProperties":false}}},"description":"Workflow task history and immutable dependency evidence"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Workflow Run not found","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Workflow storage unavailable","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Workflows"],"description":"Workflow task history and immutable dependency evidence","summary":"Get Workflow Task History"}},"/v1/workflows/{workflowId}/control":{"post":{"operationId":"startWorkflow","parameters":[{"in":"path","name":"workflowId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"command":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["start"]},"idempotencyKey":{"type":"string","minLength":1,"maxLength":256},"workflowId":{"type":"string","minLength":1},"workflowRevisionId":{"type":"string","minLength":1},"executionMode":{"type":"string","enum":["finite","continuous"]}},"required":["kind","idempotencyKey","workflowId","workflowRevisionId","executionMode"],"additionalProperties":false},{"type":"object","properties":{"workflowRunId":{"type":"string","minLength":1},"idempotencyKey":{"type":"string","minLength":1,"maxLength":256},"kind":{"type":"string","enum":["trigger"]},"payload":{"$ref":"#/components/schemas/WorkflowJsonValue_fdf687c7","description":"A finite, acyclic JSON value no deeper than 256 levels"},"sourceId":{"type":"string","minLength":1},"sourceKind":{"type":"string","enum":["manual","event"]},"bindingGeneration":{"type":"integer","minimum":1}},"required":["workflowRunId","idempotencyKey","kind","sourceId","sourceKind"],"additionalProperties":false},{"type":"object","properties":{"workflowRunId":{"type":"string","minLength":1},"idempotencyKey":{"type":"string","minLength":1,"maxLength":256},"expectedLockVersion":{"type":"integer","minimum":1},"kind":{"type":"string","enum":["pause","resume","cancel","finish"]},"reason":{"type":"string","minLength":1}},"required":["workflowRunId","idempotencyKey","kind","reason"],"additionalProperties":false},{"type":"object","properties":{"workflowRunId":{"type":"string","minLength":1},"idempotencyKey":{"type":"string","minLength":1,"maxLength":256},"expectedLockVersion":{"type":"integer","minimum":1},"kind":{"type":"string","enum":["rerun_task"]},"taskId":{"type":"string","minLength":1},"reason":{"type":"string","minLength":1}},"required":["workflowRunId","idempotencyKey","kind","taskId","reason"],"additionalProperties":false},{"type":"object","properties":{"workflowRunId":{"type":"string","minLength":1},"idempotencyKey":{"type":"string","minLength":1,"maxLength":256},"expectedLockVersion":{"type":"integer","minimum":1},"kind":{"type":"string","enum":["rerun_occurrence"]},"occurrenceTaskId":{"type":"string","minLength":1},"reason":{"type":"string","minLength":1}},"required":["workflowRunId","idempotencyKey","kind","occurrenceTaskId","reason"],"additionalProperties":false},{"type":"object","properties":{"workflowRunId":{"type":"string","minLength":1},"idempotencyKey":{"type":"string","minLength":1,"maxLength":256},"expectedLockVersion":{"type":"integer","minimum":1},"kind":{"type":"string","enum":["recompute_downstream"]},"sourceTaskId":{"type":"string","minLength":1},"reason":{"type":"string","minLength":1}},"required":["workflowRunId","idempotencyKey","kind","sourceTaskId","reason"],"additionalProperties":false}]}},"required":["command"],"additionalProperties":false}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"boolean"},"commandId":{"type":"string"},"command":{"type":"string","enum":["start","trigger","pause","resume","cancel","finish","rerun_task","rerun_occurrence","recompute_downstream"]},"lockVersion":{"anyOf":[{"type":"number"},{"enum":["NaN"],"type":"string"},{"enum":["Infinity"],"type":"string"},{"enum":["-Infinity"],"type":"string"}]},"replayed":{"type":"boolean"},"status":{"type":"string","enum":["pending","applied","failed"]},"workflowRunId":{"type":"string","minLength":1}},"required":["accepted","commandId","command","lockVersion","replayed","status","workflowRunId"],"additionalProperties":false}}},"description":"Started Workflow"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid Workflow control","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Workflow not found","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Workflows"],"description":"Started Workflow","summary":"Start Workflow"}},"/v1/workflow-runs/{workflowRunId}/control":{"post":{"operationId":"controlWorkflowRun","parameters":[{"in":"path","name":"workflowRunId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"command":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["start"]},"idempotencyKey":{"type":"string","minLength":1,"maxLength":256},"workflowId":{"type":"string","minLength":1},"workflowRevisionId":{"type":"string","minLength":1},"executionMode":{"type":"string","enum":["finite","continuous"]}},"required":["kind","idempotencyKey","workflowId","workflowRevisionId","executionMode"],"additionalProperties":false},{"type":"object","properties":{"workflowRunId":{"type":"string","minLength":1},"idempotencyKey":{"type":"string","minLength":1,"maxLength":256},"kind":{"type":"string","enum":["trigger"]},"payload":{"$ref":"#/components/schemas/WorkflowJsonValue_fdf687c7","description":"A finite, acyclic JSON value no deeper than 256 levels"},"sourceId":{"type":"string","minLength":1},"sourceKind":{"type":"string","enum":["manual","event"]},"bindingGeneration":{"type":"integer","minimum":1}},"required":["workflowRunId","idempotencyKey","kind","sourceId","sourceKind"],"additionalProperties":false},{"type":"object","properties":{"workflowRunId":{"type":"string","minLength":1},"idempotencyKey":{"type":"string","minLength":1,"maxLength":256},"expectedLockVersion":{"type":"integer","minimum":1},"kind":{"type":"string","enum":["pause","resume","cancel","finish"]},"reason":{"type":"string","minLength":1}},"required":["workflowRunId","idempotencyKey","kind","reason"],"additionalProperties":false},{"type":"object","properties":{"workflowRunId":{"type":"string","minLength":1},"idempotencyKey":{"type":"string","minLength":1,"maxLength":256},"expectedLockVersion":{"type":"integer","minimum":1},"kind":{"type":"string","enum":["rerun_task"]},"taskId":{"type":"string","minLength":1},"reason":{"type":"string","minLength":1}},"required":["workflowRunId","idempotencyKey","kind","taskId","reason"],"additionalProperties":false},{"type":"object","properties":{"workflowRunId":{"type":"string","minLength":1},"idempotencyKey":{"type":"string","minLength":1,"maxLength":256},"expectedLockVersion":{"type":"integer","minimum":1},"kind":{"type":"string","enum":["rerun_occurrence"]},"occurrenceTaskId":{"type":"string","minLength":1},"reason":{"type":"string","minLength":1}},"required":["workflowRunId","idempotencyKey","kind","occurrenceTaskId","reason"],"additionalProperties":false},{"type":"object","properties":{"workflowRunId":{"type":"string","minLength":1},"idempotencyKey":{"type":"string","minLength":1,"maxLength":256},"expectedLockVersion":{"type":"integer","minimum":1},"kind":{"type":"string","enum":["recompute_downstream"]},"sourceTaskId":{"type":"string","minLength":1},"reason":{"type":"string","minLength":1}},"required":["workflowRunId","idempotencyKey","kind","sourceTaskId","reason"],"additionalProperties":false}]}},"required":["command"],"additionalProperties":false}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"boolean"},"commandId":{"type":"string"},"command":{"type":"string","enum":["start","trigger","pause","resume","cancel","finish","rerun_task","rerun_occurrence","recompute_downstream"]},"lockVersion":{"anyOf":[{"type":"number"},{"enum":["NaN"],"type":"string"},{"enum":["Infinity"],"type":"string"},{"enum":["-Infinity"],"type":"string"}]},"replayed":{"type":"boolean"},"status":{"type":"string","enum":["pending","applied","failed"]},"workflowRunId":{"type":"string","minLength":1}},"required":["accepted","commandId","command","lockVersion","replayed","status","workflowRunId"],"additionalProperties":false}}},"description":"Persisted Workflow control"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid Workflow control","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Workflow Run not found","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Workflows"],"description":"Persisted Workflow control","summary":"Control Workflow Run"}},"/v1/workflow-trigger-sources/{triggerSourceId}/invoke":{"post":{"operationId":"invokeWorkflowTriggerSource","parameters":[{"in":"path","name":"triggerSourceId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"idempotencyKey":{"type":"string","minLength":1,"maxLength":200},"payload":{"$ref":"#/components/schemas/WorkflowJsonValue_fdf687c7","description":"A finite, acyclic JSON value no deeper than 256 levels"}},"required":["idempotencyKey"],"additionalProperties":false}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"boolean"},"commandId":{"type":"string"},"command":{"type":"string","enum":["start","trigger","pause","resume","cancel","finish","rerun_task","rerun_occurrence","recompute_downstream"]},"lockVersion":{"anyOf":[{"type":"number"},{"enum":["NaN"],"type":"string"},{"enum":["Infinity"],"type":"string"},{"enum":["-Infinity"],"type":"string"}]},"replayed":{"type":"boolean"},"status":{"type":"string","enum":["pending","applied","failed"]},"workflowRunId":{"type":"string","minLength":1}},"required":["accepted","commandId","command","lockVersion","replayed","status","workflowRunId"],"additionalProperties":false}}},"description":"Admitted Workflow trigger occurrence"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid Workflow trigger invocation","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Workflow trigger source not found","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Workflow trigger source is not enabled","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Workflows"],"description":"Admitted Workflow trigger occurrence","summary":"Invoke Workflow Trigger Source"}},"/v1/runs/{runId}":{"get":{"operationId":"getRun","parameters":[{"in":"path","name":"runId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"approvals":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"id":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"requiredBeforeStageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"requiredApprovals":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"decisions":{"type":"array","items":{"type":"object","properties":{"runAttemptId":{"type":"string","minLength":1},"decision":{"type":"string","enum":["approve","request_changes"]},"decidedAt":{"anyOf":[{"type":"string"},{"type":"string"}]},"decidedBy":{"type":"string","minLength":1},"id":{"type":"string","minLength":1},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"requirementId":{"type":"string","minLength":1}},"required":["runAttemptId","decision","decidedAt","decidedBy","id","requirementId"],"additionalProperties":false}},"runAttemptId":{"type":"string"},"runId":{"type":"string"},"status":{"type":"string","enum":["pending","approved","changes_requested"]}},"required":["id","label","decisions","runAttemptId","runId","status"],"additionalProperties":false}},"attempts":{"type":"array","items":{"type":"object","properties":{"attemptNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"checkpointStep":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"completedAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"string"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"feedbackDirective":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"resultArtifactIds":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"runId":{"type":"string"},"runRevisionId":{"type":"string"},"startedAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"status":{"type":"string","enum":["pending","running","waiting","completed","failed","cancelled"]},"steeringDirective":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string"}]},"waitingReason":{"anyOf":[{"type":"string","enum":["approval","policy","dependency","user"]},{"type":"null"}]}},"required":["attemptNumber","checkpointStep","createdAt","id","runId","runRevisionId","status","updatedAt"],"additionalProperties":false}},"links":{"type":"array","items":{"type":"object","properties":{"createdAt":{"anyOf":[{"type":"string"},{"type":"string"}]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"fromRunId":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string","enum":["follow_up","rerun","supersedes"]},"toRunId":{"type":"string"}},"required":["createdAt","fromRunId","id","kind","toRunId"],"additionalProperties":false}},"revisions":{"type":"array","items":{"type":"object","properties":{"capabilityEnvelope":{"type":"object","properties":{"allowDestructiveTools":{"type":"boolean"},"allowOpenWorldTools":{"type":"boolean"},"allowUserInteraction":{"type":"boolean"},"escalation":{"type":"string","enum":["propose","deny"]},"maxSubagents":{"type":"integer","minimum":0,"maximum":9007199254740991},"schemaVersion":{"type":"number","enum":[1]}},"required":["allowDestructiveTools","allowOpenWorldTools","allowUserInteraction","maxSubagents","schemaVersion"],"additionalProperties":false},"contextRevisionId":{"type":"string","minLength":1},"createdAt":{"anyOf":[{"type":"string"},{"type":"string"}]},"id":{"type":"string"},"input":{},"metadata":{},"model":{"type":"string","minLength":1},"prompt":{"type":"string"},"revisionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"runId":{"type":"string"},"runtime":{"type":"object","properties":{"browserProvider":{"type":"string","enum":["kernel","cdp","local","cloudflare"]},"harness":{"type":"string","enum":["default","pi","claude-code","codex"]},"maxSubagents":{"type":"integer","minimum":0,"maximum":9007199254740991},"vmKind":{}},"additionalProperties":false},"status":{"type":"string","enum":["pending","running","waiting","completed","failed","cancelled"]},"tools":{"type":"array","items":{"type":"string"}},"workflowContentSha256":{"anyOf":[{"type":"string","pattern":"^[\\da-f]{64}$"},{"type":"null"}]},"workflowId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"workflowRevisionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"workflowRunId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"workflowTaskId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["capabilityEnvelope","contextRevisionId","createdAt","id","input","model","prompt","revisionNumber","runId","runtime","status","tools"],"additionalProperties":false}},"run":{"type":"object","properties":{"contextBundleId":{"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string"}]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"dispatchKey":{"type":"string"},"id":{"type":"string"},"metadata":{"anyOf":[{},{"type":"null"}]},"originId":{"anyOf":[{"type":"string"},{"type":"null"}]},"originKind":{"type":"string","enum":["api","chat","schedule","system","ui"]},"platformId":{"anyOf":[{"type":"string"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"status":{"type":"string","enum":["pending","running","waiting","completed","failed","cancelled"]},"teamId":{"type":"string","minLength":1},"title":{"type":"string"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string"}]}},"required":["contextBundleId","createdAt","dispatchKey","id","originKind","status","teamId","title","updatedAt"],"additionalProperties":false}},"required":["approvals","attempts","links","revisions","run"],"additionalProperties":false}}},"description":"Run snapshot"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Run not found","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Runs"],"description":"Run snapshot","summary":"Get Run"}},"/v1/runs":{"post":{"operationId":"createRun","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"commandKey":{"type":"string","minLength":1},"contextBundleId":{"type":"string","minLength":1},"contextRevisionId":{"type":"string","minLength":1},"input":{},"model":{"type":"string","minLength":1},"projectId":{"type":"string","minLength":1},"prompt":{"type":"string"},"title":{"type":"string","minLength":1}},"required":["commandKey","contextBundleId","contextRevisionId","input","model","prompt","title"],"additionalProperties":false}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"type":"object","properties":{"attempt":{"type":"object","properties":{"attemptNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"checkpointStep":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"completedAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"string"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"feedbackDirective":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"resultArtifactIds":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"runId":{"type":"string"},"runRevisionId":{"type":"string"},"startedAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"status":{"type":"string","enum":["pending","running","waiting","completed","failed","cancelled"]},"steeringDirective":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string"}]},"waitingReason":{"anyOf":[{"type":"string","enum":["approval","policy","dependency","user"]},{"type":"null"}]}},"required":["attemptNumber","checkpointStep","createdAt","id","runId","runRevisionId","status","updatedAt"],"additionalProperties":false},"created":{"type":"boolean"},"revision":{"type":"object","properties":{"capabilityEnvelope":{"type":"object","properties":{"allowDestructiveTools":{"type":"boolean"},"allowOpenWorldTools":{"type":"boolean"},"allowUserInteraction":{"type":"boolean"},"escalation":{"type":"string","enum":["propose","deny"]},"maxSubagents":{"type":"integer","minimum":0,"maximum":9007199254740991},"schemaVersion":{"type":"number","enum":[1]}},"required":["allowDestructiveTools","allowOpenWorldTools","allowUserInteraction","maxSubagents","schemaVersion"],"additionalProperties":false},"contextRevisionId":{"type":"string","minLength":1},"createdAt":{"anyOf":[{"type":"string"},{"type":"string"}]},"id":{"type":"string"},"input":{},"metadata":{},"model":{"type":"string","minLength":1},"prompt":{"type":"string"},"revisionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"runId":{"type":"string"},"runtime":{"type":"object","properties":{"browserProvider":{"type":"string","enum":["kernel","cdp","local","cloudflare"]},"harness":{"type":"string","enum":["default","pi","claude-code","codex"]},"maxSubagents":{"type":"integer","minimum":0,"maximum":9007199254740991},"vmKind":{}},"additionalProperties":false},"status":{"type":"string","enum":["pending","running","waiting","completed","failed","cancelled"]},"tools":{"type":"array","items":{"type":"string"}},"workflowContentSha256":{"anyOf":[{"type":"string","pattern":"^[\\da-f]{64}$"},{"type":"null"}]},"workflowId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"workflowRevisionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"workflowRunId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"workflowTaskId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["capabilityEnvelope","contextRevisionId","createdAt","id","input","model","prompt","revisionNumber","runId","runtime","status","tools"],"additionalProperties":false},"run":{"type":"object","properties":{"contextBundleId":{"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string"}]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"dispatchKey":{"type":"string"},"id":{"type":"string"},"metadata":{"anyOf":[{},{"type":"null"}]},"originId":{"anyOf":[{"type":"string"},{"type":"null"}]},"originKind":{"type":"string","enum":["api","chat","schedule","system","ui"]},"platformId":{"anyOf":[{"type":"string"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"status":{"type":"string","enum":["pending","running","waiting","completed","failed","cancelled"]},"teamId":{"type":"string","minLength":1},"title":{"type":"string"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string"}]}},"required":["contextBundleId","createdAt","dispatchKey","id","originKind","status","teamId","title","updatedAt"],"additionalProperties":false}},"required":["attempt","created","revision","run"],"additionalProperties":false}}},"description":"Run operation result"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid Run request","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Runs"],"description":"Run operation result","summary":"Create Run"}},"/v1/runs/{runId}/attempts/{attemptId}/cancel":{"post":{"operationId":"cancelRunAttempt","parameters":[{"in":"path","name":"runId","required":true,"schema":{"type":"string"}},{"in":"path","name":"attemptId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"attempt":{"type":"object","properties":{"attemptNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"checkpointStep":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"completedAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"string"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"feedbackDirective":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"resultArtifactIds":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"runId":{"type":"string"},"runRevisionId":{"type":"string"},"startedAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"status":{"type":"string","enum":["pending","running","waiting","completed","failed","cancelled"]},"steeringDirective":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string"}]},"waitingReason":{"anyOf":[{"type":"string","enum":["approval","policy","dependency","user"]},{"type":"null"}]}},"required":["attemptNumber","checkpointStep","createdAt","id","runId","runRevisionId","status","updatedAt"],"additionalProperties":false},"cancellationRequested":{"type":"boolean"}},"required":["attempt","cancellationRequested"],"additionalProperties":false}}},"description":"Run cancellation result"},"202":{"content":{"application/json":{"schema":{"type":"object","properties":{"attempt":{"type":"object","properties":{"attemptNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"checkpointStep":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"completedAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"string"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"feedbackDirective":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"resultArtifactIds":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"runId":{"type":"string"},"runRevisionId":{"type":"string"},"startedAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"status":{"type":"string","enum":["pending","running","waiting","completed","failed","cancelled"]},"steeringDirective":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string"}]},"waitingReason":{"anyOf":[{"type":"string","enum":["approval","policy","dependency","user"]},{"type":"null"}]}},"required":["attemptNumber","checkpointStep","createdAt","id","runId","runRevisionId","status","updatedAt"],"additionalProperties":false},"cancellationRequested":{"type":"boolean"}},"required":["attempt","cancellationRequested"],"additionalProperties":false}}},"description":"Run cancellation result"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Run Attempt not found","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Run Attempt transition conflict","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Runs"],"description":"Run cancellation result","summary":"Cancel Run Attempt"}},"/v1/runs/{runId}/attempts/{attemptId}/steer":{"post":{"operationId":"steerRunAttempt","parameters":[{"in":"path","name":"runId","required":true,"schema":{"type":"string"}},{"in":"path","name":"attemptId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"steeringDirective":{"type":"string","minLength":1,"maxLength":20000}},"required":["steeringDirective"],"additionalProperties":false}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"attempt":{"type":"object","properties":{"attemptNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"checkpointStep":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"completedAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"string"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"feedbackDirective":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"resultArtifactIds":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"runId":{"type":"string"},"runRevisionId":{"type":"string"},"startedAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"status":{"type":"string","enum":["pending","running","waiting","completed","failed","cancelled"]},"steeringDirective":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string"}]},"waitingReason":{"anyOf":[{"type":"string","enum":["approval","policy","dependency","user"]},{"type":"null"}]}},"required":["attemptNumber","checkpointStep","createdAt","id","runId","runRevisionId","status","updatedAt"],"additionalProperties":false}},"required":["attempt"],"additionalProperties":false}}},"description":"Run steering result"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid steering body","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Run Attempt not found","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Run Attempt is terminal","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Runs"],"description":"Run steering result","summary":"Steer Run Attempt"}},"/v1/runs/{runId}/rerun":{"post":{"operationId":"rerunRun","parameters":[{"in":"path","name":"runId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"commandKey":{"type":"string","minLength":1},"input":{},"prompt":{"type":"string"},"sourceRunRevisionId":{"type":"string","minLength":1},"title":{"type":"string","minLength":1}},"required":["commandKey","sourceRunRevisionId"],"additionalProperties":false}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"type":"object","properties":{"attempt":{"type":"object","properties":{"attemptNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"checkpointStep":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"completedAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"string"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"feedbackDirective":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"resultArtifactIds":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"runId":{"type":"string"},"runRevisionId":{"type":"string"},"startedAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"status":{"type":"string","enum":["pending","running","waiting","completed","failed","cancelled"]},"steeringDirective":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string"}]},"waitingReason":{"anyOf":[{"type":"string","enum":["approval","policy","dependency","user"]},{"type":"null"}]}},"required":["attemptNumber","checkpointStep","createdAt","id","runId","runRevisionId","status","updatedAt"],"additionalProperties":false},"created":{"type":"boolean"},"revision":{"type":"object","properties":{"capabilityEnvelope":{"type":"object","properties":{"allowDestructiveTools":{"type":"boolean"},"allowOpenWorldTools":{"type":"boolean"},"allowUserInteraction":{"type":"boolean"},"escalation":{"type":"string","enum":["propose","deny"]},"maxSubagents":{"type":"integer","minimum":0,"maximum":9007199254740991},"schemaVersion":{"type":"number","enum":[1]}},"required":["allowDestructiveTools","allowOpenWorldTools","allowUserInteraction","maxSubagents","schemaVersion"],"additionalProperties":false},"contextRevisionId":{"type":"string","minLength":1},"createdAt":{"anyOf":[{"type":"string"},{"type":"string"}]},"id":{"type":"string"},"input":{},"metadata":{},"model":{"type":"string","minLength":1},"prompt":{"type":"string"},"revisionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"runId":{"type":"string"},"runtime":{"type":"object","properties":{"browserProvider":{"type":"string","enum":["kernel","cdp","local","cloudflare"]},"harness":{"type":"string","enum":["default","pi","claude-code","codex"]},"maxSubagents":{"type":"integer","minimum":0,"maximum":9007199254740991},"vmKind":{}},"additionalProperties":false},"status":{"type":"string","enum":["pending","running","waiting","completed","failed","cancelled"]},"tools":{"type":"array","items":{"type":"string"}},"workflowContentSha256":{"anyOf":[{"type":"string","pattern":"^[\\da-f]{64}$"},{"type":"null"}]},"workflowId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"workflowRevisionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"workflowRunId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"workflowTaskId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["capabilityEnvelope","contextRevisionId","createdAt","id","input","model","prompt","revisionNumber","runId","runtime","status","tools"],"additionalProperties":false},"run":{"type":"object","properties":{"contextBundleId":{"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string"}]},"createdByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"dispatchKey":{"type":"string"},"id":{"type":"string"},"metadata":{"anyOf":[{},{"type":"null"}]},"originId":{"anyOf":[{"type":"string"},{"type":"null"}]},"originKind":{"type":"string","enum":["api","chat","schedule","system","ui"]},"platformId":{"anyOf":[{"type":"string"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"status":{"type":"string","enum":["pending","running","waiting","completed","failed","cancelled"]},"teamId":{"type":"string","minLength":1},"title":{"type":"string"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string"}]}},"required":["contextBundleId","createdAt","dispatchKey","id","originKind","status","teamId","title","updatedAt"],"additionalProperties":false}},"required":["attempt","created","revision","run"],"additionalProperties":false}}},"description":"Run operation result"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid Run request","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Runs"],"description":"Run operation result","summary":"Rerun Run"}},"/v1/runs/{runId}/revisions/{revisionId}/retry":{"post":{"operationId":"retryRun","parameters":[{"in":"path","name":"runId","required":true,"schema":{"type":"string"}},{"in":"path","name":"revisionId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"commandKey":{"type":"string","minLength":1},"feedbackDirective":{"type":"string"}},"required":["commandKey"],"additionalProperties":false}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"type":"object","properties":{"attempt":{"type":"object","properties":{"attemptNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"checkpointStep":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"completedAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"string"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"feedbackDirective":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"resultArtifactIds":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"runId":{"type":"string"},"runRevisionId":{"type":"string"},"startedAt":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"status":{"type":"string","enum":["pending","running","waiting","completed","failed","cancelled"]},"steeringDirective":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string"}]},"waitingReason":{"anyOf":[{"type":"string","enum":["approval","policy","dependency","user"]},{"type":"null"}]}},"required":["attemptNumber","checkpointStep","createdAt","id","runId","runRevisionId","status","updatedAt"],"additionalProperties":false},"created":{"type":"boolean"}},"required":["attempt","created"],"additionalProperties":false}}},"description":"Run retry result"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing API key","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing capability","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Run Revision not found","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Run already active","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid Run request","headers":{"x-request-id":{"description":"Request identifier for support and log correlation.","schema":{"type":"string"}}}}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":["Runs"],"description":"Run retry result","summary":"Retry Run"}}},"components":{"securitySchemes":{"apiKeyHeader":{"in":"header","name":"x-api-key","type":"apiKey"},"bearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"Error":{"additionalProperties":false,"properties":{"error":{"additionalProperties":false,"properties":{"code":{"description":"Stable machine-readable error code.","type":"string"},"details":{"description":"Optional structured context for this error."},"message":{"description":"Human-readable explanation of the error.","type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"},"WorkflowJsonValue_fdf687c7":{"anyOf":[{"type":"null"},{"type":"boolean"},{"type":"number"},{"type":"string"},{"type":"array","items":{"$ref":"#/components/schemas/WorkflowJsonValue_fdf687c7"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/WorkflowJsonValue_fdf687c7"}}]}}}}