{"components":{"parameters":{"agent_id":{"in":"path","name":"agent_id","required":true,"schema":{"format":"uuid","type":"string"}},"artifact_id":{"in":"path","name":"artifact_id","required":true,"schema":{"format":"uuid","type":"string"}},"id":{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},"integration_id":{"in":"path","name":"integration_id","required":true,"schema":{"format":"uuid","type":"string"}},"job_id":{"in":"path","name":"job_id","required":true,"schema":{"format":"uuid","type":"string"}},"key_id":{"in":"path","name":"key_id","required":true,"schema":{"format":"uuid","type":"string"}},"limit":{"in":"query","name":"limit","schema":{"default":25,"type":"integer"}},"offset":{"in":"query","name":"offset","schema":{"default":0,"type":"integer"}},"run_id":{"in":"path","name":"run_id","required":true,"schema":{"format":"uuid","type":"string"}},"subscription_id":{"in":"path","name":"subscription_id","required":true,"schema":{"type":"string"}},"workspace_id":{"in":"path","name":"workspace_id","required":true,"schema":{"format":"uuid","type":"string"}}},"requestBodies":{"Json":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"required":true}},"responses":{"BadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Bad request"},"Conflict":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Conflict"},"Forbidden":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Authenticated principal lacks workspace access or scope"},"PaymentRequired":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"A successful live-mode paid Stripe invoice is required before workspace automation can run."},"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Missing or invalid credentials"}},"schemas":{"Agent":{"properties":{"archetype":{"type":"string"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"repo_targets":{"items":{"type":"string"},"type":"array"},"status":{"type":"string"},"workspace_id":{"format":"uuid","type":"string"}},"type":"object"},"AgentManifest":{"properties":{"api_version":{"type":"string"},"description":{"type":"string"},"discovery_url":{"format":"uri","type":"string"},"docs_url":{"format":"uri","type":"string"},"llms_full_txt_url":{"format":"uri","type":"string"},"llms_txt_url":{"format":"uri","type":"string"},"name":{"type":"string"},"openapi_url":{"format":"uri","type":"string"}},"type":"object"},"ApiError":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":["boolean","null"]}},"required":["code","message"],"type":"object"},"AuthResponse":{"properties":{"access_token":{"type":"string"},"expires_in":{"type":"integer"},"refresh_token":{"type":"string"},"user":{"$ref":"#/components/schemas/User"}},"type":"object"},"CreateAgentAssignmentRequest":{"properties":{"agent_id":{"format":"uuid","type":["string","null"]},"agent_name":{"type":"string"},"billing_units_per_hour":{"type":["number","null"]},"cost_per_hour_cents":{"type":["integer","null"]},"max_daily_hours":{"type":["number","null"]},"model_policy":{"additionalProperties":true,"type":["object","null"]},"schedule_mode":{"enum":["auto","window","always_on",null],"type":["string","null"]},"timezone":{"type":["string","null"]},"window_end_local":{"type":["string","null"]},"window_start_local":{"type":["string","null"]},"workspace_id":{"format":"uuid","type":"string"}},"required":["workspace_id","agent_name"],"type":"object"},"CreateAgentRequest":{"properties":{"archetype":{"enum":["junior","feature","architecture"],"type":"string"},"description":{"type":"string"},"max_daily_hours":{"type":"number"},"name":{"type":"string"},"repo_targets":{"items":{"type":"string"},"type":"array"},"schedule_mode":{"enum":["auto","window","always_on"],"type":"string"},"timezone":{"type":"string"},"workspace_id":{"format":"uuid","type":"string"}},"required":["workspace_id","name","repo_targets"],"type":"object"},"CreateIntegrationRequest":{"properties":{"integration_config":{"additionalProperties":true,"type":["object","null"]},"oauth_access_token":{"type":["string","null"],"writeOnly":true},"oauth_refresh_token":{"type":["string","null"],"writeOnly":true},"oauth_token_expires_at":{"format":"date-time","type":["string","null"]},"provider":{"enum":["linear","jira","github"],"type":"string"},"webhook_url":{"format":"uri","type":["string","null"]}},"required":["provider"],"type":"object"},"CreateJobRequest":{"properties":{"agent_id":{"format":"uuid","type":"string"},"goal":{"type":"string"},"priority":{"type":"integer"},"repo_targets":{"items":{"type":"string"},"type":"array"},"title":{"type":"string"},"workspace_id":{"format":"uuid","type":"string"}},"required":["workspace_id","title","goal"],"type":"object"},"CreateRepoBuildConfigRequest":{"properties":{"build_command":{"type":["string","null"]},"docker_image":{"type":["string","null"]},"env_vars":{"additionalProperties":true,"description":"Non-secret environment variables only.","type":["object","null"]},"install_command":{"type":["string","null"]},"language":{"type":["string","null"]},"lint_command":{"type":["string","null"]},"package_manager":{"type":["string","null"]},"post_build_commands":{"items":{"type":"string"},"type":["array","object","null"]},"pre_install_commands":{"items":{"type":"string"},"type":["array","object","null"]},"repo_full_name":{"example":"owner/repo","type":"string"},"run_command":{"type":["string","null"]},"runtime_version":{"type":["string","null"]},"secrets":{"additionalProperties":{"type":"string"},"description":"Sensitive values are encrypted at rest and never returned.","type":["object","null"],"writeOnly":true},"test_command":{"type":["string","null"]},"working_directory":{"type":["string","null"]},"workspace_id":{"format":"uuid","type":"string"}},"required":["workspace_id","repo_full_name"],"type":"object"},"CreateSetupIntentRequest":{"properties":{"workspace_id":{"format":"uuid","type":"string"}},"required":["workspace_id"],"type":"object"},"CreateSubscriptionRequest":{"properties":{"payment_method_id":{"type":"string"},"plan_tier":{"enum":["starter",null],"type":["string","null"]},"workspace_id":{"format":"uuid","type":"string"}},"required":["workspace_id","payment_method_id"],"type":"object"},"CreateTopUpPaymentIntentRequest":{"properties":{"credits":{"maximum":10000,"minimum":20,"type":"integer"}},"required":["credits"],"type":"object"},"CreateWorkspaceApiKeyRequest":{"properties":{"expires_at":{"format":"date-time","type":["string","null"]},"name":{"type":"string"},"scopes":{"items":{"enum":["workspaces:read","agents:read","agents:write","jobs:read","jobs:write","runs:read","repos:read","repo_configs:write","repo_configs:read","integrations:read","integrations:write","usage:read","billing:read"],"type":"string"},"type":"array"}},"required":["name"],"type":"object"},"CreateWorkspaceRequest":{"properties":{"name":{"type":"string"},"slug":{"type":"string"},"website":{"type":"string"}},"required":["name"],"type":"object"},"DetectBuildConfigRequest":{"properties":{"repo_full_name":{"example":"owner/repo","type":"string"},"workspace_id":{"format":"uuid","type":"string"}},"required":["workspace_id","repo_full_name"],"type":"object"},"DiscoveryResponse":{"properties":{"agent_manifest_url":{"format":"uri","type":"string"},"api_version":{"type":"string"},"auth_methods":{"items":{"type":"string"},"type":"array"},"base_url":{"format":"uri","type":"string"},"docs_url":{"format":"uri","type":"string"},"llms_full_txt_url":{"format":"uri","type":"string"},"llms_txt_url":{"format":"uri","type":"string"},"openapi_url":{"format":"uri","type":"string"},"privacy_url":{"format":"uri","type":"string"},"product":{"type":"string"},"recommended_agent_workflow":{"description":"Recommended flow includes Stripe payment and a successful live-mode paid invoice before workspace API-key minting or automation.","items":{"type":"string"},"type":"array"},"signup_available":{"type":"boolean"},"terms_url":{"format":"uri","type":"string"}},"required":["product","api_version","base_url","openapi_url","docs_url","signup_available","auth_methods","recommended_agent_workflow"],"type":"object"},"DispatchRunRequest":{"properties":{"attempt":{"minimum":1,"type":["integer","null"]},"checkpoint_ref":{"type":["string","null"]},"goal":{"type":"string"},"idempotency_key":{"type":["string","null"]},"job_id":{"format":"uuid","type":"string"},"repo_targets":{"items":{"type":"string"},"type":["array","null"]},"tenant_id":{"type":["string","null"]},"trace_id":{"type":["string","null"]}},"required":["job_id","goal"],"type":"object"},"EventStreamTokenResponse":{"properties":{"expires_in":{"description":"Token lifetime in seconds.","type":"integer"},"token":{"description":"Short-lived signed token for events/stream query-string auth.","type":"string"}},"required":["token","expires_in"],"type":"object"},"ExchangeGitHubInstallationRequest":{"properties":{"installation_id":{"format":"int64","type":"integer"},"state":{"description":"Signed state returned by createGitHubInstallUrl.","type":["string","null"]},"workspace_id":{"format":"uuid","type":"string"}},"required":["installation_id","workspace_id"],"type":"object"},"GitHubInstallUrlResponse":{"properties":{"callback_url":{"format":"uri","type":"string"},"continuation":{"type":"string"},"install_url":{"format":"uri","type":"string"},"state":{"type":"string"}},"type":"object"},"GitHubOAuthCallbackRequest":{"properties":{"code":{"type":"string"},"redirect_uri":{"format":"uri","type":["string","null"]}},"required":["code"],"type":"object"},"Job":{"properties":{"agent_id":{"format":"uuid","type":["string","null"]},"goal":{"type":"string"},"id":{"format":"uuid","type":"string"},"repo_targets":{"items":{"type":"string"},"type":"array"},"status":{"type":"string"},"title":{"type":"string"},"workspace_id":{"format":"uuid","type":"string"}},"type":"object"},"LoginRequest":{"properties":{"email":{"format":"email","type":"string"},"password":{"type":"string"}},"required":["email","password"],"type":"object"},"PromotePlannerItemRequest":{"properties":{"agent_id":{"format":"uuid","type":["string","null"]},"reason":{"type":["string","null"]}},"type":"object"},"RefreshTokenRequest":{"properties":{"refresh_token":{"type":"string"}},"required":["refresh_token"],"type":"object"},"RegisterGitHubInstallationRequest":{"properties":{"account_login":{"type":["string","null"]},"account_type":{"enum":["Organization","User",null],"type":["string","null"]},"events":{"type":["object","array","null"]},"installation_id":{"format":"int64","type":"integer"},"permissions":{"additionalProperties":true,"type":["object","null"]},"state":{"description":"Signed state returned by createGitHubInstallUrl.","type":["string","null"]},"workspace_id":{"format":"uuid","type":"string"}},"required":["installation_id","workspace_id"],"type":"object"},"ResendVerificationRequest":{"properties":{"email":{"format":"email","type":"string"}},"required":["email"],"type":"object"},"SetupIntentResponse":{"properties":{"client_secret":{"type":"string"}},"required":["client_secret"],"type":"object"},"SignupRequest":{"properties":{"email":{"format":"email","type":"string"},"name":{"type":"string"},"password":{"minLength":8,"type":"string"}},"required":["name","email","password"],"type":"object"},"SubscriptionResponse":{"properties":{"cancel_at_period_end":{"type":"boolean"},"current_period_end":{"type":"integer"},"current_period_start":{"type":"integer"},"id":{"type":"string"},"payment_intent_client_secret":{"type":["string","null"]},"payment_intent_status":{"type":["string","null"]},"status":{"type":"string"}},"required":["id","status","current_period_start","current_period_end","cancel_at_period_end"],"type":"object"},"SuppressPlannerItemRequest":{"properties":{"reason":{"type":["string","null"]},"suppression_ttl_hours":{"type":["integer","null"]}},"type":"object"},"TopUpPaymentIntentResponse":{"properties":{"amount_cents":{"type":"integer"},"client_secret":{"type":"string"},"credits":{"type":"integer"},"payment_intent_id":{"type":"string"}},"required":["client_secret","payment_intent_id","credits","amount_cents"],"type":"object"},"UpdateAgentAssignmentRequest":{"properties":{"billing_units_per_hour":{"type":["number","null"]},"cost_per_hour_cents":{"type":["integer","null"]},"is_active":{"type":["boolean","null"]},"max_daily_hours":{"type":["number","null"]},"model_policy":{"additionalProperties":true,"type":["object","null"]},"schedule_mode":{"enum":["auto","window","always_on",null],"type":["string","null"]},"timezone":{"type":["string","null"]},"window_end_local":{"type":["string","null"]},"window_start_local":{"type":["string","null"]}},"type":"object"},"UpdateAgentRequest":{"additionalProperties":false,"properties":{"archetype":{"enum":["junior","feature","architecture"],"type":"string"},"billing_units_per_hour":{"type":"number"},"default_model":{"type":"string"},"description":{"type":"string"},"max_daily_hours":{"type":"number"},"model_policy":{"additionalProperties":true,"type":"object"},"name":{"type":"string"},"policy":{"additionalProperties":true,"type":"object"},"repo_targets":{"items":{"type":"string"},"type":"array"},"runtime_profile":{"type":"string"},"schedule_mode":{"enum":["auto","window","always_on"],"type":"string"},"status":{"type":"string"},"system_prompt":{"type":"string"},"timezone":{"type":"string"},"window_end_local":{"type":["string","null"]},"window_start_local":{"type":["string","null"]}},"type":"object"},"UpdateIntegrationRequest":{"properties":{"integration_config":{"additionalProperties":true,"type":["object","null"]},"is_active":{"type":["boolean","null"]},"oauth_access_token":{"type":["string","null"],"writeOnly":true},"oauth_refresh_token":{"type":["string","null"],"writeOnly":true},"oauth_token_expires_at":{"format":"date-time","type":["string","null"]},"webhook_url":{"format":"uri","type":["string","null"]}},"type":"object"},"UpdateRepoBuildConfigRequest":{"properties":{"build_command":{"type":["string","null"]},"docker_image":{"type":["string","null"]},"env_vars":{"additionalProperties":true,"type":["object","null"]},"install_command":{"type":["string","null"]},"language":{"type":["string","null"]},"lint_command":{"type":["string","null"]},"package_manager":{"type":["string","null"]},"post_build_commands":{"items":{"type":"string"},"type":["array","object","null"]},"pre_install_commands":{"items":{"type":"string"},"type":["array","object","null"]},"run_command":{"type":["string","null"]},"runtime_version":{"type":["string","null"]},"secrets":{"additionalProperties":{"type":"string"},"type":["object","null"],"writeOnly":true},"test_command":{"type":["string","null"]},"working_directory":{"type":["string","null"]}},"type":"object"},"UpdateWorkspaceAutopilotSettingsRequest":{"properties":{"enabled_sources":{"items":{"type":"string"},"type":["array","null"]},"low_risk_auto_exec_classes":{"items":{"type":"string"},"type":["array","null"]},"max_auto_promoted_jobs_per_day":{"type":["integer","null"]},"max_auto_risk_band":{"type":["string","null"]},"minimum_confidence_score":{"type":["number","null"]},"mode":{"type":["string","null"]},"planner_daily_budget_cents":{"type":["integer","null"]},"quiet_hours":{"additionalProperties":true,"type":["object","null"]},"repo_allowlist":{"items":{"type":"string"},"type":["array","null"]},"suppression_ttl_hours":{"type":["integer","null"]}},"type":"object"},"UpdateWorkspaceSettingsRequest":{"properties":{"auto_continue_default":{"type":["boolean","null"]},"auto_continue_max_slices":{"type":["integer","null"]},"default_model_route":{"type":["string","null"]},"email_notifications":{"type":["boolean","null"]},"included_monthly_units":{"type":["number","null"]},"max_concurrent_runs":{"type":["integer","null"]},"max_daily_budget_cents":{"type":["integer","null"]},"monthly_overage_cap_cents":{"type":["integer","null"]},"open_weight_only":{"type":["boolean","null"]},"overage_enabled":{"type":["boolean","null"]},"overage_price_cents_per_unit":{"type":["integer","null"]},"plan_tier":{"enum":["free","starter",null],"type":["string","null"]}},"type":"object"},"User":{"properties":{"avatar_url":{"type":["string","null"]},"email":{"format":"email","type":["string","null"]},"email_verified_at":{"format":"date-time","type":["string","null"]},"github_id":{"type":["integer","null"]},"github_login":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"name":{"type":["string","null"]}},"type":"object"},"VerificationChallengeResponse":{"properties":{"email":{"format":"email","type":"string"},"expires_in_secs":{"type":"integer"},"verification_required":{"type":"boolean"}},"type":"object"},"VerifyEmailRequest":{"description":"Provide either token, or email plus code.","properties":{"code":{"description":"Email verification code when verifying by email + code.","type":["string","null"]},"email":{"format":"email","type":["string","null"]},"token":{"description":"Email verification token when verifying by token link.","type":["string","null"]}},"type":"object"},"Workspace":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"website":{"type":["string","null"]}},"type":"object"},"WorkspaceApiKey":{"properties":{"created_at":{"format":"date-time","type":"string"},"created_by":{"type":"string"},"expires_at":{"format":"date-time","type":["string","null"]},"id":{"format":"uuid","type":"string"},"last_used_at":{"format":"date-time","type":["string","null"]},"name":{"type":"string"},"prefix":{"type":"string"},"revoked_at":{"format":"date-time","type":["string","null"]},"scopes":{"items":{"type":"string"},"type":"array"},"token":{"description":"Only returned once on creation.","type":"string"},"workspace_id":{"format":"uuid","type":"string"}},"type":"object"}},"securitySchemes":{"bearerAuth":{"description":"Use a JWT access token for signup/onboarding, or a workspace API key token for machine automation.","scheme":"bearer","type":"http"},"eventStreamToken":{"description":"Short-lived event_stream JWT minted by POST /v1/jobs/{job_id}/events/stream-token. Long-lived JWTs and workspace API keys are not accepted in this query parameter.","in":"query","name":"token","type":"apiKey"},"githubWebhookHmac":{"description":"GitHub webhook HMAC-SHA256 signature.","in":"header","name":"x-hub-signature-256","type":"apiKey"},"modalWebhookHmac":{"description":"HMAC-SHA256 signature for Codebox modal completion callbacks.","in":"header","name":"x-webhook-signature","type":"apiKey"},"stripeSignature":{"description":"Stripe webhook signature header.","in":"header","name":"stripe-signature","type":"apiKey"},"taskManagerWebhookHmac":{"description":"Task-manager webhook HMAC-SHA256 signature.","in":"header","name":"x-webhook-signature","type":"apiKey"}}},"info":{"description":"API for discovering, signing up for, and operating ConstantCoder autonomous coding agents.","title":"ConstantCoder API","version":"1.0.0"},"openapi":"3.1.0","paths":{"/.well-known/constantcoder-agent.json":{"get":{"operationId":"getAgentManifest","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentManifest"}}},"description":"Agent manifest"}},"summary":"Fetch the ConstantCoder agent discovery manifest.","tags":["Discovery"]}},"/docs":{"get":{"operationId":"showSwaggerUi","responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"Swagger UI HTML page"}},"summary":"View the OpenAPI contract in Swagger UI.","tags":["Discovery"]}},"/healthz":{"get":{"operationId":"healthCheck","responses":{"200":{"description":"Service is healthy"}},"summary":"Health check.","tags":["Discovery"]}},"/openapi.json":{"get":{"operationId":"getOpenApiSpec","responses":{"200":{"description":"OpenAPI document"}},"summary":"Fetch the canonical OpenAPI document.","tags":["Discovery"]}},"/v1/agents":{"get":{"operationId":"listAgents","parameters":[{"in":"query","name":"workspace_id","schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"}],"responses":{"200":{"description":"Agents"}},"security":[{"bearerAuth":[]}],"tags":["Agents"]},"post":{"description":"Creates an agent in a workspace with a successful live-mode paid Stripe invoice for the current billing period.","operationId":"createAgent","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}},"description":"Agent created"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"}},"security":[{"bearerAuth":[]}],"tags":["Agents"],"x-constantcoder-requires-paid-invoice":true}},"/v1/agents/{agent_id}":{"delete":{"description":"Requires a successful live-mode paid Stripe invoice for the current billing period.","operationId":"deleteAgent","parameters":[{"$ref":"#/components/parameters/agent_id"}],"responses":{"204":{"description":"Agent deleted"},"402":{"$ref":"#/components/responses/PaymentRequired"}},"security":[{"bearerAuth":[]}],"tags":["Agents"],"x-constantcoder-requires-paid-invoice":true},"get":{"operationId":"getAgent","parameters":[{"$ref":"#/components/parameters/agent_id"}],"responses":{"200":{"description":"Agent"}},"security":[{"bearerAuth":[]}],"tags":["Agents"]},"patch":{"description":"Requires a successful live-mode paid Stripe invoice for the current billing period.","operationId":"updateAgent","parameters":[{"$ref":"#/components/parameters/agent_id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentRequest"}}},"required":true},"responses":{"200":{"description":"Agent updated"},"402":{"$ref":"#/components/responses/PaymentRequired"}},"security":[{"bearerAuth":[]}],"tags":["Agents"],"x-constantcoder-requires-paid-invoice":true}},"/v1/auth/github/callback":{"post":{"operationId":"exchangeGitHubOAuthCode","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubOAuthCallbackRequest"}}},"required":true},"responses":{"200":{"description":"Authenticated"}},"summary":"Exchange a GitHub OAuth code for ConstantCoder tokens.","tags":["Auth"]}},"/v1/auth/login":{"post":{"operationId":"login","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}},"description":"Authenticated"}},"summary":"Log in with email/password.","tags":["Auth"]}},"/v1/auth/logout":{"post":{"operationId":"logout","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshTokenRequest"}}},"required":true},"responses":{"204":{"description":"Logged out"}},"tags":["Auth"]}},"/v1/auth/me":{"get":{"operationId":"getCurrentUser","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"description":"Current user"},"403":{"$ref":"#/components/responses/Forbidden"}},"security":[{"bearerAuth":[]}],"tags":["Auth"]}},"/v1/auth/refresh":{"post":{"operationId":"refreshToken","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshTokenRequest"}}},"required":true},"responses":{"200":{"description":"Refreshed token"}},"tags":["Auth"]}},"/v1/auth/resend-verification":{"post":{"operationId":"resendVerification","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendVerificationRequest"}}},"required":true},"responses":{"202":{"description":"Verification resent"}},"tags":["Auth"]}},"/v1/auth/signup":{"post":{"operationId":"startEmailSignup","requestBody":{"content":{"application/json":{"examples":{"agentSignup":{"value":{"email":"operator@example.com","name":"Agent Operator","password":"correct-horse-battery"}}},"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationChallengeResponse"}}},"description":"Verification required"},"400":{"$ref":"#/components/responses/BadRequest"},"409":{"$ref":"#/components/responses/Conflict"}},"summary":"Create an email/password account and send an email verification challenge.","tags":["Auth"]}},"/v1/auth/verify-email":{"post":{"operationId":"verifyEmail","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}},"description":"Authenticated"},"401":{"$ref":"#/components/responses/Unauthorized"}},"summary":"Verify an email address with a code or token and receive session tokens.","tags":["Auth"]}},"/v1/billing/setup-intent":{"post":{"operationId":"createBillingSetupIntent","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSetupIntentRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupIntentResponse"}}},"description":"Setup intent"}},"security":[{"bearerAuth":[]}],"tags":["Billing"]}},"/v1/billing/subscriptions":{"post":{"operationId":"createBillingSubscription","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriptionRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}},"description":"Subscription"}},"security":[{"bearerAuth":[]}],"tags":["Billing"]}},"/v1/discovery":{"get":{"operationId":"getDiscovery","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoveryResponse"}}},"description":"Discovery metadata"}},"summary":"Fetch API discovery metadata for agents.","tags":["Discovery"]}},"/v1/github/installations":{"get":{"operationId":"listGitHubInstallations","parameters":[{"in":"query","name":"workspace_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Installations"}},"security":[{"bearerAuth":[]}],"tags":["GitHub"]},"post":{"description":"Requires a successful live-mode paid Stripe invoice for the current billing period.","operationId":"registerGitHubInstallation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterGitHubInstallationRequest"}}},"required":true},"responses":{"201":{"description":"Installation registered"},"402":{"$ref":"#/components/responses/PaymentRequired"}},"security":[{"bearerAuth":[]}],"tags":["GitHub"],"x-constantcoder-requires-paid-invoice":true}},"/v1/github/installations/exchange":{"post":{"description":"Requires a successful live-mode paid Stripe invoice for the current billing period.","operationId":"exchangeGitHubInstallation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeGitHubInstallationRequest"}}},"required":true},"responses":{"201":{"description":"Installation exchanged and repositories synced"},"402":{"$ref":"#/components/responses/PaymentRequired"}},"security":[{"bearerAuth":[]}],"tags":["GitHub"],"x-constantcoder-requires-paid-invoice":true}},"/v1/github/installations/{id}":{"delete":{"operationId":"deleteGitHubInstallation","parameters":[{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"Installation deleted"}},"security":[{"bearerAuth":[]}],"tags":["GitHub"]},"get":{"operationId":"getGitHubInstallation","parameters":[{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"Installation"}},"security":[{"bearerAuth":[]}],"tags":["GitHub"]}},"/v1/github/installations/{id}/repos":{"get":{"operationId":"listGitHubInstallationRepos","parameters":[{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"Repositories"}},"security":[{"bearerAuth":[]}],"tags":["GitHub"]}},"/v1/github/installations/{id}/repos/sync":{"post":{"description":"Requires a successful live-mode paid Stripe invoice for the current billing period.","operationId":"syncGitHubInstallationRepos","parameters":[{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"Repositories synced"},"402":{"$ref":"#/components/responses/PaymentRequired"}},"security":[{"bearerAuth":[]}],"tags":["GitHub"],"x-constantcoder-requires-paid-invoice":true}},"/v1/jobs":{"get":{"operationId":"listJobs","parameters":[{"in":"query","name":"workspace_id","schema":{"format":"uuid","type":"string"}},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"}],"responses":{"200":{"description":"Jobs"}},"security":[{"bearerAuth":[]}],"tags":["Jobs"]},"post":{"description":"Creates a job in a workspace with a successful live-mode paid Stripe invoice for the current billing period and queues the first run.","operationId":"createJob","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateJobRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}},"description":"Job created"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"}},"security":[{"bearerAuth":[]}],"tags":["Jobs"],"x-constantcoder-requires-paid-invoice":true}},"/v1/jobs/{job_id}":{"get":{"operationId":"getJob","parameters":[{"$ref":"#/components/parameters/job_id"}],"responses":{"200":{"description":"Job"}},"security":[{"bearerAuth":[]}],"tags":["Jobs"]}},"/v1/jobs/{job_id}/cancel":{"post":{"operationId":"cancelJob","parameters":[{"$ref":"#/components/parameters/job_id"}],"responses":{"200":{"description":"Job canceled"}},"security":[{"bearerAuth":[]}],"tags":["Jobs"]}},"/v1/jobs/{job_id}/checkpoints/latest":{"get":{"operationId":"getLatestJobCheckpoint","parameters":[{"$ref":"#/components/parameters/job_id"}],"responses":{"200":{"description":"Latest job checkpoint"}},"security":[{"bearerAuth":[]}],"tags":["Runs"]}},"/v1/jobs/{job_id}/events":{"get":{"operationId":"listJobEvents","parameters":[{"$ref":"#/components/parameters/job_id"}],"responses":{"200":{"description":"Events"}},"security":[{"bearerAuth":[]}],"tags":["Jobs"]}},"/v1/jobs/{job_id}/events/stream":{"get":{"operationId":"streamJobEvents","parameters":[{"$ref":"#/components/parameters/job_id"},{"in":"query","name":"after","schema":{"format":"uuid","type":"string"}},{"description":"Short-lived stream token from createEventStreamToken for SSE clients that cannot send Authorization headers.","in":"query","name":"token","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"text/event-stream":{"schema":{"type":"string"}}},"description":"Server-sent event stream"}},"security":[{"bearerAuth":[]},{"eventStreamToken":[]}],"tags":["Jobs"]}},"/v1/jobs/{job_id}/events/stream-token":{"post":{"operationId":"createEventStreamToken","parameters":[{"$ref":"#/components/parameters/job_id"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventStreamTokenResponse"}}},"description":"Event stream token"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}},"security":[{"bearerAuth":[]}],"summary":"Create a short-lived signed token for job event streaming.","tags":["Jobs"]}},"/v1/jobs/{job_id}/pause":{"post":{"operationId":"pauseJob","parameters":[{"$ref":"#/components/parameters/job_id"}],"responses":{"200":{"description":"Job paused"}},"security":[{"bearerAuth":[]}],"tags":["Jobs"]}},"/v1/jobs/{job_id}/resume":{"post":{"description":"Requires a successful live-mode paid Stripe invoice for the current billing period.","operationId":"resumeJob","parameters":[{"$ref":"#/components/parameters/job_id"}],"responses":{"200":{"description":"Job resumed"},"402":{"$ref":"#/components/responses/PaymentRequired"}},"security":[{"bearerAuth":[]}],"tags":["Jobs"],"x-constantcoder-requires-paid-invoice":true}},"/v1/jobs/{job_id}/runs":{"get":{"operationId":"listJobRuns","parameters":[{"$ref":"#/components/parameters/job_id"}],"responses":{"200":{"description":"Runs"}},"security":[{"bearerAuth":[]}],"tags":["Runs"]}},"/v1/metrics/cost-breakdown":{"get":{"operationId":"getModelCostBreakdown","responses":{"200":{"description":"Model cost breakdown"}},"security":[{"bearerAuth":[]}],"tags":["Models"]}},"/v1/metrics/models":{"get":{"operationId":"getModelPerformance","responses":{"200":{"description":"Model performance"}},"security":[{"bearerAuth":[]}],"tags":["Models"]}},"/v1/metrics/quality":{"get":{"operationId":"getQualityTrends","responses":{"200":{"description":"Quality trends"}},"security":[{"bearerAuth":[]}],"tags":["Models"]}},"/v1/metrics/recent":{"get":{"operationId":"getRecentMetrics","responses":{"200":{"description":"Recent metrics"}},"security":[{"bearerAuth":[]}],"tags":["Models"]}},"/v1/models":{"get":{"operationId":"listModels","responses":{"200":{"description":"Models"}},"security":[{"bearerAuth":[]}],"tags":["Models"]}},"/v1/oauth/github/callback":{"get":{"operationId":"githubOAuthCallback","parameters":[{"in":"query","name":"code","required":true,"schema":{"type":"string"}}],"responses":{"302":{"description":"Redirect"}},"tags":["Integrations"]}},"/v1/oauth/github/init/{workspace_id}":{"get":{"description":"Requires a successful live-mode paid Stripe invoice for the current billing period.","operationId":"initGitHubOAuth","parameters":[{"$ref":"#/components/parameters/workspace_id"}],"responses":{"200":{"description":"OAuth URL"},"402":{"$ref":"#/components/responses/PaymentRequired"}},"security":[{"bearerAuth":[]}],"tags":["Integrations"],"x-constantcoder-requires-paid-invoice":true}},"/v1/oauth/jira/callback":{"get":{"operationId":"jiraOAuthCallback","parameters":[{"in":"query","name":"code","required":true,"schema":{"type":"string"}}],"responses":{"302":{"description":"Redirect"}},"tags":["Integrations"]}},"/v1/oauth/jira/init/{workspace_id}":{"get":{"description":"Requires a successful live-mode paid Stripe invoice for the current billing period.","operationId":"initJiraOAuth","parameters":[{"$ref":"#/components/parameters/workspace_id"}],"responses":{"200":{"description":"OAuth URL"},"402":{"$ref":"#/components/responses/PaymentRequired"}},"security":[{"bearerAuth":[]}],"tags":["Integrations"],"x-constantcoder-requires-paid-invoice":true}},"/v1/oauth/linear/callback":{"get":{"operationId":"linearOAuthCallback","parameters":[{"in":"query","name":"code","required":true,"schema":{"type":"string"}}],"responses":{"302":{"description":"Redirect"}},"tags":["Integrations"]}},"/v1/oauth/linear/init/{workspace_id}":{"get":{"description":"Requires a successful live-mode paid Stripe invoice for the current billing period.","operationId":"initLinearOAuth","parameters":[{"$ref":"#/components/parameters/workspace_id"}],"responses":{"200":{"description":"OAuth URL"},"402":{"$ref":"#/components/responses/PaymentRequired"}},"security":[{"bearerAuth":[]}],"tags":["Integrations"],"x-constantcoder-requires-paid-invoice":true}},"/v1/repo-build-configs":{"get":{"operationId":"listRepoBuildConfigs","parameters":[{"in":"query","name":"workspace_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Repo build configs"}},"security":[{"bearerAuth":[]}],"tags":["Repo Build Configs"]},"post":{"description":"Requires a successful live-mode paid Stripe invoice for the current billing period.","operationId":"createRepoBuildConfig","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRepoBuildConfigRequest"}}},"required":true},"responses":{"201":{"description":"Repo build config"},"402":{"$ref":"#/components/responses/PaymentRequired"}},"security":[{"bearerAuth":[]}],"tags":["Repo Build Configs"],"x-constantcoder-requires-paid-invoice":true}},"/v1/repo-build-configs/detect":{"post":{"description":"Requires a successful live-mode paid Stripe invoice for the current billing period.","operationId":"detectRepoBuildConfig","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectBuildConfigRequest"}}},"required":true},"responses":{"200":{"description":"Detected build config"},"402":{"$ref":"#/components/responses/PaymentRequired"}},"security":[{"bearerAuth":[]}],"tags":["Repo Build Configs"],"x-constantcoder-requires-paid-invoice":true}},"/v1/repo-build-configs/{id}":{"delete":{"operationId":"deleteRepoBuildConfig","parameters":[{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"Repo build config deleted"}},"security":[{"bearerAuth":[]}],"tags":["Repo Build Configs"]},"get":{"operationId":"getRepoBuildConfig","parameters":[{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"Repo build config"}},"security":[{"bearerAuth":[]}],"tags":["Repo Build Configs"]},"patch":{"description":"Requires a successful live-mode paid Stripe invoice for the current billing period.","operationId":"updateRepoBuildConfig","parameters":[{"$ref":"#/components/parameters/id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRepoBuildConfigRequest"}}},"required":true},"responses":{"200":{"description":"Repo build config updated"},"402":{"$ref":"#/components/responses/PaymentRequired"}},"security":[{"bearerAuth":[]}],"tags":["Repo Build Configs"],"x-constantcoder-requires-paid-invoice":true}},"/v1/repo-build-configs/{id}/verify":{"post":{"description":"Requires a successful live-mode paid Stripe invoice for the current billing period.","operationId":"verifyRepoBuildConfig","parameters":[{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"Verification started"},"402":{"$ref":"#/components/responses/PaymentRequired"}},"security":[{"bearerAuth":[]}],"tags":["Repo Build Configs"],"x-constantcoder-requires-paid-invoice":true}},"/v1/runs/dispatch":{"post":{"description":"Requires a successful live-mode paid Stripe invoice for the current billing period.","operationId":"dispatchRun","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DispatchRunRequest"}}},"required":true},"responses":{"201":{"description":"Run dispatched"},"402":{"$ref":"#/components/responses/PaymentRequired"}},"security":[{"bearerAuth":[]}],"tags":["Runs"],"x-constantcoder-requires-paid-invoice":true}},"/v1/runs/{run_id}":{"get":{"operationId":"getRun","parameters":[{"$ref":"#/components/parameters/run_id"}],"responses":{"200":{"description":"Run"}},"security":[{"bearerAuth":[]}],"tags":["Runs"]}},"/v1/runs/{run_id}/artifacts":{"get":{"operationId":"listRunArtifacts","parameters":[{"$ref":"#/components/parameters/run_id"}],"responses":{"200":{"description":"Artifacts"}},"security":[{"bearerAuth":[]}],"tags":["Runs"]}},"/v1/runs/{run_id}/artifacts/{artifact_id}":{"get":{"operationId":"getRunArtifact","parameters":[{"$ref":"#/components/parameters/run_id"},{"$ref":"#/components/parameters/artifact_id"}],"responses":{"200":{"description":"Artifact"}},"security":[{"bearerAuth":[]}],"tags":["Runs"]}},"/v1/runs/{run_id}/checkpoints":{"get":{"operationId":"listRunCheckpoints","parameters":[{"$ref":"#/components/parameters/run_id"}],"responses":{"200":{"description":"Checkpoints"}},"security":[{"bearerAuth":[]}],"tags":["Runs"]},"post":{"operationId":"createCheckpoint","parameters":[{"$ref":"#/components/parameters/run_id"}],"requestBody":{"$ref":"#/components/requestBodies/Json"},"responses":{"201":{"description":"Checkpoint created"}},"security":[{"bearerAuth":[]}],"tags":["Runs"]}},"/v1/runs/{run_id}/checkpoints/latest":{"get":{"operationId":"getLatestRunCheckpoint","parameters":[{"$ref":"#/components/parameters/run_id"}],"responses":{"200":{"description":"Latest run checkpoint"}},"security":[{"bearerAuth":[]}],"tags":["Runs"]}},"/v1/usage/assignments":{"get":{"operationId":"listUsageAssignments","parameters":[{"in":"query","name":"workspace_id","schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"Assignments"}},"security":[{"bearerAuth":[]}],"tags":["Usage"]},"post":{"description":"Requires a successful live-mode paid Stripe invoice for the current billing period.","operationId":"createUsageAssignment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentAssignmentRequest"}}},"required":true},"responses":{"201":{"description":"Assignment created"},"402":{"$ref":"#/components/responses/PaymentRequired"}},"security":[{"bearerAuth":[]}],"tags":["Usage"],"x-constantcoder-requires-paid-invoice":true}},"/v1/usage/assignments/{id}":{"delete":{"description":"Requires a successful live-mode paid Stripe invoice for the current billing period.","operationId":"deleteUsageAssignment","parameters":[{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"Assignment deactivated"},"402":{"$ref":"#/components/responses/PaymentRequired"}},"security":[{"bearerAuth":[]}],"tags":["Usage"],"x-constantcoder-requires-paid-invoice":true},"get":{"operationId":"getUsageAssignment","parameters":[{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"Assignment"}},"security":[{"bearerAuth":[]}],"tags":["Usage"]},"put":{"description":"Requires a successful live-mode paid Stripe invoice for the current billing period.","operationId":"updateUsageAssignment","parameters":[{"$ref":"#/components/parameters/id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentAssignmentRequest"}}},"required":true},"responses":{"200":{"description":"Assignment updated"},"402":{"$ref":"#/components/responses/PaymentRequired"}},"security":[{"bearerAuth":[]}],"tags":["Usage"],"x-constantcoder-requires-paid-invoice":true}},"/v1/usage/assignments/{id}/budget":{"get":{"operationId":"getDailyBudget","parameters":[{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"Daily budget"}},"security":[{"bearerAuth":[]}],"tags":["Usage"]}},"/v1/usage/cost-report":{"get":{"operationId":"getCostReport","responses":{"200":{"description":"Cost report"}},"security":[{"bearerAuth":[]}],"tags":["Usage"]}},"/v1/usage/sessions":{"get":{"operationId":"listUsageSessions","responses":{"200":{"description":"Usage sessions"}},"security":[{"bearerAuth":[]}],"tags":["Usage"]}},"/v1/usage/summary":{"get":{"operationId":"getUsageSummary","responses":{"200":{"description":"Usage summary"}},"security":[{"bearerAuth":[]}],"tags":["Usage"]}},"/v1/verification-runs/{id}":{"get":{"operationId":"getVerificationRun","parameters":[{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"Verification run"}},"security":[{"bearerAuth":[]}],"tags":["Repo Build Configs"]}},"/v1/waitlist":{"post":{"operationId":"joinWaitlist","requestBody":{"$ref":"#/components/requestBodies/Json"},"responses":{"200":{"description":"Waitlist signup accepted"}},"tags":["Auth"]}},"/v1/webhooks/github":{"post":{"description":"Provider callback endpoint. Do not call from agents directly; requests must include the provider signature header.","operationId":"githubWebhook","requestBody":{"$ref":"#/components/requestBodies/Json"},"responses":{"200":{"description":"Webhook accepted"},"401":{"$ref":"#/components/responses/Unauthorized"}},"security":[{"githubWebhookHmac":[]}],"tags":["Webhooks"]}},"/v1/webhooks/modal":{"post":{"description":"Provider callback endpoint. Do not call from agents directly; requests must include the provider signature header.","operationId":"modalWebhook","requestBody":{"$ref":"#/components/requestBodies/Json"},"responses":{"200":{"description":"Webhook accepted"},"401":{"$ref":"#/components/responses/Unauthorized"}},"security":[{"modalWebhookHmac":[]}],"tags":["Webhooks"]}},"/v1/webhooks/stripe":{"post":{"description":"Provider callback endpoint. Do not call from agents directly; requests must include the provider signature header.","operationId":"stripeWebhook","requestBody":{"$ref":"#/components/requestBodies/Json"},"responses":{"200":{"description":"Webhook accepted"},"401":{"$ref":"#/components/responses/Unauthorized"}},"security":[{"stripeSignature":[]}],"tags":["Webhooks"]}},"/v1/webhooks/task-managers/{provider}":{"post":{"description":"Provider callback endpoint. Do not call from agents directly; requests must include the provider signature header.","operationId":"taskManagerWebhook","parameters":[{"in":"path","name":"provider","required":true,"schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/Json"},"responses":{"200":{"description":"Webhook accepted"},"401":{"$ref":"#/components/responses/Unauthorized"}},"security":[{"taskManagerWebhookHmac":[]}],"tags":["Webhooks"]}},"/v1/workspaces":{"get":{"operationId":"listWorkspaces","responses":{"200":{"description":"Workspaces"}},"security":[{"bearerAuth":[]}],"tags":["Workspaces"]},"post":{"operationId":"createWorkspace","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkspaceRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}},"description":"Workspace created"}},"security":[{"bearerAuth":[]}],"tags":["Workspaces"]}},"/v1/workspaces/{id}":{"get":{"operationId":"getWorkspace","parameters":[{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"Workspace"},"403":{"$ref":"#/components/responses/Forbidden"}},"security":[{"bearerAuth":[]}],"tags":["Workspaces"]}},"/v1/workspaces/{id}/settings":{"get":{"operationId":"getWorkspaceSettings","parameters":[{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"Settings"}},"security":[{"bearerAuth":[]}],"tags":["Workspaces"]},"patch":{"operationId":"updateWorkspaceSettings","parameters":[{"$ref":"#/components/parameters/id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkspaceSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Settings updated"}},"security":[{"bearerAuth":[]}],"tags":["Workspaces"]}},"/v1/workspaces/{workspace_id}/api-keys":{"get":{"operationId":"listWorkspaceApiKeys","parameters":[{"$ref":"#/components/parameters/workspace_id"}],"responses":{"200":{"description":"Workspace API keys"}},"security":[{"bearerAuth":[]}],"tags":["Workspace API Keys"]},"post":{"description":"Requires a JWT user principal, workspace admin role, and a successful live-mode paid Stripe invoice for the current billing period. Workspace API keys cannot create additional keys.","operationId":"createWorkspaceApiKey","parameters":[{"$ref":"#/components/parameters/workspace_id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkspaceApiKeyRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceApiKey"}}},"description":"API key created"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"}},"security":[{"bearerAuth":[]}],"summary":"Create a scoped workspace API key after the workspace has a successful live-mode paid invoice. The full token is returned only once.","tags":["Workspace API Keys"],"x-constantcoder-requires-paid-invoice":true}},"/v1/workspaces/{workspace_id}/api-keys/{key_id}":{"delete":{"operationId":"revokeWorkspaceApiKey","parameters":[{"$ref":"#/components/parameters/workspace_id"},{"$ref":"#/components/parameters/key_id"}],"responses":{"200":{"description":"API key revoked"}},"security":[{"bearerAuth":[]}],"tags":["Workspace API Keys"]}},"/v1/workspaces/{workspace_id}/autopilot":{"get":{"operationId":"getWorkspaceAutopilotSettings","parameters":[{"$ref":"#/components/parameters/workspace_id"}],"responses":{"200":{"description":"Workspace autopilot settings"}},"security":[{"bearerAuth":[]}],"tags":["Autopilot"]},"put":{"description":"Requires a successful live-mode paid Stripe invoice for the current billing period.","operationId":"updateWorkspaceAutopilotSettings","parameters":[{"$ref":"#/components/parameters/workspace_id"}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"required":true},"responses":{"200":{"description":"Updated workspace autopilot settings"},"402":{"$ref":"#/components/responses/PaymentRequired"}},"security":[{"bearerAuth":[]}],"tags":["Autopilot"],"x-constantcoder-requires-paid-invoice":true}},"/v1/workspaces/{workspace_id}/billing/customer":{"get":{"operationId":"getOrCreateBillingCustomer","parameters":[{"$ref":"#/components/parameters/workspace_id"}],"responses":{"200":{"description":"Stripe customer"}},"security":[{"bearerAuth":[]}],"tags":["Billing"]}},"/v1/workspaces/{workspace_id}/billing/enforcement":{"get":{"operationId":"getBillingEnforcement","parameters":[{"$ref":"#/components/parameters/workspace_id"}],"responses":{"200":{"description":"Execution enforcement status"}},"security":[{"bearerAuth":[]}],"tags":["Billing"]}},"/v1/workspaces/{workspace_id}/billing/overage":{"get":{"operationId":"getOverageStatus","parameters":[{"$ref":"#/components/parameters/workspace_id"}],"responses":{"200":{"description":"Overage status"}},"security":[{"bearerAuth":[]}],"tags":["Billing"]}},"/v1/workspaces/{workspace_id}/billing/subscriptions/{subscription_id}":{"delete":{"operationId":"cancelBillingSubscription","parameters":[{"$ref":"#/components/parameters/workspace_id"},{"$ref":"#/components/parameters/subscription_id"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}},"description":"Subscription canceled"}},"security":[{"bearerAuth":[]}],"tags":["Billing"]},"get":{"operationId":"getBillingSubscription","parameters":[{"$ref":"#/components/parameters/workspace_id"},{"$ref":"#/components/parameters/subscription_id"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}},"description":"Subscription"}},"security":[{"bearerAuth":[]}],"tags":["Billing"]}},"/v1/workspaces/{workspace_id}/billing/topups/payment-intents":{"post":{"operationId":"createTopUpPaymentIntent","parameters":[{"$ref":"#/components/parameters/workspace_id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTopUpPaymentIntentRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopUpPaymentIntentResponse"}}},"description":"Top-up payment intent"},"403":{"$ref":"#/components/responses/Forbidden"}},"security":[{"bearerAuth":[]}],"tags":["Billing"]}},"/v1/workspaces/{workspace_id}/credits/balance":{"get":{"operationId":"getCreditBalance","parameters":[{"$ref":"#/components/parameters/workspace_id"}],"responses":{"200":{"description":"Credit balance"}},"security":[{"bearerAuth":[]}],"tags":["Billing"]}},"/v1/workspaces/{workspace_id}/github/install-url":{"get":{"description":"Returns the GitHub App consent URL. Requires workspace admin role and a successful live-mode paid Stripe invoice before repository automation can be connected.","operationId":"createGitHubInstallUrl","parameters":[{"$ref":"#/components/parameters/workspace_id"},{"in":"query","name":"return_url","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubInstallUrlResponse"}}},"description":"GitHub install URL"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"}},"security":[{"bearerAuth":[]}],"summary":"Create an external GitHub App consent URL for API-first onboarding.","tags":["GitHub"],"x-constantcoder-requires-paid-invoice":true}},"/v1/workspaces/{workspace_id}/integrations":{"get":{"operationId":"listIntegrations","parameters":[{"$ref":"#/components/parameters/workspace_id"}],"responses":{"200":{"description":"Integrations"}},"security":[{"bearerAuth":[]}],"tags":["Integrations"]},"post":{"description":"Requires a successful live-mode paid Stripe invoice for the current billing period.","operationId":"createIntegration","parameters":[{"$ref":"#/components/parameters/workspace_id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIntegrationRequest"}}},"required":true},"responses":{"201":{"description":"Integration created"},"402":{"$ref":"#/components/responses/PaymentRequired"}},"security":[{"bearerAuth":[]}],"tags":["Integrations"],"x-constantcoder-requires-paid-invoice":true}},"/v1/workspaces/{workspace_id}/integrations/{integration_id}":{"delete":{"operationId":"deleteIntegration","parameters":[{"$ref":"#/components/parameters/workspace_id"},{"$ref":"#/components/parameters/integration_id"}],"responses":{"204":{"description":"Integration deleted"}},"security":[{"bearerAuth":[]}],"tags":["Integrations"]},"get":{"operationId":"getIntegration","parameters":[{"$ref":"#/components/parameters/workspace_id"},{"$ref":"#/components/parameters/integration_id"}],"responses":{"200":{"description":"Integration"}},"security":[{"bearerAuth":[]}],"tags":["Integrations"]},"patch":{"description":"Requires a successful live-mode paid Stripe invoice for the current billing period.","operationId":"updateIntegration","parameters":[{"$ref":"#/components/parameters/workspace_id"},{"$ref":"#/components/parameters/integration_id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateIntegrationRequest"}}},"required":true},"responses":{"200":{"description":"Integration updated"},"402":{"$ref":"#/components/responses/PaymentRequired"}},"security":[{"bearerAuth":[]}],"tags":["Integrations"],"x-constantcoder-requires-paid-invoice":true}},"/v1/workspaces/{workspace_id}/planner-items":{"get":{"operationId":"listPlannerItems","parameters":[{"$ref":"#/components/parameters/workspace_id"}],"responses":{"200":{"description":"Planner backlog items"}},"security":[{"bearerAuth":[]}],"tags":["Planner"]}},"/v1/workspaces/{workspace_id}/planner-items/{item_id}/promote":{"post":{"description":"Requires a successful live-mode paid Stripe invoice for the current billing period.","operationId":"promotePlannerItem","parameters":[{"$ref":"#/components/parameters/workspace_id"},{"in":"path","name":"item_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotePlannerItemRequest"}}},"required":true},"responses":{"200":{"description":"Promoted planner item"},"402":{"$ref":"#/components/responses/PaymentRequired"}},"security":[{"bearerAuth":[]}],"tags":["Planner"],"x-constantcoder-requires-paid-invoice":true}},"/v1/workspaces/{workspace_id}/planner-items/{item_id}/suppress":{"post":{"operationId":"suppressPlannerItem","parameters":[{"$ref":"#/components/parameters/workspace_id"},{"in":"path","name":"item_id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressPlannerItemRequest"}}},"required":true},"responses":{"200":{"description":"Suppressed planner item"}},"security":[{"bearerAuth":[]}],"tags":["Planner"]}},"/v1/workspaces/{workspace_id}/planner/explain":{"get":{"operationId":"explainPlanner","parameters":[{"$ref":"#/components/parameters/workspace_id"}],"responses":{"200":{"description":"Planner explanation"}},"security":[{"bearerAuth":[]}],"tags":["Planner"]}}},"servers":[{"url":"https://api.constantcoder.ai"}],"tags":[{"name":"Discovery"},{"name":"Auth"},{"name":"Workspaces"},{"name":"Workspace API Keys"},{"name":"GitHub"},{"name":"Agents"},{"name":"Jobs"},{"name":"Runs"},{"name":"Usage"},{"name":"Billing"},{"name":"Integrations"},{"name":"Repo Build Configs"},{"name":"Models"},{"name":"Webhooks"}]}