codai Projects & Environments API

Cloud Environments control plane. A **project** groups environments (repository, default branch, devcontainer path, isolation mode); an **environment** is one machine reachable through the relay via the `codaid` daemon. Members, forwarded ports, sealed secrets and an append-only event log hang off the environment. Visibility: you see a project if you own it or belong to its org; you see an environment if you own it, are a member of it, or belong to its org. Unknown or foreign ids always answer 404 (never 403) so ids cannot be enumerated; a role violation on a resource you CAN see answers 403. Environment roles: `owner` ≥ `maintainer` ≥ `developer` ≥ `viewer` — the environment owner and org owners/admins act as `owner`. Isolation `vm_per_dev` pins one live environment per developer (`for_user_id`): creating a second one answers 409 `already_has_env` carrying the `environment_id` to reuse, and such environments have exactly one member (409 `vm_per_dev_single_member`). Every mutation appends an `environment_events` row. Managed providers (`openstack`, `hetzner`, `local`) are feature-gated (403 until enabled for the key); `byo` — bring your own machine — is open to every key. Project and environment rows are returned camelCase (as stored); request bodies and member/secret lists are snake_case, mirrored here exactly as the gateway sends them. Live daemon state (online, activity, listening ports, git state, attached clients, locks) is served by the **relay**, not the gateway: `GET https://relay.codai.ro/v1/environments/{id}/status`, same bearer key, same 404 rule. It is modelled as the `RelayEnvironmentStatus` path item under `components.pathItems` because it lives on a different host.

GitHub OpenAPI

Operations 39

GET /v1/projects List your projects #
POST /v1/projects Create a project #
GET /v1/projects/{id} Get a project with its environments #
PATCH /v1/projects/{id} Update a project #
DELETE /v1/projects/{id} Delete a project #
GET /v1/environments List environments #
POST /v1/environments Create an environment #
POST /v1/environments/enroll Enrol a daemon (token auth, no API key) #
GET /v1/environments/{id} Get an environment #
PATCH /v1/environments/{id} Rename or change the idle timeout #
POST /v1/environments/{id}/start Start a stopped environment #
POST /v1/environments/{id}/stop Stop a running environment #
POST /v1/environments/{id}/archive Archive an environment #
POST /v1/environments/{id}/destroy Destroy an environment #
POST /v1/environments/{id}/enroll-token Mint a one-time enrolment token #
GET /v1/environments/{id}/members List members #
POST /v1/environments/{id}/members Add a member #
PUT /v1/environments/{id}/members/me/ssh-key Set your SSH public key #
POST /v1/environments/{id}/members/me/ssh-cert Issue a short-lived SSH certificate #
GET /v1/environments/{id}/ssh-ca Get the SSH CA public keys #
PATCH /v1/environments/{id}/members/{userId} Change a member's role #
DELETE /v1/environments/{id}/members/{userId} Remove a member (or leave) #
GET /v1/environments/{id}/ports List forwarded ports #
PUT /v1/environments/{id}/ports/{port} Publish a port or change its visibility #
DELETE /v1/environments/{id}/ports/{port} Unpublish a port #
GET /v1/environments/{id}/secrets List secret names #
PUT /v1/environments/{id}/secrets/{name} Set a secret #
DELETE /v1/environments/{id}/secrets/{name} Delete a secret #
GET /v1/environments/{id}/tasks List agent tasks #
POST /v1/environments/{id}/tasks Queue a fire-and-forget agent task #
GET /v1/environments/{id}/tasks/{taskId} Get one agent task #
POST /v1/environments/{id}/exec Run an operation in an environment #
GET /v1/verify/agent-output/key Public key for agent-output signatures (experimental) #
POST /v1/verify/agent-output Verify a signed agent output (experimental) #
GET /v1/environments/{id}/files List files in an environment #
GET /v1/environments/{id}/files/{path} Read a file from an environment #
PUT /v1/environments/{id}/files/{path} Write a file in an environment #
POST /v1/environments/{id}/jobs Start a background job in an environment #
GET /v1/environments/{id}/jobs/{jobId} Get a background job and its output #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/codai-ro:codai-ro-projects-environments-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

codai-ro-projects-environments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Codai Ro Projects & Environments API
  version: '1'
  description: 'Operations tagged Projects & Environments across 2 of this provider''s published API definitions: codai-ro-gateway-openapi.json, codai-ro-gateway-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://ai.codai.ro
  description: Production
security:
- bearerAuth: []
tags:


# --- truncated at 32 KB (107 KB total) ---
# Full source: https://artifacts.apis.io/codai-ro/openapi/codai-ro-projects-environments-api-openapi.yml