{"openapi":"3.1.0","info":{"title":"env0 (BYOK) API","version":"0.1.0","description":"env0 (BYOK) lets an AI assistant read your own env0 data through the env0 API with a key you supply (API key ID). Read-only: 8 tools (list_organizations, list_projects, list_environments, get_environment, list_deployments, list_templates, list_agents, get_organization_costs). The BYOK key travels with each request, is used for that one call only and is never stored, logged or cached; it is only...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-env0.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-env0/docs"},"termsOfService":"https://connectorbay.com/byok-env0/terms"},"servers":[{"url":"https://byok-env0.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-env0/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_organizations":{"post":{"operationId":"list_organizations","summary":"List the env0 organizations the API key belongs to with name, role, billing mode and creation date. Use for \"Which env0 ","description":"List the env0 organizations the API key belongs to with name, role, billing mode and creation date. Use for \"Which env0 organizations can my key access\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_organizationsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_projects":{"post":{"operationId":"list_projects","summary":"List an organization's env0 projects with name, description, tags, parent project and archive flag. Use for \"What projec","description":"List an organization's env0 projects with name, description, tags, parent project and archive flag. Use for \"What projects exist in my env0 organization\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization_id":{"description":"env0 organization ID; list_organizations returns it.","maxLength":200,"title":"Organization Id","type":"string"},"is_archived":{"anyOf":[{"enum":["true","false"],"type":"string"},{"type":"null"}],"default":null,"description":"true to list archived projects, false for active ones.","title":"Is Archived"}},"required":["organization_id"],"title":"list_projectsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_environments":{"post":{"operationId":"list_environments","summary":"List env0 environments with status, drift status, project, workspace name and tags, filterable by project, name, drift s","description":"List env0 environments with status, drift status, project, workspace name and tags, filterable by project, name, drift status and activity. Use for \"Which env0 environments are drifted or failing\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only environments of this organization.","title":"Organization Id"},"project_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only environments of this project.","title":"Project Id"},"name":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only environments with exactly this name.","title":"Name"},"search_text":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Free-text search over environments.","title":"Search Text"},"drift_status":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated drift statuses: ERROR, DRIFTED, OK, NEVER_RUN, DISABLED.","title":"Drift Status"},"is_active":{"anyOf":[{"enum":["true","false"],"type":"string"},{"type":"null"}],"default":null,"description":"true for active environments, false for inactive ones.","title":"Is Active"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (1 to 100).","title":"Limit"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many results to skip, for paging.","title":"Offset"}},"title":"list_environmentsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_environment":{"post":{"operationId":"get_environment","summary":"Get one env0 environment: status, drift status, lock state, auto-destroy time, tags and its latest deployment ID. Use fo","description":"Get one env0 environment: status, drift status, lock state, auto-destroy time, tags and its latest deployment ID. Use for \"Show the details of this env0 environment\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"environment_id":{"description":"env0 environment ID (UUID); list_environments returns it.","maxLength":200,"title":"Environment Id","type":"string"}},"required":["environment_id"],"title":"get_environmentArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_deployments":{"post":{"operationId":"list_deployments","summary":"List deployments of an env0 environment with type, status, start and finish times, template and revision, resource count","description":"List deployments of an env0 environment with type, status, start and finish times, template and revision, resource count and failed command. Use for \"How did the recent deployments of this env0 environment go\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"environment_id":{"description":"env0 environment ID (UUID); list_environments returns it.","maxLength":200,"title":"Environment Id","type":"string"},"statuses":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated deployment statuses to keep, for example FAILURE,SUCCESS.","title":"Statuses"},"deployment_types":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated deployment types in camel case, for example deploy,destroy.","title":"Deployment Types"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (1 to 100).","title":"Limit"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"How many results to skip, for paging.","title":"Offset"}},"required":["environment_id"],"title":"list_deploymentsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_templates":{"post":{"operationId":"list_templates","summary":"List env0 templates (the IaC sources environments deploy from) with repository, revision, path, type and Terraform or Op","description":"List env0 templates (the IaC sources environments deploy from) with repository, revision, path, type and Terraform or OpenTofu version. Use for \"What templates does my env0 organization have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only templates of this organization.","title":"Organization Id"},"project_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only templates of this project.","title":"Project Id"},"name":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Exact template name (needs organization_id).","title":"Name"}},"title":"list_templatesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_agents":{"post":{"operationId":"list_agents","summary":"List the agents that run env0 deployments with name, status, SaaS or self-hosted, default flag, version and queue health","description":"List the agents that run env0 deployments with name, status, SaaS or self-hosted, default flag, version and queue health. Use for \"Are my env0 agents healthy\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization_id":{"description":"env0 organization ID; list_organizations returns it.","maxLength":200,"title":"Organization Id","type":"string"}},"required":["organization_id"],"title":"list_agentsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_organization_costs":{"post":{"operationId":"get_organization_costs","summary":"Get cloud cost data points of an organization by date and provider (AWS, GCP, Azure) for a timespan, optionally accumula","description":"Get cloud cost data points of an organization by date and provider (AWS, GCP, Azure) for a timespan, optionally accumulated. Use for \"How much did my env0-managed infrastructure cost this month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization_id":{"description":"env0 organization ID; list_organizations returns it.","maxLength":200,"title":"Organization Id","type":"string"},"timespan":{"anyOf":[{"enum":["DAY","WEEK","MONTH","QUARTER","YEAR"],"type":"string"},{"type":"null"}],"default":null,"description":"Period: DAY, WEEK, MONTH, QUARTER or YEAR.","title":"Timespan"},"granularity":{"anyOf":[{"enum":["DAILY","HOURLY"],"type":"string"},{"type":"null"}],"default":null,"description":"DAILY or HOURLY records.","title":"Granularity"},"project_ids":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated project IDs to limit the costs to.","title":"Project Ids"},"accumulated":{"anyOf":[{"enum":["true","false"],"type":"string"},{"type":"null"}],"default":null,"description":"true for one summed figure instead of individual records.","title":"Accumulated"}},"required":["organization_id"],"title":"get_organization_costsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}