Services
List the services in an environment
curl https://api.koo.io/accounts/:accountId/projects/:projectId/environments/:environmentId/services \ -H "Authorization: Bearer kc_your_api_token"[ { "id": "svc_01example0000000000000000x", "name": "my-app", "type": "web", "cpu": 1, "memory": 1, "exposed": true, "source": { "type": "git", "git": { "provider": "github", "repoUrl": "https://example.com", "branch": "example", "autoDeploy": true }, "image": { "ref": "example" } }, "imagePullCredentialsSet": true, "runtime": { "port": 8080, "protocol": "http", "healthCheckPath": "example", "entrypoint": { "command": "example", "args": [ "example" ] } }, "serverless": { "enabled": true }, "cron": { "enabled": true, "schedule": "example" }, "volume": { "id": "svc_01example0000000000000000x", "mountPath": "example", "sizeGb": 0, "name": "my-app" }, "locations": [ { "name": "my-app", "replicas": 1 } ], "domains": [ { "hostname": "example", "mode": "cname", "status": "pending", "statusReason": "example", "dnsRecords": [ { "type": "TXT", "name": "my-app", "value": "example" } ] } ], "status": { "applied": "pending", "build": "pending", "health": "online", "errors": [ { "source": "applied", "code": "dns_propagating", "resource": "example", "message": "example", "at": "2026-01-01T00:00:00.000Z" } ], "warnings": [ { "source": "applied", "code": "dns_propagating", "resource": "example", "message": "example", "at": "2026-01-01T00:00:00.000Z" } ], "url": "https://example.com", "lastDeployment": { "id": "svc_01example0000000000000000x", "version": 3 }, "appliedAt": "2026-01-01T00:00:00.000Z", "statusObservedAt": "2026-01-01T00:00:00.000Z" }, "internalHost": "example", "connection": { "key": "example" } }]Create a service in an environment
Creates the service. A deployable web service (git/image source) starts rolling out immediately — create is deploy.
Service name — lowercase letters, digits and dashes (3–16 chars, starts with a letter). The name is the service identity within the environment: renaming creates a new service.
Service kind: `web` runs your own code; `postgres`/`redis` are managed addons. Immutable per name.
CPU limit in millicores (250, 500, or whole-vCPU multiples of 1000).
Memory limit in MiB (256, 512, or whole-GiB multiples of 1024).
Expose the service publicly with its own URL (web services only).
Optional credential overrides for a managed database addon (postgres/redis), applied at create time. Ignored for web services.
Registry credentials for a private image source (requires an image source with a ref). Write-only — a read returns only `imagePullCredentialsSet`.
Variables to apply atomically with the service create (same shape as POST …/variables).
Where the deployable artifact comes from.
Runtime configuration (port, protocol, health check, entrypoint). Variables are managed separately via the /variables endpoints.
Run as a scale-to-zero serverless workload (web only; mutually exclusive with cron/volume).
Run as a scheduled cron job (web only; mutually exclusive with serverless/volume).
Attach, create, or detach a persistent volume (web only; mutually exclusive with serverless/cron).
Locations this service runs in, each with its replica count.
The full desired set of custom hostnames routed to this exposed service. Omit to leave unchanged; send `[]` to remove all. Re-read the service to see each hostname’s DNS records + live status.
Unique identifier of the service (read-only).
Service name — lowercase letters, digits and dashes (3–16 chars, starts with a letter). The name is the service identity within the environment: renaming creates a new service.
Service kind: `web` runs your own code; `postgres`/`redis` are managed addons.
CPU limit in millicores (250, 500, or whole-vCPU multiples of 1000).
Memory limit in MiB (256, 512, or whole-GiB multiples of 1024).
Whether the service is publicly reachable with its own URL (web services only).
Where the deployable artifact comes from.
Read-only: true when private-image registry credentials are stored for this service. The credentials themselves are never returned.
Runtime configuration (port, protocol, health check, entrypoint). Variables are managed separately.
Present when the service runs as a scale-to-zero serverless workload.
Present when the service runs as a scheduled cron job.
Present when the service has an attached persistent volume.
Locations this service runs in, each with its replica count.
Read-only: the custom domains routing to this service, with DNS records + live status.
Read-only: live status of the service.
Read-only: the internal DNS host other services reach this one at, for service-to-service wiring.
Read-only: non-secret connection details for a managed addon (postgres/redis).
curl https://api.koo.io/accounts/:accountId/projects/:projectId/environments/:environmentId/services \ -X POST \ -H "Authorization: Bearer kc_your_api_token" \ -H "Content-Type: application/json" \ -d '{ "name": "my-app", "type": "web", "cpu": 1, "memory": 1 }'{ "id": "svc_01example0000000000000000x", "name": "my-app", "type": "web", "cpu": 1, "memory": 1, "exposed": true, "source": { "type": "git", "git": { "provider": "github", "repoUrl": "https://example.com", "branch": "example", "autoDeploy": true }, "image": { "ref": "example" } }, "imagePullCredentialsSet": true, "runtime": { "port": 8080, "protocol": "http", "healthCheckPath": "example", "entrypoint": { "command": "example", "args": [ "example" ] } }, "serverless": { "enabled": true }, "cron": { "enabled": true, "schedule": "example" }, "volume": { "id": "svc_01example0000000000000000x", "mountPath": "example", "sizeGb": 0, "name": "my-app" }, "locations": [ { "name": "my-app", "replicas": 1 } ], "domains": [ { "hostname": "example", "mode": "cname", "status": "pending", "statusReason": "example", "dnsRecords": [ { "type": "TXT", "name": "my-app", "value": "example" } ] } ], "status": { "applied": "pending", "build": "pending", "health": "online", "errors": [ { "source": "applied", "code": "dns_propagating", "resource": "example", "message": "example", "at": "2026-01-01T00:00:00.000Z" } ], "warnings": [ { "source": "applied", "code": "dns_propagating", "resource": "example", "message": "example", "at": "2026-01-01T00:00:00.000Z" } ], "url": "https://example.com", "lastDeployment": { "id": "svc_01example0000000000000000x", "version": 3 }, "appliedAt": "2026-01-01T00:00:00.000Z", "statusObservedAt": "2026-01-01T00:00:00.000Z" }, "internalHost": "example", "connection": { "key": "example" }}Get a service
Service name within the environment.
Unique identifier of the service (read-only).
Service name — lowercase letters, digits and dashes (3–16 chars, starts with a letter). The name is the service identity within the environment: renaming creates a new service.
Service kind: `web` runs your own code; `postgres`/`redis` are managed addons.
CPU limit in millicores (250, 500, or whole-vCPU multiples of 1000).
Memory limit in MiB (256, 512, or whole-GiB multiples of 1024).
Whether the service is publicly reachable with its own URL (web services only).
Where the deployable artifact comes from.
Read-only: true when private-image registry credentials are stored for this service. The credentials themselves are never returned.
Runtime configuration (port, protocol, health check, entrypoint). Variables are managed separately.
Present when the service runs as a scale-to-zero serverless workload.
Present when the service runs as a scheduled cron job.
Present when the service has an attached persistent volume.
Locations this service runs in, each with its replica count.
Read-only: the custom domains routing to this service, with DNS records + live status.
Read-only: live status of the service.
Read-only: the internal DNS host other services reach this one at, for service-to-service wiring.
Read-only: non-secret connection details for a managed addon (postgres/redis).
curl https://api.koo.io/accounts/:accountId/projects/:projectId/environments/:environmentId/services/:name \ -H "Authorization: Bearer kc_your_api_token"{ "id": "svc_01example0000000000000000x", "name": "my-app", "type": "web", "cpu": 1, "memory": 1, "exposed": true, "source": { "type": "git", "git": { "provider": "github", "repoUrl": "https://example.com", "branch": "example", "autoDeploy": true }, "image": { "ref": "example" } }, "imagePullCredentialsSet": true, "runtime": { "port": 8080, "protocol": "http", "healthCheckPath": "example", "entrypoint": { "command": "example", "args": [ "example" ] } }, "serverless": { "enabled": true }, "cron": { "enabled": true, "schedule": "example" }, "volume": { "id": "svc_01example0000000000000000x", "mountPath": "example", "sizeGb": 0, "name": "my-app" }, "locations": [ { "name": "my-app", "replicas": 1 } ], "domains": [ { "hostname": "example", "mode": "cname", "status": "pending", "statusReason": "example", "dnsRecords": [ { "type": "TXT", "name": "my-app", "value": "example" } ] } ], "status": { "applied": "pending", "build": "pending", "health": "online", "errors": [ { "source": "applied", "code": "dns_propagating", "resource": "example", "message": "example", "at": "2026-01-01T00:00:00.000Z" } ], "warnings": [ { "source": "applied", "code": "dns_propagating", "resource": "example", "message": "example", "at": "2026-01-01T00:00:00.000Z" } ], "url": "https://example.com", "lastDeployment": { "id": "svc_01example0000000000000000x", "version": 3 }, "appliedAt": "2026-01-01T00:00:00.000Z", "statusObservedAt": "2026-01-01T00:00:00.000Z" }, "internalHost": "example", "connection": { "key": "example" }}Update a service spec
A deployable source change rolls out automatically.
Service name within the environment.
CPU limit in millicores (250, 500, or whole-vCPU multiples of 1000).
Memory limit in MiB (256, 512, or whole-GiB multiples of 1024).
Expose the service publicly with its own URL (web services only).
Acknowledge permanent data loss when a change destroys a persistent volume (e.g. switching a volume service to another mode without first detaching). Required for that specific change.
Acknowledge that unexposing this service degrades an active published app that points at it (the listing loses its Visit URL). Required for that specific change.
Credentials for pulling a private container image (write-only).
Where the deployable artifact comes from.
Runtime configuration (port, protocol, health check, entrypoint). Variables are managed separately via the /variables endpoints.
Run as a scale-to-zero serverless workload (web only; mutually exclusive with cron/volume).
Run as a scheduled cron job (web only; mutually exclusive with serverless/volume).
Attach, create, or detach a persistent volume (web only; mutually exclusive with serverless/cron).
Locations this service runs in, each with its replica count.
The full desired set of custom hostnames routed to this exposed service. Omit to leave unchanged; send `[]` to remove all. Re-read the service to see each hostname’s DNS records + live status.
Unique identifier of the service (read-only).
Service name — lowercase letters, digits and dashes (3–16 chars, starts with a letter). The name is the service identity within the environment: renaming creates a new service.
Service kind: `web` runs your own code; `postgres`/`redis` are managed addons.
CPU limit in millicores (250, 500, or whole-vCPU multiples of 1000).
Memory limit in MiB (256, 512, or whole-GiB multiples of 1024).
Whether the service is publicly reachable with its own URL (web services only).
Where the deployable artifact comes from.
Read-only: true when private-image registry credentials are stored for this service. The credentials themselves are never returned.
Runtime configuration (port, protocol, health check, entrypoint). Variables are managed separately.
Present when the service runs as a scale-to-zero serverless workload.
Present when the service runs as a scheduled cron job.
Present when the service has an attached persistent volume.
Locations this service runs in, each with its replica count.
Read-only: the custom domains routing to this service, with DNS records + live status.
Read-only: live status of the service.
Read-only: the internal DNS host other services reach this one at, for service-to-service wiring.
Read-only: non-secret connection details for a managed addon (postgres/redis).
curl https://api.koo.io/accounts/:accountId/projects/:projectId/environments/:environmentId/services/:name \ -X PATCH \ -H "Authorization: Bearer kc_your_api_token" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "svc_01example0000000000000000x", "name": "my-app", "type": "web", "cpu": 1, "memory": 1, "exposed": true, "source": { "type": "git", "git": { "provider": "github", "repoUrl": "https://example.com", "branch": "example", "autoDeploy": true }, "image": { "ref": "example" } }, "imagePullCredentialsSet": true, "runtime": { "port": 8080, "protocol": "http", "healthCheckPath": "example", "entrypoint": { "command": "example", "args": [ "example" ] } }, "serverless": { "enabled": true }, "cron": { "enabled": true, "schedule": "example" }, "volume": { "id": "svc_01example0000000000000000x", "mountPath": "example", "sizeGb": 0, "name": "my-app" }, "locations": [ { "name": "my-app", "replicas": 1 } ], "domains": [ { "hostname": "example", "mode": "cname", "status": "pending", "statusReason": "example", "dnsRecords": [ { "type": "TXT", "name": "my-app", "value": "example" } ] } ], "status": { "applied": "pending", "build": "pending", "health": "online", "errors": [ { "source": "applied", "code": "dns_propagating", "resource": "example", "message": "example", "at": "2026-01-01T00:00:00.000Z" } ], "warnings": [ { "source": "applied", "code": "dns_propagating", "resource": "example", "message": "example", "at": "2026-01-01T00:00:00.000Z" } ], "url": "https://example.com", "lastDeployment": { "id": "svc_01example0000000000000000x", "version": 3 }, "appliedAt": "2026-01-01T00:00:00.000Z", "statusObservedAt": "2026-01-01T00:00:00.000Z" }, "internalHost": "example", "connection": { "key": "example" }}Delete a service
Deleting a service that backs an active published app degrades its listing; pass confirmAppImpact to proceed (412 otherwise).
Service name within the environment.
Must be true to proceed when this service backs an active published app: deleting it leaves the listing degraded.
curl https://api.koo.io/accounts/:accountId/projects/:projectId/environments/:environmentId/services/:name \ -X DELETE \ -H "Authorization: Bearer kc_your_api_token" \ -H "Content-Type: application/json" \ -d '{}'Reveal a managed service’s connection details (incl. password)
The host/port/user/db + the connection URL and password for a postgres/redis service. Editor+ and audited; web services have no connection details (422).
Service name within the environment.
curl https://api.koo.io/accounts/:accountId/projects/:projectId/environments/:environmentId/services/:name/connection \ -H "Authorization: Bearer kc_your_api_token"{ "key": "example"}Get the data to open an interactive shell into a running replica
Returns the target location + container choices for the PROXIED interactive shell. The koo API bridges the replica exec WebSocket server-side (the Control Plane cluster endpoint + the exec-scoped token stay server-side); list replicas via exec-replicas and connect via the exec WebSocket. Editor+ and audited.
Service name within the environment.
The location whose replicas the shell targets.
Container names in the workload (the shell target choices).
curl https://api.koo.io/accounts/:accountId/projects/:projectId/environments/:environmentId/services/:name/exec-connection \ -H "Authorization: Bearer kc_your_api_token"{ "location": "example", "containers": [ "example" ]}List running replicas for an interactive shell
Proxies the Control Plane replica listing server-side (the browser cannot reach the cluster endpoint — CORS). Editor+ and audited.
Service name within the environment.
Running replica (pod) names available to open a shell into.
curl https://api.koo.io/accounts/:accountId/projects/:projectId/environments/:environmentId/services/:name/exec-replicas \ -H "Authorization: Bearer kc_your_api_token"{ "items": [ "example" ]}