--- title: Getting started description: Sign in, create a project, deploy a service from GitHub and connect it to PostgreSQL. section: Start order: 1 updated: 2026-11-23 --- Dekka runs your code from a GitHub repository or a Docker image and connects it to the databases and storage it needs, all in a project in Ghana. Going from a new account to a running service with a database takes about ten minutes. ## What do I need? You need a GitHub account with the repository you want to deploy, and code that either listens for HTTP on a port, such as a Next.js, Express, FastAPI or Go server, or runs as a background process. During the pilot, accounts come from approved applications, so [apply for the pilot](https://dekka.cloud/apply) first. Once you're approved, create your account at [dekka.cloud/signup](https://dekka.cloud/signup) with the same email address, using an email link, GitHub or Google. New accounts start with a seven-day trial, which needs no card. ## Deploy your first service 1. Choose **New project**, give it a name and choose **Create project**. Every project starts with one environment, called `production`. 2. On the canvas, choose **Add**, then **GitHub repository**. 3. If Dekka asks, install the Dekka GitHub App on the account or organisation that owns the repository, and choose which repositories it can read. 4. Pick the repository, then check the **Service name**, the **Branch** and how it **Runs as**. A web service needs the port it listens on. 5. Leave **Build** on **Detect automatically**, or choose **Dockerfile**, and add any environment variables by pasting a `.env` file. 6. Choose **Deploy**. Dekka creates the service and starts its first deployment straight away. It builds the branch, starts it, and waits for the health check path to return a 2xx before it marks the deploy healthy. A web service then answers at the address you chose in the dialog, such as `shop.apps.dekka.cloud`, and every later push to the branch deploys again. ## Add a database 1. Choose **Add**, then **PostgreSQL**, and choose **Create database**. 2. Drag from the right edge of your service to the database. Dekka creates credentials that only your service holds, sets `DATABASE_URL` on it and restarts it. The line between them turns solid once every step is confirmed. [Connections](/docs/connections) explains each step. ## How do later changes reach the service? Changes to a service's settings are staged and go out together. After you choose **Stage changes**, the top bar counts what is waiting. Choose **Review** there, and **Deploy** applies everything together and redeploys the services it affects. [Staged changes](/docs/staged-changes) covers this in full. --- title: Projects and environments description: How projects, regions and environments organise your services, and how to create, fork, switch and delete environments. section: Start order: 2 updated: 2026-11-23 --- A project holds the services that make up one application, such as a web service, a worker, a database and a bucket. Each project has one or more environments, and an environment is a separate copy of the project with its own services, variables and data. ## What is a region? A region is the place where Dekka runs a project's infrastructure. You choose it when you create the project and every service in it runs there. Today the only region is Ghana (`gh-1`), and more will appear in the list once they're running and verified. [Where your data lives](/data-location) explains what verified means. ## What is an environment? Every project starts with an environment called `production`, which is its default. Services, connections, variables and shared variables all belong to one environment, so a service in `staging` can't reach a database in `production`, and each service's [private hostname](/docs/private-networking) only ever leads to services in the asking service's own environment. ## Create an environment Open the environment menu next to the project name, choose **New environment**, enter a name in lowercase letters, numbers and dashes, and choose **Create environment**. Under **Start from** you can begin with **An empty environment** or with a copy of an existing one. A copy recreates every service with the same settings, variables, shared variables, volumes and connections, and deploys each service. Databases and buckets in the copy are created empty, and no data is copied. Virtual servers aren't copied. Each copy counts against your plan like any other service. ```bash tab="cURL" curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/environments \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "name": "staging", "fork_from": "'$PRODUCTION_ENV_ID'" }' ``` The number of environments a project can have depends on your plan, counting `production`: one on the trial, three on Starter and ten on Growth. ## Switch between environments Choose an environment from the menu next to the project name. Every project page, including the canvas, deployments, logs, metrics, variables and domains, then shows that environment, and the address gains `?env=staging` so you can share a link to it. The default environment has no `?env=` in its address. ## Rename or delete an environment Renaming an environment through the API (`PATCH /v1/environments/{id}`) changes `DEKKA_ENVIRONMENT` from each service's next deploy, and private hostnames, which don't carry the environment's name, stay the same. Deleting one (`DELETE /v1/environments/{id}`, which needs the admin role) deletes every service, database and bucket in it, and the default environment can't be deleted. ## Preview a pull request Turn on **Pull request previews** in the settings of a GitHub service in the default environment. Each pull request against that service's branch then gets its own environment, named after the pull request, such as `pr-42`, which is a copy of the default environment with empty databases. The previewed service deploys the pull request's latest commit, and every new commit to the pull request deploys again. Previews appear under **Pull request previews** in the environment menu, and closing the pull request deletes its environment. A preview counts against your plan's environments per project, so on the trial, where a project has one environment, previews can't be created. `GET /v1/projects/{id}/previews` lists them with their status and address, and `DELETE /v1/previews/{id}` closes one early. ## Delete a project Open the project's **Settings** and choose **Delete project**. Dekka only deletes a project once it's empty, so remove its services first. --- title: Staged changes description: Collect settings changes in an environment and deploy them together, so related edits land at the same time. section: Start order: 3 updated: 2026-11-23 --- Dekka collects your settings changes in a draft for each environment and applies them only when you deploy them. This lets you change a start command, a memory limit and a database's size, review them as one set, and redeploy each affected service once. ## Stage a change Select a service on the canvas, open **Settings**, change what you need and choose **Stage changes**. Nothing is applied yet. The top bar of the project shows how many changes are waiting, such as "3 staged changes", and anyone in your organisation who opens the environment sees the same draft. Dekka checks each change's [variable references](/docs/environment-variables#reference-another-services-variable) as you stage it, so a mistake there shows up straight away, and checks your plan's limits when you deploy. ## Review and deploy Choose **Review** in the top bar to see every change as a sentence, with what the set adds to your bill. Remove a change with its close button, and remove them all to throw the draft away without deploying anything. When the set looks right, choose **Deploy**. Deploying applies every change in one go. If any change fails, none of them is applied and the error names the change that caused it. Each existing service whose settings or variables changed then gets one new deployment, shown as **Settings changed** in [Deployments](/docs/deployments). > [!WARNING] > A draft that deletes a database or bucket shows "Deletes data that can't be recovered" next to that change, and the button reads **Deploy, including 1 deletion** so it can't be missed. ## What is applied straight away? Some actions take effect as soon as you make them and never go through the draft. Creating a service from the **Add** menu deploys it immediately. Connecting or disconnecting services, adding or growing a volume, deleting a service from its menu, and saving variables on the **Variables** page also apply at once. ## Stage changes with the API Stage a change with `POST /v1/environments/{id}/changeset/changes`, read the draft with `GET /v1/environments/{id}/changeset`, and deploy it with its `id`. ```bash tab="cURL" curl https://api.dekka.cloud/v1/environments/$ENV_ID/changeset/changes \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "target": "variable", "action": "update", "resource_id": "'$SERVICE_ID'", "key": "LOG_LEVEL", "value": "debug", "secret": false }' curl https://api.dekka.cloud/v1/changesets/$CHANGESET_ID/deploy \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "confirm": true }' ``` A change has a `target` of `resource`, `variable`, `shared_variable` or `connection`, and an `action` of `create`, `update` or `delete`. Staged variable values are encrypted and never returned. --- title: Deploying from GitHub description: Connect the Dekka GitHub App, choose a repository and branch, and deploy on every push. section: Services order: 1 updated: 2026-11-04 --- Dekka deploys a branch of a GitHub repository, and once the service exists every push to that branch starts a new deployment. Dekka builds the code itself, so you don't need a CI pipeline to deploy. ## How does Dekka get access to my repository? Through the Dekka GitHub App. The first time you choose **Add**, then **GitHub repository**, Dekka asks you to install the app on the GitHub account or organisation that owns the repository. You decide which repositories it can read, and you can change that in GitHub at any time. The app asks for read access to repository contents and metadata, and for write access to commit statuses. An installation links to your Dekka organisation only when you own the GitHub account it's on, are an admin of the GitHub organisation, or can already reach every repository it covers. Otherwise GitHub sends you back with `github=installation_not_admin`, and someone who administers the installation has to connect it. If the repository you want isn't in the list, the app probably doesn't have access to it. Open the app's settings on GitHub and add the repository. ## What happens when I push? GitHub tells Dekka about the push, and Dekka checks that the request is signed by GitHub and ignores any delivery it has already handled. It then starts a deployment for every service that tracks that repository and branch and has **Deploy on push** turned on. A newer deployment cancels any deployment of the same service that hasn't finished. A stopped service doesn't deploy on push, and neither does one whose [watch paths](/docs/build-configuration#deploy-only-when-certain-files-change) don't match any changed file. ## Turn off deploys on push Open the service's **Settings**, turn off **Deploy on push** and stage the change. The service then deploys only when you choose **Deploy** in its details panel or **Redeploy** on a deployment. ## Deploy a monorepo Add one service for each application in the repository, and set each one's **Root directory** to its folder, such as `/apps/api`. Dekka builds from that folder and looks for [`dekka.toml` or `dekka.json`](/docs/config-as-code) there. Add [watch paths](/docs/build-configuration#deploy-only-when-certain-files-change) so a push that only touches one application doesn't redeploy the others. ## Deploy a specific branch or commit Choose **Deploy** in the service's details panel to deploy the head of its branch now. To deploy a particular commit, use the API: ```bash tab="cURL" curl https://api.dekka.cloud/v1/resources/$SERVICE_ID/deployments \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "branch": "main", "commit_sha": "4f2a9c1" }' ``` Both fields are optional. Without them Dekka deploys the head of the service's branch, and a branch that doesn't exist answers 422 `branch_not_found`. --- title: Deploying a Docker image description: Run a prebuilt image from Docker Hub, GitHub Container Registry or any other registry, including private images. section: Services order: 2 updated: 2026-11-04 --- Dekka can run an image you have already built, without building anything itself. This suits images published by your own CI and off-the-shelf software such as `nginx` or `metabase/metabase`. ## Deploy a public image 1. On the canvas, choose **Add**, then **Docker image**. 2. Enter the **Image** with a tag or digest, such as `nginx:1.27` or `ghcr.io/acme/api:1.4.2`. 3. Give the service a name, choose how it **Runs as**, and for a web service enter the port the image listens on. 4. Choose **Deploy**. An image without a registry host, such as `nginx:1.27`, comes from Docker Hub. Every image needs a tag or a `@sha256:` digest, because Dekka won't guess at `latest`. ## Deploy a private image A private image needs a [registry credential](/docs/registry-credentials) for its registry, stored in your organisation's settings. Name the credential in the service's image source: ```bash tab="cURL" curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/resources \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "kind": "application", "name": "api", "spec": { "source": { "provider": "image", "image": "ghcr.io/acme/api:1.4.2", "registry_credential_id": "'$CREDENTIAL_ID'" }, "runtime": { "port": 8080 } } }' ``` The credential's registry has to match the image's. A credential for `ghcr.io` can't pull from `docker.io`, and Dekka refuses the pair with 422 `registry_credential_mismatch`. If the registry turns the credential down at deploy time, the deployment fails with `image_pull_unauthorized`. In the dashboard, open the service's **Settings**, choose the credential under **Registry credential**, then stage and deploy the change. With the API, set `registry_credential_id` when you create the service or with `PATCH /v1/resources/{id}`. ## Deploy a new version Change the image tag in the service's **Settings**, choose **Stage changes**, then **Review** and **Deploy** in the top bar. Choosing **Deploy** without changing the tag pulls the same reference again, which picks up a new image only if the tag has moved. An image service doesn't deploy on push, has no build settings, and doesn't use build minutes. Everything under **Deploy**, **Resources** and **Networking** in its settings works as it does for a service built from GitHub, which [Build and deploy settings](/docs/build-configuration) describes. --- title: Web services, workers and cron jobs description: Choose how a service runs, as a web service on a port, a worker in the background, or a cron job on a UTC schedule. section: Services order: 3 updated: 2026-11-23 --- Every service has a **Runs as** setting that you choose when you add it. A web service listens on a port and gets an HTTPS address, a worker runs continuously without a port, and a cron job starts on a schedule, runs to completion and stops until the next run. | Runs as | Port and address | Start command | Counts as an active service | | --- | --- | --- | --- | | Web service | Yes, with an address on `apps.dekka.cloud` | Optional | Yes | | Worker | No | Required, unless an image or Dockerfile names one | Yes | | Cron job | No | Required | Yes | In the API these are the resource kinds `application`, `worker` and `scheduled_job`. All three build and deploy the same way, from GitHub or an image, and all three can connect to databases and buckets. ## Run a web service A web service must listen on `0.0.0.0` on its port, which Dekka also passes to it as `PORT`. Dekka sends traffic to a new release only after its health check path returns a 2xx, and it is the only kind that can have [custom domains](/docs/domains) and [HTTP request logs](/docs/logs#read-http-request-logs). ## Run a worker Choose **Worker** for queue consumers and other processes that run without serving HTTP, and give it a start command such as `node worker.js` or `celery -A app worker`. A worker is restarted according to its [restart policy](/docs/build-configuration#what-happens-when-my-service-crashes). ## Schedule a cron job Choose **Cron job**, give it a start command and a schedule in five fields: minute, hour, day of month, month and day of week. Schedules run in UTC, and Ghana keeps UTC all year, so `0 2 * * *` runs at 02:00 in Accra every day. | Schedule | Runs | | --- | --- | | `*/15 * * * *` | Every 15 minutes | | `0 2 * * *` | 02:00 every day | | `30 8 * * MON-FRI` | 08:30 on weekdays | | `0 0 1 * *` | Midnight on the first of each month | Each field takes `*`, a number, a range such as `1-5`, a step such as `*/10` or `0-30/5`, and lists separated by commas. Months accept `JAN` to `DEC`, and days of the week accept `SUN` to `SAT`, where `0` and `7` both mean Sunday. When both the day of month and the day of week are restricted, a day matches if either one does. The dashboard describes a schedule in words as you type it, the API returns the next five run times as `next_runs`, and Dekka refuses a schedule that can never run, such as `0 0 31 2 *`. ## See and start cron job runs Select a cron job on the canvas and open **Runs** to see each run with its status, exit code and output, newest first. **Run now** starts one straight away with the job's start command. A run moves from `queued` to `running` and ends `succeeded`, `failed` or `cancelled`, and a scheduled time that arrives while the previous run is still going is recorded as `skipped` rather than starting a second copy. ```bash tab="cURL" curl -X POST https://api.dekka.cloud/v1/resources/$JOB_ID/runs \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` A job that hasn't been deployed yet answers 409 `job_not_deployed`, and one whose last run is still going answers 409 `run_in_progress`. ## Change how a service runs Setting a **Cron schedule** in a worker's settings turns it into a cron job, and clearing a cron job's schedule turns it back into a worker. --- title: Build and deploy settings description: Every setting that controls how a service is built, started, checked, restarted and sized. section: Services order: 4 updated: 2026-11-06 --- A service's settings decide how Dekka builds it, how it starts, how Dekka knows it's healthy and how much it may use. Open a service on the canvas and choose **Settings** to change them, then **Stage changes**, and **Review** and **Deploy** in the top bar to apply them. Most of them can also come from a [`dekka.toml` or `dekka.json`](/docs/config-as-code) in the repository. ## Choose a builder Services from GitHub use **Detect automatically** by default, which works out the language and framework and needs no Dockerfile. You can choose **Dockerfile**, **Static** or **Buildpacks** instead under **Builder**, and [Builders](/docs/builders) explains when to use each and the settings it takes. ## Deploy only when certain files change **Watch paths** lists globs, one per line, such as `apps/api/**` or `packages/shared/**/*.ts`. A push deploys the service only when at least one changed file matches one of them, and an empty list means any change deploys it. Globs are matched from the repository root, not the root directory, and a service can have up to 20. ## Run migrations before a release The **Pre-deploy command**, such as `npm run migrate` or `python manage.py migrate --noinput`, runs once before the new release takes traffic. ## How does Dekka know my service is healthy? For a web service, Dekka requests the **Health check path** on the new release and sends it traffic only after the path returns a 2xx. If that doesn't happen within the **Timeout**, which defaults to 30 seconds and can be up to 300, the deployment fails and the previous release keeps serving. ## What happens when my service crashes? The **Restart policy** decides. **Restart when it crashes** is the default and tries up to the number of **Retries**, which defaults to 10. **Always restart** restarts the service whenever it exits, and **Never restart** leaves it stopped. ## Size a service Under **Resources**, **Replicas** sets how many copies run, and **vCPU** and **Memory** set the limit for each copy. A new service gets 0.5 vCPU and 256 MiB. Each plan caps these per service. | Plan | Memory | vCPU | Replicas | | --- | --- | --- | --- | | Trial | 512 MiB | 0.5 | 1 | | Starter | 1 GiB | 1 | 2 | | Growth | 2 GiB | 2 | 4 | A service with a [volume](/docs/volumes) runs one replica. ## Sleep when idle **Sleep when idle** stops a service when it has no traffic and wakes it on the next request, which can add a few seconds to that request. It's off by default. ## Networking settings A web service's **Port** is the port it listens on, and Dekka sets `PORT` to the same value. **Public address** turns its `apps.dekka.cloud` address on or off. Your code must listen on `0.0.0.0` rather than `localhost`, or Dekka can't reach it. ## Setting names in the API and config files In the API, these are fields of a service's `spec`. A [config file](/docs/config-as-code) uses the same names in its `build` and `runtime` sections. - `build.strategy` is the **Builder**, one of `railpack`, which is the default, `dockerfile`, `static` or `buildpacks`. Each builder's own settings are listed in [Builders](/docs/builders#set-the-builder-in-a-config-file). - `build.build_command` and `build.start_command` are the commands, detected when empty. - `build.watch_paths` is a list of globs, empty by default. - `build.pre_deploy_command` is the **Pre-deploy command**. - `runtime.port` is the **Port**, `3000` by default. - `runtime.health_check_path` is the **Health check path**, `/` by default. - `runtime.health_check_timeout_seconds` is the health check **Timeout**, `30` by default. - `runtime.memory_mib`, `runtime.vcpu` and `runtime.replicas` are the resources, `256`, `0.5` and `1` by default. vCPU goes in steps of 0.25. - `runtime.restart_policy` is `on_failure`, which is the default, `always` or `never`, and `runtime.restart_max_retries` is the **Retries**, `10` by default. - `runtime.cron_schedule` is the cron schedule, and `runtime.sleep_when_idle` is `false` by default. - `source.root_dir` is the **Root directory**, `autodeploy` is **Deploy on push**, and `networking.public_domain` is **Public address**. A config file can't set these three. --- title: Builders description: Choose how Dekka builds a service from GitHub, detected automatically with Railpack, from a Dockerfile, as a static site or with Cloud Native Buildpacks. section: Services order: 4.5 updated: 2026-11-23 --- A service deployed from GitHub is built into an image before it runs, and its **Builder** decides how. You choose one when you create the service, and you can change it later under **Settings**, then **Build**. Services that run a [Docker image](/docs/docker-images) aren't built, so they have no builder. ## Which builder should I use? | Builder | Choose it when | | --- | --- | | **Detect automatically** | Your repository is an app in a common language and has no Dockerfile. It's the default. | | **Dockerfile** | Your repository has a Dockerfile you want Dekka to build as it is. | | **Static** | Your build writes a folder of HTML, CSS and JavaScript, such as a Vite, Astro or Docusaurus site. | | **Buildpacks** | Your app already builds on Heroku or with Paketo buildpacks. | Switching to **Static** clears the start command and sets the port to 80, because a static site has neither, and switching away from it sets the port back to 3000, so check both after you switch. A repository that describes several services in a Compose file isn't one service to build. When a branch has a Compose file at its root and no app there, the deploy dialog chooses [Docker Compose](/docs/docker-compose#deploy-straight-from-a-repository) for you and sets up everything the file describes. ## Detect automatically Dekka works out the language and framework and builds the app without a Dockerfile. The detecting is done by [Railpack](https://railpack.com), Railway's open-source builder, which is released under the Apache 2.0 licence. It recognises Node.js, Bun, Deno, Python, Go, Ruby, PHP, Rust and Elixir projects, including frameworks such as Next.js, Django, Rails and Phoenix. When the detected commands aren't right, set **Build command**, such as `npm run build`, and **Start command**, such as `npm start` or `uvicorn main:app --host 0.0.0.0 --port $PORT`. Empty commands use what Railpack detects. In the API and in config files this builder's id is `railpack`; `auto`, the name earlier specs used, is still accepted and stored as `railpack`. ## Dockerfile Dekka builds the Dockerfile in your repository with BuildKit. | Setting | What it does | Default | | --- | --- | --- | | **Dockerfile** | The Dockerfile's path, relative to the root directory | `Dockerfile` | | **Build context** | The directory sent to the build, relative to the root directory | `.` | | **Target stage** | The stage to stop at in a multi-stage Dockerfile | the last stage | | **Build arguments** | `KEY=value` pairs passed as `--build-arg`, one per line | none | Paths must stay inside the repository, so they can't start with `/` or contain `..`. A service can have up to 50 build arguments. Their values are never printed in the build log, and the service's [variables](/docs/environment-variables) are available as build arguments too, so a secret your build needs can live there instead. The image's own `CMD` starts the service unless you set a **Start command**. ## Static The static builder runs your **Build command**, if you set one, and then serves the **Publish directory** the build writes, which is `dist` by default. Leave the build command empty to serve the repository's files as they are. Turn on **Single-page app** for a site with client-side routing, so a path with no file of its own answers with `index.html` and the route loads in the browser. A static site is always a web service, it's served on port 80, and it runs no process of its own, so it has no start command. ## Buildpacks Cloud Native Buildpacks detect your language and build the image the way Heroku and Paketo do, so an app that already builds there builds the same way on Dekka. **Builder image** chooses which builder picks the buildpacks. | Builder image | Value | | --- | --- | | Heroku | `heroku/builder:24`, the default | | Paketo | `paketobuildpacks/ubuntu-noble-builder` | A `Procfile` or the buildpack's detection decides the start command unless you set one. ## Set the builder in a config file A [`dekka.toml` or `dekka.json`](/docs/config-as-code) in the service's root directory can set the builder and its settings in the `build` section, using these names. | Setting | Name | | --- | --- | | Builder | `strategy`, one of `railpack`, `dockerfile`, `static` or `buildpacks` | | Dockerfile | `dockerfile_path` | | Build context | `dockerfile_context` | | Target stage | `dockerfile_target` | | Build arguments | `build_args`, a table of strings | | Publish directory | `static_publish_dir` | | Single-page app | `spa_fallback` | | Builder image | `buildpacks_builder` | ```toml title="dekka.toml" tab="Dockerfile" [build] strategy = "dockerfile" dockerfile_path = "docker/api.Dockerfile" dockerfile_target = "runner" [build.build_args] NODE_ENV = "production" ``` ```toml title="dekka.toml" tab="Static" [build] strategy = "static" build_command = "npm run build" static_publish_dir = "build" spa_fallback = true ``` ```json title="dekka.json" tab="Buildpacks" { "build": { "strategy": "buildpacks", "buildpacks_builder": "paketobuildpacks/ubuntu-noble-builder" } } ``` In the API, the same names are fields of a service's `spec.build`. ## Workers and scheduled jobs A [worker or scheduled job](/docs/service-types) has no port, so it can't use the static builder. A worker built from a Dockerfile, or one that runs a Docker image, starts with the image's own command, so its **Start command** is optional. Workers built by detection or with Buildpacks, and every scheduled job, need a start command, because there's nothing else to tell Dekka what to run. --- title: Import a Docker Compose file description: Turn a docker-compose.yml into Dekka services, managed databases and connections, see a report of what changed, and deploy it. section: Services order: 4.6 updated: 2026-11-23 --- Dekka can read a `docker-compose.yml` and set up the same app as Dekka services. Containers that run your code become services, Postgres, Redis and MinIO containers become managed databases and buckets with [connections](/docs/connections), and the variables that pointed at those containers are rewritten to use the connections. A report lists what carried over, what changed to fit Dekka and what was left out, and nothing is created until you deploy the plan. ## Import in the dashboard 1. On a project's canvas, choose **Add**, then **Template or dekka.yaml**, and open the **Docker Compose** tab. 2. Paste the file or choose **Open a file**, then choose **Translate**. 3. Read the report. If any service has a `build` section, choose the GitHub **Repository** and **Branch** to build it from. 4. Fill in any values the file asks for, choose **Review changes**, check the planned changes and deploy them. The translation is a [dekka.yaml blueprint](/docs/config-as-code#describe-a-whole-environment-in-dekkayaml), so you can also copy it, keep it in your repository and plan it again later. ## Deploy straight from a repository If the Compose file is committed to a repository the Dekka GitHub App can see, Dekka reads it for you and builds the services with a `build` section from that repository. 1. On the canvas, choose **Add**, then **GitHub repository**, and pick the repository and branch. 2. When the branch has a Compose file at its root and no app there that Dekka could build by itself, Dekka chooses **Docker Compose** under **Build** and reads the file straight away. When the root is also an app, Dekka keeps the single service and offers the file beside it, and you can choose **Docker Compose** yourself. 3. For a file somewhere else, set its path and choose **Read the file**. The path is `docker-compose.yml` unless you change it, and when that file isn't there Dekka also looks for `compose.yml`, `docker-compose.yaml` and `compose.yaml` in the same directory and says which one it read. 4. Read the report, fill in any values it asks for and choose **Review changes**, which reads **Plan without what's left out** when the report leaves something out, then deploy the plan. Each `build` context is read relative to the Compose file, so a file at `deploy/docker-compose.yml` with `context: ./web` builds from `/deploy/web`, and `dockerfile` and `target` carry over. The services remember the repository, the branch and that directory, so a push to the branch rebuilds them from the same place, and the blueprint's description records which file it came from. ## What the report looks like This is part of n8n's own Compose file for running with Postgres. ```yaml title="docker-compose.yml" services: postgres: image: postgres:16 environment: - POSTGRES_USER - POSTGRES_PASSWORD - POSTGRES_DB - POSTGRES_NON_ROOT_USER - POSTGRES_NON_ROOT_PASSWORD volumes: - db_storage:/var/lib/postgresql/data n8n: image: docker.n8n.io/n8nio/n8n environment: - DB_TYPE=postgresdb - DB_POSTGRESDB_HOST=postgres - DB_POSTGRESDB_USER=${POSTGRES_NON_ROOT_USER} - DB_POSTGRESDB_PASSWORD=${POSTGRES_NON_ROOT_PASSWORD} - N8N_ENCRYPTION_KEY=${N8N_ENCRYPTION_KEY:?set an encryption key} - GENERIC_TIMEZONE=${GENERIC_TIMEZONE:-Africa/Accra} ports: - 5678:5678 volumes: - n8n_storage:/home/node/.n8n depends_on: - postgres ``` The report groups each note under **Carried over as written**, **Changed to fit Dekka** or **Left out**. | Service | Level | Note | | --- | --- | --- | | postgres | adjusted | Becomes a managed Postgres 16. Dekka creates the credentials and gives them to the services that use it. It starts with 100 MiB of storage, which every plan allows and which can grow in its settings. | | postgres | applied | Its storage is managed, so the volume isn't needed. | | n8n | adjusted | The image has no tag, so it uses docker.n8n.io/n8nio/n8n:latest. Pin a version to control upgrades. | | n8n | applied | Served on port 5678 at a public dekka.cloud domain. | | n8n | applied | Gets a 1 GB volume at /home/node/.n8n. Resize it in Dekka if it needs more. | | n8n | adjusted | DB_POSTGRESDB_HOST now reads PGHOST from the connection. | | n8n | adjusted | DB_POSTGRESDB_USER now reads PGUSER from the connection. | | n8n | applied | Connected to postgres. | The n8n service ends up with `DB_POSTGRESDB_HOST` set to `${{n8n.PGHOST}}`, so it reads the managed database's host from its connection, and `N8N_ENCRYPTION_KEY` becomes a required value you enter before planning. ## How Compose maps to Dekka | In Compose | On Dekka | | --- | --- | | A service with `image` and `ports` | A web service running that image on the first published port, at a public address | | A service with `image` and only `expose` | A web service on that port, reachable inside the environment only | | A service with no ports | A [worker](/docs/service-types) | | `build` | A service built from your GitHub repository with the [Dockerfile builder](/docs/builders#dockerfile), using `context` as the root directory and `dockerfile`, `target` and `args` as its settings | | `postgres`, `postgis`, `pgvector` or `timescaledb` images | A managed [PostgreSQL](/docs/postgresql) 16 or 17, matching the image's major version | | `redis`, `valkey` or `keydb` images | A managed [Redis](/docs/redis) with persistence on | | A `minio` image | A Dekka [bucket](/docs/object-storage) | | `depends_on`, `links`, or a variable naming a database container | A connection from the service to that database | | `command` and `entrypoint` | The start command | | `environment` | Service variables | | The first `volumes` entry with a container path | A 1 GB [volume](/docs/volumes) at that path | | `healthcheck` that requests `http://localhost/...` | The health check path | | `deploy.resources.limits.memory` or `mem_limit` | Memory, kept between 128 MiB and 16 GiB | | `deploy.resources.limits.cpus` or `cpus` | vCPU, in steps of 0.25 | | `deploy.replicas` | Replicas, unless the service has a volume | | `restart` | The restart policy, with `unless-stopped` treated as `always` | A file written for a host that attaches the domain itself often publishes no port at all. Dekka then gives the public address to the one service nothing else depends on, says so in the report, and leaves the rest private. When it can't tell which service people visit, every service stays private and the report asks you to turn on **Public address** in the settings of the right one. ## Variables that point at databases Inside Compose, services find each other by container name, such as `postgres:5432`. On Dekka a connection gives the service its own credentials as [variables](/docs/connections#which-variables-does-a-connection-set), so the translation rewrites values that named a database container. - A URL such as `DATABASE_URL=postgres://user:pass@db:5432/app` or `REDIS_URL=redis://cache:6379` is dropped, because the connection sets that variable itself. - A variable whose value is the container's name, port, user, password or database, such as `DB_HOST=db` or `DB_PASSWORD=${POSTGRES_PASSWORD}`, reads the matching connection variable instead, such as `${{web.PGHOST}}` or `${{web.PGPASSWORD}}`. - A URL or host variable that names another service, such as `API_URL=http://api:8000`, uses that service's private domain, `${{api.DEKKA_PRIVATE_DOMAIN}}`. - A secret whose value is a placeholder, such as `APP_SECRET=replace-me-with-a-random-string`, gets a random value that Dekka generates once. - Variables Dekka sets itself, such as `PORT`, keep Dekka's value. ## Values from your shell Compose fills `${VAR}` from your shell or a `.env` file, which Dekka can't see, so the translation turns them into values you enter when you plan. | In Compose | On Dekka | | --- | --- | | `${VAR:-default}` or `${VAR-default}` | The default, written into the variable | | `${VAR}`, `$VAR` or a bare `VAR` in a list | An optional value you can enter, left unset if you don't | | `${VAR:?message}` or `${VAR?message}` | A required value, with the message as its description | | `$$` | A literal `$` | Names that look like secrets, such as ones containing `PASSWORD`, `TOKEN` or `KEY`, are entered as secrets. Commands and build arguments can't read these values, so a command or build argument that uses one without a default is left out and the report says so. ## Services that build from source A service with a `build` section is built from a GitHub repository you choose, with the Dekka GitHub App [connected](/docs/deploying-from-github). Every such service in the file uses the same repository and branch, and its `context` becomes its root directory. Planning without a repository answers `422 repository_required` with the services that need one. A remote build context, such as a Git URL, isn't fetched, and `dockerfile_inline` isn't read, so commit the Dockerfile to the repository instead. ## What's left out | Compose setting | What to do instead | | --- | --- | | More than one published port | Dekka serves one port per service. Split the other ports into their own services. | | UDP ports | Dekka serves HTTP and TCP only. | | A second volume on a service | A service has one volume. Combine the paths under one directory. | | `env_file` | Add those variables to the service in Dekka. | | `secrets` and `configs` | Add secrets as secret variables, and put config files in the image or a volume. | | `extends` | Copy the settings into the service. | | `networks` and `network_mode` | Every service shares the environment's private network, so nothing is needed. | | `profiles` | Every service is included. Remove the ones you don't want before importing. | | `privileged`, `cap_add`, `devices`, `pid`, `ipc`, `sysctls` and `security_opt` | Services can't run with host-level access. | | `working_dir` and `user` | Set them in the image's Dockerfile. | | `extra_hosts`, `dns` and `tmpfs` | Not available. | | A health check that isn't an HTTP request | Dekka checks `GET /` instead, or set a health check path in the service's settings. | Settings that make no difference on Dekka, such as `container_name`, `labels`, `logging` and `stop_signal`, are ignored without a note. ## Import with the API `POST /v1/compose/translate` returns the blueprint, the report, the resources it would create, the values it needs and whether it needs a repository, and changes nothing. ```bash tab="cURL" curl https://api.dekka.cloud/v1/compose/translate \ -H "Authorization: Bearer $DEKKA_API_KEY" \ -H "Content-Type: application/json" \ -d "$(jq -n --rawfile content docker-compose.yml '{content: $content}')" ``` `POST /v1/environments/{id}/compose/read` reads the file out of a connected repository instead and returns the same translation, with `path` saying which file it found. A repository the GitHub App can't see answers `422 repo_not_found`, and a branch without the file answers `422 compose_file_missing` with the paths it tried. ```bash tab="cURL" curl https://api.dekka.cloud/v1/environments/$ENV_ID/compose/read \ -H "Authorization: Bearer $DEKKA_API_KEY" \ -H "Content-Type: application/json" \ -d '{"repository": {"full_name": "acme/shop", "branch": "main"}, "path": "docker-compose.yml"}' ``` `POST /v1/environments/{id}/compose/plan` translates the file again and plans it into an environment, returning a [changeset](/docs/staged-changes). Pass the values it asks for in `inputs`, and the repository for any `build` services. To plan the file in the repository rather than pasted text, send `path` in place of `content`. ```bash tab="cURL" curl https://api.dekka.cloud/v1/environments/$ENV_ID/compose/plan \ -H "Authorization: Bearer $DEKKA_API_KEY" \ -H "Content-Type: application/json" \ -d "$(jq -n --rawfile content docker-compose.yml '{ content: $content, inputs: {N8N_ENCRYPTION_KEY: "your-32-character-key"}, repository: {full_name: "acme/shop", branch: "main"} }')" ``` Deploy the changeset with its `id` once you've read the changes. ```bash tab="cURL" curl -X POST https://api.dekka.cloud/v1/changesets/$CHANGESET_ID/deploy \ -H "Authorization: Bearer $DEKKA_API_KEY" \ -H "Content-Type: application/json" \ -d '{"confirm": true}' ``` A file that isn't valid YAML or has no `services` answers `422 invalid_compose`, and one longer than 200,000 characters answers `422 validation_error`. A required value left out answers `422 missing_input` with the missing keys, and going over your plan's limits answers `403 entitlement_exceeded`. --- title: Config as code description: Keep a service's settings in dekka.toml or dekka.json next to its code, and describe a whole environment in a dekka.yaml blueprint. section: Services order: 5 updated: 2026-11-04 --- A `dekka.toml` or `dekka.json` in a service's root directory sets its build and runtime settings from the repository. Dekka reads the file from the commit being deployed, so a settings change can go through code review with the code that needs it. ## Write a config file The file has two sections, `build` and `runtime`, and accepts the names listed in [Build and deploy settings](/docs/build-configuration#setting-names-in-the-api-and-config-files) without their prefix. ```toml title="dekka.toml" [build] build_command = "pip install -r requirements.txt" start_command = "uvicorn main:app --host 0.0.0.0 --port $PORT" pre_deploy_command = "alembic upgrade head" watch_paths = ["api/**"] [runtime] health_check_path = "/healthz" memory_mib = 512 ``` The same settings in JSON look like this, and a `$schema` key is ignored if you add one for your editor. ```json title="dekka.json" { "build": { "pre_deploy_command": "python manage.py migrate --noinput" }, "runtime": { "health_check_path": "/health/", "port": 8000 } } ``` ## Which value wins? A setting in the file overrides the same setting in the service's dashboard settings, for every deployment of a commit that contains the file. Settings the file leaves out keep their dashboard values, and settings set in neither place use their defaults. Removing a line from the file hands that setting back to the dashboard on the next deploy. The file only applies to services deployed from GitHub. An image service has no repository to read it from. ## See where a deployment's settings came from In [Deployments](/docs/deployments), a deployment that used a config file shows a line such as "3 settings came from dekka.toml in the repository", which opens to list each setting. The API returns the same information for every setting in `config_sources`, with one of `dekka.toml`, `dekka.json`, `service settings` or `default`, and the merged result in `effective_spec`. ## What if the file is wrong? Dekka checks the file before anything is built, and an unknown section or setting, a value out of range or a file it can't parse fails the deployment with `invalid_config` and a message naming the problem, such as `dekka.toml is invalid: runtime.memory_mib Input should be less than or equal to 16384.` The release that is serving keeps serving. A few other cases fail the same way. A root directory can hold only one of the two files, and a file can't change how a service runs, so a `cron_schedule` in a web service's file is an error. A value over your plan's limit, such as `replicas = 4` on Starter, fails the deployment with `entitlement_exceeded`. ## Declare the databases your service needs A `[services.]` table in the same file says which databases, caches, buckets and queues the service needs. Its `type` is `postgres`, `redis`, `bucket` or `queue`, and when the table's name is itself a type, as in `[services.redis]`, the type can be left out. Postgres and Redis can also take a `tier` from the [price list](/pricing), such as `seed` or `core`. ```toml title="dekka.toml" [services.db] type = "postgres" tier = "core" [services.redis] [services.uploads] type = "bucket" ``` Dekka reads these tables at the service's latest deployed commit but never creates anything on its own. When something they declare is missing or the service isn't connected to it, the service's panel says so and **Review plan** turns it into a plan under **Pending changes**, which creates what is missing and connects the service to each one once you apply it. With the API, `GET /v1/resources/{id}/config/services` lists what the file declares and what is missing, `POST /v1/resources/{id}/config/plan` makes the plan, and agents use the MCP tool `plan_config_services`. ## Describe a whole environment in dekka.yaml A `dekka.yaml` blueprint describes an environment's services, databases, buckets, variables and connections in one file. Choose **Add**, then **Template or dekka.yaml**, and either pick one of Dekka's templates, such as **Next.js with Postgres** or **FastAPI with Postgres and Redis**, or paste your own under **dekka.yaml** and choose **Plan blueprint**. Dekka shows everything it would create or change, and nothing exists until you deploy the plan from the same dialog. ```yaml title="dekka.yaml" version: 1 name: Next.js with Postgres variables: SENTRY_DSN: https://… resources: - name: web kind: application spec: source: { repo_full_name: acme/storefront, branch: main } runtime: { port: 3000 } variables: NODE_ENV: production SENTRY_DSN: ${{shared.SENTRY_DSN}} - name: db kind: postgres spec: { version: "16", storage_mib: 100 } connections: - { from: web, to: db } ``` Each resource's `spec` takes the same settings as the API, top-level `variables` become shared variables, and `connections` join a service to a database or bucket by name. Dekka reads a blueprint only when you paste it or send it to the API, never from the repository. With the API, `POST /v1/blueprints/validate` checks a blueprint and lists every problem with its path, and `POST /v1/environments/{id}/blueprint/plan` compares it with the environment and returns the plan as a changeset, which you deploy with `POST /v1/changesets/{id}/deploy`. A plan only deletes what the blueprint leaves out when you send `"prune": true`, and a plan answers 409 `plan_stale` if the environment changed after it was made. --- title: Variables description: Set service and shared variables, reference one service's values from another, keep secrets sealed, and read the variables Dekka provides. section: Services order: 6 updated: 2026-11-23 --- Variables reach a service as environment variables when it starts. Each service has its own, each environment has shared variables its services can draw on, and Dekka adds a few of its own. Open a project's **Variables** page and choose a service, or **Shared**, to manage them. ## Add a variable Choose **Add variable**, give the variable a name and a value, and add it. Changes collect in a bar at the bottom of the page until you choose **Save changes**, which keeps them for the service's next deploy or restart, or **Save and restart**, which applies them now. Names use letters, numbers and underscores and can't start with a number. Values are encrypted at rest. When you add a variable, **Kind of value** makes it **Plain**, **Secret** or **Sealed**, and a name that looks like a secret, such as one containing `SECRET`, `TOKEN`, `PASSWORD` or `API_KEY`, starts on **Secret**. A secret's value is hidden in the dashboard and kept out of logs. To see a secret, press and hold it, and each reveal is recorded in your organisation's **Activity**. ```bash tab="cURL" curl -X PUT https://api.dekka.cloud/v1/resources/$SERVICE_ID/env \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "vars": [ { "key": "STRIPE_SECRET_KEY", "value": "sk_live_…", "secret": true } ] }' ``` `PUT` creates or updates the variables you send and leaves the rest alone. In the API, `secret` defaults to `true`. ## Seal a secret Choose **Sealed** under **Kind of value** before choosing **Add variable**, or send `"sealed": true`, and the value can never be shown again, even to you. The service still receives it. Sealing is permanent, so to change a sealed value you overwrite it with a new one. Pull request previews never receive sealed values, because a preview runs code from any branch someone can push, so give a preview the value it needs as an ordinary secret if it needs one. ## Share a variable between services Shared variables belong to an environment rather than a service, and a service only receives one when it references it. Choose **Shared** on the **Variables** page to add them, and use one in a service's variable as `${{shared.NAME}}`. ```bash title=".env" SENTRY_DSN=${{shared.SENTRY_DSN}} ``` ## Reference another service's variable A value can include `${{service.KEY}}`, where `service` is the name of another service in the same environment. Dekka fills in the value each time the service deploys or restarts, so it stays current when the other service changes. ```bash title=".env" API_URL=https://${{api.DEKKA_PUBLIC_DOMAIN}} API_INTERNAL_URL=http://${{api.DEKKA_PRIVATE_DOMAIN}} DATABASE_URL=${{api.DATABASE_URL}} ``` A service's private address answers on port 80 inside the environment, whatever port the service itself listens on, so leave the port out of private URLs. You can also reference a database, cache, bucket or queue by its name. `${{db.DATABASE_URL}}` in a service's variable reads that service's own connection to `db`, so every service keeps a database user of its own, and if the service isn't connected to `db` yet, saving the variable connects it. A Postgres database offers `DATABASE_URL`, `PGHOST`, `PGPORT`, `PGDATABASE`, `PGUSER` and `PGPASSWORD`, a Redis cache `REDIS_URL`, `REDIS_HOST`, `REDIS_PORT` and `REDIS_PASSWORD`, a bucket the `S3_` variables and a queue `QUEUE_URL`, and a database or cache also offers `DEKKA_PRIVATE_DOMAIN`. Shared variables can reference a database's private domain but not its credentials, because those belong to whichever service connects. ```bash title=".env" DB_URL=${{db.DATABASE_URL}} CACHE_URL=${{cache.REDIS_URL}} ``` Typing `${{` in a value, in the table or in the raw editor, lists what you can reference in this environment, and after the dot it lists that name's variables. It shows names only, never values. Dekka checks every reference when you save and refuses names that don't exist with 422 `unknown_reference`, listing each bad reference. Referenced values can contain references of their own, up to ten levels deep. If a reference stops resolving later, or two values refer to each other, the next deploy or restart fails and says which reference broke. Renaming a service updates the references that point at it. ## Which variables does Dekka set? Dekka sets these on every service, marked **Dekka** in the list. You can't edit them, but a variable of your own with the same name takes their place. - `PORT` is the service's port, such as `3000`, on web services. - `DEKKA_PRIVATE_DOMAIN` is the service's [private hostname](/docs/private-networking), such as `api-x7k2.internal.gh-1.dekka.cloud`. - `DEKKA_PUBLIC_DOMAIN` is a web service's `apps.dekka.cloud` address, such as `shop.apps.dekka.cloud`, while its public address is on. - `DEKKA_ENVIRONMENT` is the environment's name, such as `production`. Connecting a service to a database or bucket adds the [connection's variables](/docs/connections#which-variables-does-a-connection-set), marked **Connection**. They're read-only, the credentials and URLs among them are secret, and disconnecting removes them. ## Edit variables as a .env file Choose **Raw .env** under **Editor** to edit every variable as text. Comments, quotes and `export` are accepted. Secret, sealed and connection values aren't shown in the text and are kept as they are, and new variables added this way aren't secret. Tick **Delete variables that aren't in the text** to remove anything you've deleted from the text, apart from sealed and connection variables. --- title: Deployments description: Follow a deployment through its states, redeploy, roll back, cancel or remove one, and find out when one fails. section: Services order: 7 updated: 2026-11-23 --- A deployment is one release of a service, built from a commit or pulled from an image. The project's **Deployments** page lists the environment's recent deployments with their commit or image, what started it and its build and deploy logs, and marks the one serving traffic as **Serving**. ## Deployment states | State | What it means | | --- | --- | | `queued` | Waiting to start | | `preparing` | Fetching the commit and reading any [config file](/docs/config-as-code) | | `building` | Running the build | | `deploying` | Starting the new release | | `starting` | Waiting for the health check to pass | | `healthy` | The release is serving traffic | | `failed` | A step failed, and the previous release keeps serving | | `cancelled` | You cancelled it, or a newer deployment replaced it | | `removed` | It was serving and you took it down with **Remove** | A deployment only becomes `healthy` once the health check passes, so starting a process isn't enough. When a deployment fails while an earlier release is still serving, the service stays up and its status says the latest deployment failed. ## What starts a deployment? | Shown as | Trigger | Started by | | --- | --- | --- | | First deploy | `initial` | Creating the service | | Pushed to GitHub | `push` | A push to the tracked branch | | Deployed manually | `manual` | **Deploy** in the service's details, **Redeploy** on a deployment, or the API | | Redeployed | `redeploy` | `POST /v1/resources/{id}/actions/redeploy` | | Rolled back | `rollback` | **Roll back to this** | | Settings changed | `config_change` | Deploying [staged changes](/docs/staged-changes) | | Pull request preview | `preview` | A pull request with [previews](/docs/projects#preview-a-pull-request) turned on | ## How do I roll back a deploy? Find an earlier healthy deployment, choose **Roll back to this** and confirm. Dekka deploys that deployment's image again as a new deployment marked **Rolled back**, with the settings it ran with and the variables it was sent with, which Dekka records with every deployment. Nothing is rebuilt, so a rollback is usually quicker than a deploy and doesn't use build minutes. Turn on **Keep the current variables** to run the earlier image with the variables saved on the service now instead. A deployment shows **Variables changed since this deploy** when the two differ. The restored variables include the ones connections set, such as `DATABASE_URL`, so if you have rotated a database's credentials since, keep the current variables. A rollback doesn't rewrite the variables saved on the service, which means a later restart or deploy uses the saved ones again. ```bash tab="cURL" curl -X POST https://api.dekka.cloud/v1/deployments/$DEPLOYMENT_ID/rollback \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "keep_current_variables": false }' ``` A rollback changes only what the service runs. Databases, volumes and buckets are not touched, so their data and any migrations a later release ran stay as they are, and an older release has to work with that schema. To go back on data as well, [restore a database backup](/docs/backups#restore-a-backup) or restore it to a point in time. A deployment from GitHub records its image once it's healthy, and one without a recorded image answers 409 `no_image`, in which case you can redeploy its commit instead. A deployment from before Dekka recorded variables answers 409 `variables_not_recorded` unless you keep the current variables. Once a deployment is healthy, its image, settings and variables never change, and the API keeps its record after the service is deleted, while the variables it was sent with are deleted with the service. The **Deployments** page lists only the deployments of services that still exist. ## Redeploy, cancel or remove a deployment - **Redeploy** builds the same commit again as a new deployment, and for a service that runs an image, pulls the image its settings name now. - **Cancel** stops a deployment that hasn't finished. The release that was serving keeps serving. - **Remove** takes down the deployment that is serving. It becomes `removed`, and the service stays stopped, even through pushes, until you deploy it or choose **Start**. Choosing **Restart** in a service's details restarts the current release without deploying, which picks up saved variables. ## Read a deployment's logs Open a deployment to see its build and deploy output, which follows new lines while it runs. The API returns the same lines from `GET /v1/deployments/{id}/logs`, and `GET /v1/deployments/{id}/logs/stream` streams them as server-sent events until the deployment finishes. ## Find out when a deploy fails When a deployment fails, Dekka emails the person who started it and the organisation's owners and admins. The email names the service, the step it failed in and the error, and links to the project's **Deployments**. If the previous release is still serving, the email says so. Each person can turn these emails off under **Settings**, then **Account**, as described in [Choose which emails you get](/docs/billing#choose-which-emails-you-get). To send deploy results to your own tools instead, add a [deploy webhook](/docs/webhooks). --- title: Volumes description: Attach a disk to a service so files survive deploys and restarts, and grow it when it fills up. section: Services order: 8 updated: 2026-11-23 --- A volume is a disk mounted into a service that keeps its data through every deploy and restart. Use one for uploads, SQLite files and anything else your code writes to disk and needs to keep. For relational data, a [PostgreSQL](/docs/postgresql) database is usually the better choice. ## Add a volume Open the service's **Settings**, find **Volume** and choose **Add a volume**. Enter the **Mount path**, which defaults to `/data`, pick a **Size** and choose **Add volume**. Dekka creates the disk straight away, without going through staged changes, and the volume moves from **Creating** to **Attached**. ```bash tab="cURL" curl https://api.dekka.cloud/v1/resources/$SERVICE_ID/volume \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "mount_path": "/data", "size_gb": 5 }' ``` A service can have one volume, between 1 and 1024 GB, and a service with a volume runs a single replica, so set **Replicas** to 1 first. Forking an environment gives each copied service a new, empty volume of the same size. ## Grow a volume Choose a larger size under **Grow to** and choose **Grow**. Volumes can grow but never shrink. If growing fails, the volume stays at its old size with its data intact. ## Remove a volume Choose **Remove**. This deletes the volume and everything on it, and can't be undone. ## How much volume space do I get? Volumes in an organisation share one allowance: 1 GB on the trial, 20 GB on Starter and 100 GB on Growth. Dekka measures the size of each volume every hour as `volume_gb_hours`, and each plan includes its allowance for a 730-hour month. See [Plans, billing and usage](/docs/billing). ## Back up a volume Dekka copies every volume attached to a service each night and keeps each copy for 7 days. You can also back one up whenever you want by choosing **Back up now** in the **Volume** section, or with `POST /v1/volumes/{id}/backups`, and a backup you ask for is kept for 30 days. Backups are kept in Ghana and copied to a second host every night. [Backups](/docs/backups) covers restoring one. --- title: Templates description: Deploy a ready-made stack such as n8n, OpenClaw or a Next.js app with its database, and see what each template creates before anything exists. section: Templates order: 1 updated: 2026-11-23 --- A template is a [dekka.yaml blueprint](/docs/config-as-code#describe-a-whole-environment-in-dekkayaml) that describes a working stack, so one deploy gives you the services, databases, volumes, variables and connections it needs. Some templates run open-source tools such as n8n, OpenClaw and Uptime Kuma from their published images, and others start a framework app from Dekka's example repositories. ## Find a template Choose **Templates** in the dashboard's sidebar to browse the library by category or search it. On a project's canvas, choose **Add**, then **Template or dekka.yaml**, to open the same library with the current environment already chosen. The public [template gallery](/templates) shows every template without signing in. Each template's page shows what it creates as a small diagram, the values you need to provide, the secrets Dekka generates, the volume and memory each service gets, and links to the upstream project. ## Deploy a template 1. Open the template and choose the project and environment it goes into. You can also create a new project from here. 2. Fill in its inputs. Secret inputs, such as API keys, are masked as you type, and required ones are marked. 3. Choose **Review changes**. Dekka plans the template and lists everything it will create, and nothing exists yet. 4. Choose **Deploy**, which names how many changes it applies, to create it all. The services appear on the canvas as they come up. Nothing is created until you choose **Deploy**. ## Inputs and generated secrets Inputs are values only you can provide, such as an OpenRouter key for Hermes Agent. A required input left empty stops the plan with `missing_input`, which names each one, and an optional input left empty leaves its variable unset. Generated secrets are values the template creates for itself, such as n8n's encryption key or OpenClaw's gateway token. Dekka generates each one when you plan, stores it as a secret, and never shows it in the plan. Secret inputs are stored the same way. To read a value later, open the service's variables on the **Variables** page and press and hold it, which is recorded in your organisation's **Activity**. A generated secret that a template keeps as a shared variable, such as `N8N_ENCRYPTION_KEY`, is created once and kept on every later plan, because the data it protects would become unreadable if it changed. ## Memory, volumes and plan limits Templates set the memory each service needs. n8n, Hermes Agent, Umami, Uptime Kuma and Meilisearch need 512 MiB, which every plan allows, and OpenClaw, Open WebUI, LiteLLM, Flowise and Metabase need 1 GiB, which needs Starter or above. A template's database can also need more storage than the trial includes, as n8n's and Umami's do. Plan limits are checked when you deploy, so a template over your plan's limits plans normally and then answers 403 `entitlement_exceeded` with the limit it would pass. [Plans and limits](/docs/limits) lists every figure. A service with a volume gets a [volume](/docs/volumes) at the path its software expects, 1 GB for most templates and 2 GB for Open WebUI, and runs a single replica. Volumes can grow later but never shrink. ## Third-party software Community templates run software that Dekka doesn't make or maintain. Each template names its licence and links to the upstream project, and the software's own terms apply to how you use it. n8n, for example, uses the Sustainable Use License, which limits some commercial uses. ## Deploy a template with the API `GET /v1/catalog/templates` lists every template with its metadata, inputs, generated secrets and resources, and needs no API key. Add `?category=ai` to filter it. Planning takes the inputs by key and returns a changeset. ```bash tab="cURL" curl https://api.dekka.cloud/v1/environments/$ENVIRONMENT_ID/templates/hermes-agent/plan \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "inputs": { "OPENROUTER_API_KEY": "sk-or-…" } }' ``` Read the planned changes in the response, then deploy the changeset by its `id`. ```bash tab="cURL" curl https://api.dekka.cloud/v1/changesets/$CHANGESET_ID/deploy \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "confirm": true }' ``` A template only adds, so planning it where a resource of the same name already exists answers 409 `name_taken`. An input the template doesn't declare answers 422 `unknown_input`. ## Every template | Template | What it runs | Category | | --- | --- | --- | | [`n8n`](/docs/n8n) | Workflow automation with Postgres | Automation | | [`n8n-workers`](/docs/n8n#run-n8n-with-workers) | n8n in queue mode with a worker and Redis | Automation | | [`openclaw`](/docs/openclaw) | A personal AI assistant for your chat apps | AI | | [`hermes-agent`](/docs/hermes-agent) | Nous Research's agent with an OpenAI-compatible API | AI | | `open-webui` | A chat interface using models through the AI Gateway | AI | | `litellm` | An OpenAI-compatible proxy in front of many providers | AI | | `flowise` | A visual builder for AI agents and LLM workflows | AI | | `umami` | Website analytics without cookies | Analytics | | `metabase` | Dashboards and questions over your data | Analytics | | `uptime-kuma` | Uptime monitoring and status pages | Monitoring | | `meilisearch` | A typo-tolerant search engine | Search | | `nextjs-postgres` | A Next.js app with Postgres | Frameworks | | `fastapi-postgres-redis` | A FastAPI service with Postgres and Redis | Frameworks | | `django-postgres` | A Django site with Postgres | Frameworks | | `node-worker-queue` | A Node.js worker with a managed queue | Frameworks | | `node-worker-redis` | A Node.js worker with Redis | Frameworks | | `s3-bucket` | A private S3-compatible bucket | Storage | The framework templates start from Dekka's example repositories, so point each service at your own repository in its settings once it exists. To make your own, see [Writing templates](/docs/writing-templates). --- title: Writing templates description: The version 2 blueprint format, with metadata, inputs, generated secrets and volumes, and how to check a template before you use it. section: Templates order: 2 updated: 2026-11-23 --- Templates are [dekka.yaml blueprints](/docs/config-as-code#describe-a-whole-environment-in-dekkayaml) with `version: 2`, which adds a few keys to the version 1 format: `metadata` for how the template is shown, `inputs` for values the person deploying provides, expressions that generate secrets, and a `volume` on a service. Everything from version 1, including resource specs, shared variables, references and connections, works the same way, and you can use version 2 in your own dekka.yaml to plan an environment that needs inputs or volumes. ## A complete example ```yaml title="dekka.yaml" version: 2 name: Notes description: A notes app with Postgres, an admin token and a disk for uploads. metadata: category: frameworks summary: A notes app with its database and uploads. tags: [notes, postgres] maintainer: community notes: Sign in with the admin token, which you can reveal from the service's variables. inputs: - key: SMTP_PASSWORD label: SMTP password description: For sending sign-in emails. secret: true required: true - key: REGION_LABEL label: Region label default: accra variables: # Shared, so it's generated once and kept on every later plan. SESSION_KEY: ${{secret(32)}} resources: - name: notes kind: application spec: source: { provider: image, image: "ghcr.io/acme/notes:1.4" } runtime: { port: 8080, health_check_path: /health, memory_mib: 512 } volume: { mount_path: /data, size_gb: 1 } variables: SESSION_KEY: ${{shared.SESSION_KEY}} ADMIN_TOKEN: adm_${{secret_hex(16)}} SMTP_PASSWORD: ${{input.SMTP_PASSWORD}} REGION_LABEL: ${{input.REGION_LABEL}} PUBLIC_URL: ${{notes.DEKKA_PUBLIC_URL}} DB_HOST: ${{notes.PGHOST}} - name: notes-db kind: postgres spec: { version: "17", storage_mib: 512 } connections: - { from: notes, to: notes-db } ``` ## Metadata `metadata` decides how the template appears in the library, and plain blueprints leave it out. | Key | What it holds | | --- | --- | | `category` | Required. One of `ai`, `automation`, `analytics`, `monitoring`, `databases`, `frameworks`, `search`, `storage` or `cms`. | | `summary` | Required. One line for the template's card, up to 140 characters. | | `logo` | An icon name in lowercase letters, numbers and hyphens, such as `n8n`. | | `tags` | Up to 8 words that help search find it. | | `website`, `source_url` | Links to the project's site and its source code. | | `license` | The upstream licence, such as `MIT` or `AGPL-3.0`. | | `maintainer` | `dekka` or `community`, which is `dekka` unless you set it. | | `docs_slug` | A docs page about the template. | | `notes` | What to do after deploying, such as creating the first account, up to 600 characters. | | `featured` | `true` to list the template first. | ## Inputs Each entry in `inputs` is a value asked for when the template is planned, and a variable uses it as `${{input.KEY}}`. A template can declare up to 20. | Key | What it does | | --- | --- | | `key` | Required. The name used in `${{input.KEY}}`, in letters, numbers and underscores. | | `label` | Required. The field's label in the dashboard. | | `description` | A line under the field explaining what the value is for. | | `secret` | `true` to mask the field and store every variable that uses it as a secret. | | `required` | `true` to refuse a plan without it. | | `default` | The value used when none is given. | | `placeholder` | Example text shown in the empty field. | A required input left empty answers 422 `missing_input`, whose `details.inputs` lists each key. When an optional input is left empty and a variable's value is nothing but that input, the variable isn't set at all. ## Generated secrets `${{secret(N)}}` becomes N random bytes written as URL-safe base64, and `${{secret_hex(N)}}` becomes N random bytes as hexadecimal, so `secret_hex(16)` gives 32 characters. N is between 8 and 128. Expressions can sit inside a longer value, as in `sk-${{secret(24)}}`, and each one gets its own value. Dekka replaces expressions when the blueprint is planned, and any variable that used a secret expression or a secret input is stored as a secret and never shown in the plan. A shared variable that already exists keeps its value on every later plan, so put a generated key that protects stored data, such as an encryption key, in `variables` at the top level and reference it with `${{shared.KEY}}`. A service variable with a secret expression gets its value the first time it's created, and a later plan leaves it as it is. ## Volumes `volume` on a service creates a disk with it, mounted at `mount_path`, with `size_gb` between 1 and 1024 that defaults to 1. A service has at most one volume and runs a single replica, and databases manage their own storage, so they can't have one. The disk is named after the service, such as `notes-data`, and works like any other [volume](/docs/volumes). ## Variables a template can reference References such as `${{api.DEKKA_PRIVATE_DOMAIN}}` and `${{shared.KEY}}` stay in the stored value and resolve on every deploy, as described in [Variables](/docs/environment-variables#reference-another-services-variable). Templates often use these as well. - `DEKKA_PUBLIC_URL` is a web service's public address with `https://`, which suits settings such as a webhook URL. - A connection to PostgreSQL also gives the service `PGHOST`, `PGPORT`, `PGDATABASE`, `PGUSER` and `PGPASSWORD`, for software that wants the parts of `DATABASE_URL` separately. - A connection to Redis also gives `REDIS_HOST`, `REDIS_PORT` and `REDIS_PASSWORD` next to `REDIS_URL`. A service can reference its own connection variables, as `${{notes.PGHOST}}` does above, and the passwords stay secret. ## Check a template `POST /v1/blueprints/validate` checks a blueprint without an environment and lists every problem with its path. ```bash tab="cURL" curl https://api.dekka.cloud/v1/blueprints/validate \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json "$(jq -Rs '{ content: . }' dekka.yaml)" ``` These are the errors specific to version 2. | Path | Message | | --- | --- | | `inputs` | each input needs its own key | | `resources.0.variables.KEY` | `${{input.NAME}}` names an input the template doesn't declare | | `resources.0.variables.KEY` | `${{secret(4)}}` must generate between 8 and 128 bytes | | `resources.1.volume` | only services have volumes; databases manage their own storage | | `resources.0.volume` | a service with a volume runs one replica | To try a template in an environment, plan it with its inputs and read the changes before deploying. Nothing is created until you deploy the changeset. ```bash tab="cURL" curl https://api.dekka.cloud/v1/environments/$ENVIRONMENT_ID/blueprint/plan \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json "$(jq -Rs '{ content: ., inputs: { SMTP_PASSWORD: "…" } }' dekka.yaml)" ``` --- title: n8n description: Run n8n workflow automation with Postgres and a volume, or in queue mode with a worker and Redis. section: Templates order: 3 updated: 2026-11-23 --- [n8n](https://n8n.io) automates work across your apps with a visual workflow editor and hundreds of integrations. The **n8n** template runs it from the official `n8nio/n8n:stable` image with its data in PostgreSQL. ## What the template creates | Resource | What it is | | --- | --- | | `n8n` | The editor, API and webhooks on port 5678, with 512 MiB of memory and a 1 GB volume at `/home/node/.n8n` | | `n8n-db` | PostgreSQL 17 with 1 GiB of storage, connected to `n8n` | | `N8N_ENCRYPTION_KEY` | A shared variable Dekka generates, which encrypts the credentials you save in n8n | The service's database settings come from its connection, and `WEBHOOK_URL` and `N8N_HOST` point at the service's public address, so webhooks you create in n8n show the right URL. The timezone is set to `Africa/Accra`, which you can change in the service's variables. n8n needs nothing from you to deploy. Because its database needs 1 GiB of storage, it needs the Starter plan or above. ## After it deploys Open the service's URL and create the owner account, which is the first thing n8n asks for. Then add credentials for the apps you want to automate and build your first workflow. > [!WARNING] > Keep `N8N_ENCRYPTION_KEY` if you ever move n8n elsewhere. Without it, n8n can't read the credentials saved in its database. You can reveal it from the shared variables on the **Variables** page. ## Run n8n with workers The **n8n with workers** template runs n8n in queue mode, where the main service hands each execution to a worker through Redis. It suits workflows that run often or for a long time, because the editor stays responsive while workers do the work. | Resource | What it is | | --- | --- | | `n8n` | The editor, API and webhooks, as above, with `EXECUTIONS_MODE=queue` | | `n8n-worker` | A worker running `n8n worker --concurrency=10`, with 512 MiB of memory | | `n8n-db` | PostgreSQL 17, connected to both services | | `n8n-queue` | Redis with 64 MiB and the `noeviction` policy, so queued jobs are never dropped | Both services read the encryption key, execution mode and timezone from shared variables. To run more workers, raise **Replicas** in `n8n-worker`'s settings, and each replica reads the same encryption key from the shared variable. ## Limits The volume keeps n8n's local files, so the main service runs a single replica. n8n is distributed under the [Sustainable Use License](https://github.com/n8n-io/n8n), which limits some commercial uses, so read its terms before you build on it. --- title: OpenClaw description: Run OpenClaw, a personal AI assistant that answers in your chat apps and its own Control UI, with its memory on a volume. section: Templates order: 4 updated: 2026-11-06 --- [OpenClaw](https://openclaw.ai) is a personal AI assistant you run yourself, which you talk to from Telegram, Discord or its web Control UI. The **OpenClaw** template runs its gateway from the `ghcr.io/openclaw/openclaw:latest` image. ## What the template creates | Resource | What it is | | --- | --- | | `openclaw` | The gateway and Control UI on port 18789, with 1 GiB of memory and a 1 GB volume at `/data` | | `OPENCLAW_GATEWAY_TOKEN` | A token Dekka generates, which you sign in to the Control UI with | OpenClaw keeps its state in `/data/.openclaw` and its workspace in `/data/workspace`, so its memory and settings survive every deploy. Dekka checks its health at `/startupz`. OpenClaw needs 1 GiB of memory, which Starter and Growth allow. ## What you provide Every input is optional, and you can add or change any of them later in the service's variables. | Input | What it's for | | --- | --- | | Anthropic API key | The model OpenClaw thinks with. You can add other providers later in its settings. | | OpenAI API key | If you'd rather use OpenAI models. | | Telegram bot token | To talk to OpenClaw from Telegram. Create a bot with @BotFather to get one. | OpenClaw needs at least one model provider to answer anything, so add the Anthropic or OpenAI key now or in its settings before you start. ## After it deploys 1. Open the **Variables** page, choose `openclaw`, and press and hold `OPENCLAW_GATEWAY_TOKEN` to reveal it. 2. Open the service's URL and sign in to the Control UI with that token. 3. Add model providers and chat channels in its settings, and if you added a Telegram token, send your bot a message. The gateway token is a secret like any other, so treat it as a password. Anyone with it can use your assistant and the provider keys behind it. ## Limits The volume means the service runs a single replica. OpenClaw is open source under the [MIT licence](https://github.com/openclaw/openclaw). Your model provider's terms and charges apply to the requests it makes. --- title: Hermes Agent description: Run Nous Research's Hermes Agent with its OpenAI-compatible API, using models through OpenRouter and keeping its memory on a volume. section: Templates order: 5 updated: 2026-11-06 --- [Hermes Agent](https://hermes-agent.nousresearch.com) by Nous Research is an agent that learns skills and keeps memory as you use it. The **Hermes Agent** template runs the `nousresearch/hermes-agent:stable` image with its API server on, so your apps can call it like any OpenAI-compatible endpoint. ## What the template creates | Resource | What it is | | --- | --- | | `hermes` | The agent's gateway and API on port 8642, started with `gateway run`, with 512 MiB of memory and a 1 GB volume at `/opt/data` | | `API_SERVER_KEY` | A key Dekka generates, which callers send as a bearer token | Hermes keeps its memory, skills and settings in `/opt/data`, so they survive every deploy. It needs 512 MiB of memory, which every plan allows. ## What you provide | Input | What it's for | | --- | --- | | OpenRouter API key | Required. Hermes reaches its models through [OpenRouter](https://openrouter.ai). | | Telegram bot token | Optional, to message Hermes from Telegram. | | Discord bot token | Optional, to message Hermes from Discord. | ## After it deploys Reveal `API_SERVER_KEY` on the **Variables** page by choosing `hermes` and pressing and holding the value. Your apps call the service's URL with that key as a bearer token, using the OpenAI-compatible endpoints described in the [Hermes Agent docs](https://hermes-agent.nousresearch.com), so most OpenAI client libraries work once you point them at it. If you added a chat token, message your bot to talk to the same agent. ## Limits The volume means the service runs a single replica. Hermes Agent is open source under the [MIT licence](https://github.com/NousResearch/hermes-agent). OpenRouter's terms and charges apply to the model requests it makes. --- title: Connections description: Connect a service to PostgreSQL, Redis or a bucket, and the variables each connection sets. section: Data order: 1 updated: 2026-11-23 --- A connection gives one service its own credentials for one database or bucket, delivered as environment variables. To make one, drag from the service's right edge to the database or bucket on the canvas. ## What does connecting do? 1. Checks that both are in the same environment and that your role allows the change. 2. Records the connection and asks the infrastructure engine for credentials that belong only to this service. 3. Encrypts the credentials into the service's variables. 4. Restarts the service so it picks them up. A service that is stopped, hasn't deployed yet or runs on a schedule isn't restarted; it gets the variables the next time it starts, deploys or runs, and a first deploy waits for the credentials before it starts. You can connect from the canvas by drawing a line from the service to the database, or from the service's **Settings** under **Attached services**, which also detaches. The line on the canvas is dashed while this happens and turns solid once the restart succeeds. If a step fails, the line shows the error and a **Retry** button, and nothing is left half-applied. ## Which variables does a connection set? | Connected to | Variables | | --- | --- | | PostgreSQL | `DATABASE_URL`, `PGHOST`, `PGPORT`, `PGDATABASE`, `PGUSER`, `PGPASSWORD` | | Redis | `REDIS_URL`, `REDIS_HOST`, `REDIS_PORT`, `REDIS_PASSWORD` | | Object storage | `S3_ENDPOINT`, `S3_BUCKET`, `S3_ACCESS_KEY_ID`, `S3_SECRET_ACCESS_KEY`, `S3_REGION`, `S3_FORCE_PATH_STYLE`, and `AWS_ENDPOINT_URL_S3`, `AWS_REGION`, `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` | | [Queue](/docs/queues) | `QUEUE_URL` | `DATABASE_URL`, `REDIS_URL`, `QUEUE_URL`, `PGPASSWORD`, `REDIS_PASSWORD` and the bucket's access keys, under both their `S3_` and `AWS_` names, are secret. The separate host, port and database variables are there for apps that ask for each part on its own rather than a single URL, and other services can reference them, as in `${{n8n.PGHOST}}`. All of them are marked **Connection** on the **Variables** page and can't be edited there. If the service already has a variable with one of these names, whether its own or one another connection set, Dekka refuses the connection with 409 `env_key_conflict`, so a service can be connected to one PostgreSQL database, one Redis cache, one bucket and one queue at a time. Remove or rename a variable of its own before connecting. Connecting two resources that are already connected answers 409 `connection_exists`. The `AWS_` names are the exception: AWS SDKs read them on their own, so most need no setup to reach the bucket, but a service that already sets its own `AWS_` variables keeps them, and the bucket's credentials stay available under the `S3_` names. Buckets are addressed by path, as in `https://s3.gh-1.dekka.cloud/`, which is what `S3_FORCE_PATH_STYLE=true` tells SDKs that read it. Rotating credentials, with **Rotate** under **Credentials** on the **Data** tab of a PostgreSQL database or a Redis cache, or with `POST /v1/resources/{id}/rotate-credentials` for any of them, gives every connected service new ones for PostgreSQL, Redis, buckets and queues alike, revokes the old ones and restarts each service. ## What can connect to what? Web services, workers and cron jobs can each connect to PostgreSQL, Redis, object storage and queues in the same environment. Two services connected to the same database each get their own credentials, and databases and buckets never connect to each other. ## Connect with the API ```bash tab="cURL" curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/connections \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "source_id": "'$SERVICE_ID'", "target_id": "'$DATABASE_ID'" }' ``` The response lists the connection's `bindings` and its `status`, which moves from `pending` to `active`, or to `failed` with the reason. `POST /v1/connections/{id}/retry` tries a failed connection again. ## Disconnect a service Select either end on the canvas, find the connection under **Connections** and choose **Disconnect**. Dekka removes the credentials and the variables once the engine confirms. A database or bucket with connections can't be deleted until you disconnect them. --- title: PostgreSQL description: Create a PostgreSQL database, connect services to it, browse and query it, and reach it from your own machine. section: Data order: 2 updated: 2026-11-23 --- Dekka runs PostgreSQL 16 or 17 in your project's region. A database is private, so only services you connect to it can reach it, unless you turn on its TCP proxy. ## Create a database On the canvas, choose **Add**, then **PostgreSQL**. Pick a name, a **Version** and a **Size**, which is 100 MiB or 1 GiB of storage with 256 MiB of memory, or one of the Seed, Core, Forge and Atlas tiers, and choose **Create database**. A new database has 100 MiB of storage and 256 MiB of memory unless you choose otherwise. The storage of every database in your organisation counts against one allowance: 100 MiB on the trial, 1 GiB on Starter and 5 GiB on Growth. In **Settings** you can grow a database's storage and change its memory, and the dashboard only offers sizes larger than the current storage. The version is fixed once the database exists. ## Connect a service Drag from a service to the database. The service receives `DATABASE_URL` in the form `postgresql://:@:5432/?sslmode=require`, with credentials that belong only to it, and it restarts to pick them up. Two services connected to one database each get their own user. Most drivers read the whole URL: ```ts title="db.ts" import postgres from "postgres"; export const sql = postgres(process.env.DATABASE_URL!); ``` ## Browse tables and run a query Select the database and open **Data**. **Tables** lists each table with an estimate of its rows and its size, and **Query** runs one read-only statement, such as a `SELECT`, `WITH`, `EXPLAIN` or `SHOW`. Dekka refuses anything that writes or changes the database, returns up to 100 rows and stops a query after 5 seconds. Through the API, `max_rows` and `timeout_ms` raise those to as many as 500 rows and 10 seconds, and each person can run up to 60 queries a minute. Each query is recorded in your organisation's **Activity** with its length and a hash, never its text or results. ## Rotate credentials Under **Credentials** on the **Data** tab, choose **Rotate**. Every connected service gets a new user and password and restarts with the new `DATABASE_URL`. To see a service's full URL, reveal its `DATABASE_URL` on the **Variables** page. ## Connect from your own machine Turn on **Public TCP proxy** in the database's settings, stage the change and deploy it. Dekka gives the database a public host and a port between 10000 and 60000, and anyone with valid credentials can then connect, so turn it off again when you're done. [TCP proxy](/docs/tcp-proxy) shows how to find the address and connect with `psql`. ## Backups and failover Dekka takes a backup of each database every day and keeps it for seven days, and **Back up now** on the **Data** tab takes one straight away. [Backups](/docs/backups) explains where they're kept and how to restore one. During the pilot each database runs on a single server without automatic failover. ## Delete a database Disconnect every service first, then choose **Delete database** from the database's menu and type its name to confirm. Deleting a database removes it and everything in it. Deleting an environment also deletes every database in it, and a pull request preview's environment is deleted, databases included, when the pull request closes. --- title: Redis description: Create a Redis database for caching, queues and sessions, and choose its memory, eviction policy and persistence. section: Data order: 3 updated: 2026-11-23 --- Dekka runs Redis 7.4 or 8.0 in your project's region for caching, queues and sessions. Like PostgreSQL, it's private, so only services you connect to it can reach it unless you turn on its TCP proxy. ## Create a Redis database On the canvas, choose **Add**, then **Redis**. Pick a name, a **Version** and a **Memory limit**, choose what happens **When memory is full**, and choose **Create Redis**. A new database has 64 MiB unless you choose otherwise. Redis memory across your organisation counts against one allowance: 256 MiB on the trial, 1 GiB on Starter and 4 GiB on Growth. Dekka measures it every hour as `redis_gb_hours`, and each plan includes its allowance for a 730-hour month. ## Connect a service Drag from a service to the Redis database. The service receives `REDIS_URL` in the form `rediss://default:@:6379`, which uses TLS, and restarts to pick it up. ```ts title="cache.ts" import { createClient } from "redis"; export const redis = createClient({ url: process.env.REDIS_URL }); await redis.connect(); ``` ## What happens when memory is full? The memory limit is Redis's `maxmemory`, and the eviction policy decides what Redis does once it's reached. The default refuses new writes, which suits queues and anything you can't afford to lose. For a cache, evicting least recently used keys is the usual choice. | In the dashboard | `eviction_policy` | | --- | --- | | Refuse writes when full | `noeviction` (default) | | Evict least recently used keys | `allkeys-lru` | | Evict least frequently used keys | `allkeys-lfu` | | Evict least recently used keys with a TTL | `volatile-lru` | | Evict keys closest to expiry | `volatile-ttl` | | Evict random keys | `allkeys-random` | The API also accepts `volatile-lfu` and `volatile-random`. ## Turn persistence on or off **Persistence** is on by default and writes every change to disk with Redis's append-only file, so data survives a restart. A pure cache can turn it off. ## Browse keys Select the Redis database and open **Data**. **Keys** lists keys matching a pattern such as `session:*`, with each key's type, time to live and the start of its value. Under **Credentials**, **Rotate** gives every connected service a new password and restarts it. ## Connect from your own machine Turn on **Public TCP proxy** in the database's settings to give it a public host and port. [TCP proxy](/docs/tcp-proxy) shows how to connect with `redis-cli`. > [!NOTE] > With persistence on, Dekka copies a cache every night and keeps each copy for 7 days, and you can back it up whenever you want. A cache is restored to a copy as it was taken, so anything written since is lost. [Backups](/docs/backups) covers restoring one. --- title: Object storage description: Keep files in a private S3-compatible bucket in Accra, from a service on Dekka or from anywhere else, with a file explorer, links that expire, CORS rules and keys of the bucket's own. section: Data order: 4 updated: 2026-11-30 --- A Dekka bucket speaks the S3 API, so the AWS SDKs, the AWS CLI and most S3 tools work with it. Buckets are private, which means an object is read only with a key or with a link that you made, and you can use a bucket from a service you run on Dekka or entirely by itself. ## Create a bucket On the canvas, choose **Add**, then **Object storage**, give the bucket a name and choose **Create bucket**. Object storage in your organisation counts against one allowance: 250 MiB on the trial, 2 GiB on Starter and 10 GiB on Growth. Beyond it you pay for what you store, and traffic and requests are free, as [How pricing works](/docs/pricing#how-is-object-storage-priced) describes. ## Browse and upload files Select the bucket on the canvas and open **Files**. The explorer shows the bucket as folders, and a folder is every key that shares the part before a slash. - Drag files onto the list, or choose **Upload**, to add them to the folder you're in. - Choose **Download** from a file's menu to save it. - Choose **Delete** to remove a file, or **Delete folder** to remove a folder and everything in it. Neither can be undone. Files go straight between your browser and the bucket, so nothing you store passes through Dekka's API. The first upload from the dashboard adds a [CORS rule](#let-browsers-call-a-bucket) for the dashboard's address, which is what lets your browser send to the bucket. ## Use a bucket from a service Connect the service to the bucket, and it receives `S3_ENDPOINT`, `S3_BUCKET`, `S3_REGION`, `S3_ACCESS_KEY_ID` and `S3_SECRET_ACCESS_KEY`. Use path-style requests, and sign for the region in `S3_REGION`. ```ts tab="TypeScript" import { S3Client, PutObjectCommand } from "@aws-sdk/client-s3"; const credentials = { accessKeyId: process.env.S3_ACCESS_KEY_ID!, secretAccessKey: process.env.S3_SECRET_ACCESS_KEY!, }; const s3 = new S3Client({ endpoint: process.env.S3_ENDPOINT, region: process.env.S3_REGION, forcePathStyle: true, credentials, }); await s3.send(new PutObjectCommand({ Bucket: process.env.S3_BUCKET, Key: "hello.txt", Body: "Hello from Dekka" })); ``` ```python tab="Python" import os import boto3 from botocore.config import Config s3 = boto3.client( "s3", endpoint_url=os.environ["S3_ENDPOINT"], region_name=os.environ["S3_REGION"], aws_access_key_id=os.environ["S3_ACCESS_KEY_ID"], aws_secret_access_key=os.environ["S3_SECRET_ACCESS_KEY"], config=Config(s3={"addressing_style": "path"}), ) s3.put_object(Bucket=os.environ["S3_BUCKET"], Key="hello.txt", Body=b"Hello from Dekka") ``` Each connected service gets keys scoped to this one bucket, so a leaked key can't reach anything else. ## Use a bucket from anywhere else A bucket doesn't need a service on Dekka. Under **Settings**, choose **New key**, name it for what will use it, and choose whether it may only read or may read and write. Dekka shows the endpoint, the bucket's name, the region, the access key ID and the secret once, so copy the secret before you close it. With those five values, any S3 tool reaches the bucket. This copies a file up with the AWS CLI: ```bash export AWS_ACCESS_KEY_ID= export AWS_SECRET_ACCESS_KEY= export AWS_DEFAULT_REGION= aws s3 cp export.tar.gz s3:/// --endpoint-url ``` Choose **Revoke** beside a key to end it at once. Whatever used it is refused from then on, and a revoked key can't be brought back. Only a signed-in member can make or revoke a key, so an API key that leaks can't mint itself a way into your files. ## Share a file with a link A link opens one object until a time you set, with no key and no sign-in, so anyone who has it can use it. In the explorer, open a file's menu and choose how long the link should work under **Copy a link that works for**. An app makes its own links with the SDK it already has, which is how you let a visitor download a private file or upload straight to the bucket without the file passing through your server. ```ts tab="TypeScript" import { GetObjectCommand, PutObjectCommand } from "@aws-sdk/client-s3"; import { getSignedUrl } from "@aws-sdk/s3-request-presigner"; // A link to download one file, good for 15 minutes. const download = await getSignedUrl(s3, new GetObjectCommand({ Bucket: process.env.S3_BUCKET, Key: "receipts/0042.pdf" }), { expiresIn: 900 }); // A link a browser can PUT a file to, good for 5 minutes. const upload = await getSignedUrl(s3, new PutObjectCommand({ Bucket: process.env.S3_BUCKET, Key: "avatars/user-41.png" }), { expiresIn: 300 }); ``` ```python tab="Python" # A link to download one file, good for 15 minutes. download = s3.generate_presigned_url("get_object", Params={"Bucket": os.environ["S3_BUCKET"], "Key": "receipts/0042.pdf"}, ExpiresIn=900) # A link a browser can PUT a file to, good for 5 minutes. upload = s3.generate_presigned_url("put_object", Params={"Bucket": os.environ["S3_BUCKET"], "Key": "avatars/user-41.png"}, ExpiresIn=300) ``` A link lasts at most seven days. The API makes one too, with `POST /v1/resources/{id}/bucket/links`. ## Let browsers call a bucket A page on your site can't call a bucket from the visitor's browser until the bucket's CORS rules name that site. Under **Settings**, choose **Add rule**, enter the site's origin, such as `https://example.com`, and tick what its pages may do: `GET` to read, `PUT` to upload. Use `*` for any site, or one `*` inside an origin, as in `https://*.example.com`. A rule only decides which pages may call. It never makes a file public, so a browser still needs a link or a key to read anything. ## Delete a bucket Disconnect every service, then choose **Delete bucket** from the bucket's menu and type its name. This deletes every object in it and revokes every key, and objects in buckets aren't backed up. --- title: Queues description: Create a managed message queue for workers and scheduled jobs, choose how long it hides and keeps messages, and connect services to it. section: Data order: 5 updated: 2026-11-23 --- A queue holds work for workers and scheduled jobs to take, with visibility timeouts and dead letters handled by Dekka instead of your code. Like a bucket, it's reached at your region's HTTPS endpoint, and only services you connect to it get a token. ## Create a queue On the canvas, choose **Add**, then **Queue**. Give it a name, choose a **Visibility timeout** and how long to **Keep messages for**, enter a number under **Move to dead letters after** if messages that keep failing should be set aside, and choose **Create queue**. Unless you choose otherwise, a new queue hides a received message for 30 seconds, keeps messages for four days and never moves them to dead letters. To create one with the API, send the spec to `POST /v1/projects/{project_id}/resources`. Without an `environment_id`, the queue goes in the project's default environment. ```bash curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/resources \ -H "Authorization: Bearer $DEKKA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "kind": "queue", "name": "jobs", "spec": { "visibility_timeout_seconds": 300, "retention_seconds": 604800, "max_message_bytes": 65536, "dead_letter_after": 5 } }' ``` ## What do the queue settings mean? The visibility timeout is how long a received message stays hidden from other consumers before it can be received again, so make it longer than your slowest job takes. A message that's still in the queue when its retention ends is deleted unread, and with dead letters on, a message received that many times moves to the queue's dead-letter queue. | In the dashboard | `spec` field | Allowed | Default | | --- | --- | --- | --- | | Visibility timeout | `visibility_timeout_seconds` | 0 to 43200 seconds (12 hours) | 30 | | Keep messages for | `retention_seconds` | 60 to 1209600 seconds (14 days) | 345600 (four days) | | Largest message | `max_message_bytes` | 1024 to 262144 bytes | 262144 | | Move to dead letters after | `dead_letter_after` | 1 to 1000 receives, or `null` to keep every message | `null` | The dashboard offers visibility timeouts from 30 seconds to 12 hours and retention of 1, 4, 7 or 14 days, and the API takes any value in range. A queue's **Settings** tab changes all four after it's created. Through the API, send the whole `spec` with `PATCH /v1/resources/{id}`, because any field you leave out goes back to its default. ## Connect a service Drag from a web service, worker or cron job to the queue. Each connection gets its own token, and the service receives it in a secret `QUEUE_URL` and restarts to pick it up. ```text https://@queues..dekka.cloud/queues/ ``` The token is the URL's user info, so `QUEUE_URL` is the only variable a client needs. The path ends in the queue's slug, which is its name followed by four random characters, such as `jobs-k3x9`. ## How do I send and receive messages? Dekka hasn't published the protocol for sending and receiving messages yet. `QUEUE_URL` is the address and token your code will use once it has, and until then a [Redis](/docs/redis) database that refuses writes when full can hold a queue for a job. ## How many queues can I have? | Plan | Queues | | --- | --- | | Trial | 1 | | Starter | 5 | | Growth | 20 | Every queue that isn't deleted counts, including the copy a forked environment such as a pull request preview makes, and creating one past the limit answers 403 `entitlement_exceeded`. Messages and storage aren't billed yet. ## Delete a queue Disconnect every service, then choose **Delete queue** from the queue's menu and type its name. Deleting a queue deletes every message in it, and queues aren't backed up. The API deletes with `DELETE /v1/resources/{id}?confirm=`, answers 422 `confirmation_required` without the name and 409 `resource_has_connections` while a service is still connected. --- title: Backups description: How Dekka backs up PostgreSQL databases, Redis caches and volumes, where the backups are kept, and how to restore one or go back to a point in time. section: Data order: 6 updated: 2026-11-23 --- Every PostgreSQL database is backed up once a day at 02:00 Accra time, and each backup is kept for the database's retention period, 7 days unless you change it. Between backups Dekka archives the database's write-ahead log continuously, so you can restore to any moment in that window as well as to the backups themselves. A Redis cache with persistence on, which is the default, and every volume attached to a service are copied each night after 03:00 Accra time, and each copy is kept for 7 days. A cache or a volume is restored to a copy as it was taken. You can also back up a database, a cache or a volume whenever you want, and a backup you ask for is kept for 30 days. Backups are kept in Ghana and copied to a second host every night. ## Change the schedule or how long backups are kept Each database's `backups` setting holds a `schedule` of `daily` or `off`, and `retention_days` between 1 and 90. Dekka's engine carries the setting out, so changing it takes effect at the next 02:00 and the retention period bounds both the backups and the archive, which is how far back a point-in-time restore can reach. Turning the schedule off stops new backups and leaves the ones already taken until they expire. Change it with `PATCH /v1/resources/{id}`, which replaces the whole spec, so send every other setting as it is. ```bash tab="cURL" curl -X PATCH https://api.dekka.cloud/v1/resources/$DATABASE_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "spec": { "version": "16", "memory_mib": 256, "storage_mib": 1024, "tcp_proxy": false, "backups": { "schedule": "daily", "retention_days": 14 } } }' ``` ## Take a backup now Select the database or the cache, open **Data** and choose **Back up now** under **Backups**. For a volume, choose **Back up now** in the **Volume** section of the service's settings. The list under each shows the eight newest backups, scheduled and manual, with the size where the engine can measure it and when each expires, and the API lists them all. ```bash tab="cURL" curl -X POST https://api.dekka.cloud/v1/resources/$DATABASE_ID/backups \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` For a volume, send the same request to `/v1/volumes/{id}/backups`. A backup moves from `pending` through `running` to `completed`, or to `failed` with an `error`. Only one backup of the same database, cache or volume can run at a time, and asking for another answers 409 `backup_in_progress`, while one that isn't ready answers 409 `database_not_ready`. You can ask for up to 10 backups of each an hour. `GET` on the same paths lists backups, newest first, with their `kind`, size, when they expire and where they're kept. A database's list includes the backups its schedule took, which Dekka reads from the engine each time you ask, so a scheduled backup appears within a couple of minutes of completing. ## Restore a backup Choose **Restore** next to a backup, type the name Dekka asks for and choose **Restore and replace**. Restoring replaces the current data with the backup, and anything written since the backup was taken is lost, so Dekka asks for the database's or cache's name, or for the name of the service the volume belongs to, as confirmation. A cache, or the service a volume belongs to, is stopped while the backup is put back, and services connected to a database may see errors until the restore finishes. ```bash tab="cURL" curl https://api.dekka.cloud/v1/backups/$BACKUP_ID/restore \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "confirm": "db" }' ``` Only a `completed` backup can be restored, and the request returns the restore operation so you can follow it. ## Restore a database to a point in time Choose **Restore** above a database's backups, pick **A point in time** and enter any moment within the retention period, back to the oldest backup Dekka holds, to the minute. The engine starts from the newest backup taken before that moment and replays the archive up to it, so the database comes back as it was then. Through the API, send the moment as `target_time`. ```bash tab="cURL" curl https://api.dekka.cloud/v1/resources/$DATABASE_ID/restore \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "confirm": "db", "target_time": "2026-11-05T14:30:00Z" }' ``` Leave `target_time` out to restore the latest backup as it was taken. A time outside the retention period answers 422 `target_time_outside_window`, and a time earlier than any backup Dekka holds answers 409 `no_backup`. The same `target_time` can go with `POST /v1/backups/{id}/restore` to replay from that backup in particular. A database that has just been restored needs a fresh backup of its new copy before a later point in time can be reached, and the schedule takes one within minutes of the restore finishing, so wait for it to appear in the list before restoring again. Virtual servers keep their own [snapshots](/docs/virtual-servers#snapshots) instead, on the same host as their disk. --- title: AI Gateway description: Call OpenAI, Anthropic, Gemini, DeepSeek, Kimi and GLM models through one OpenAI-compatible endpoint, send them images, stream replies, and see which model answered. section: AI order: 1 updated: 2026-11-23 --- The AI Gateway is one OpenAI-compatible endpoint at `https://api.dekka.cloud/v1/ai` for every model your projects may use. You keep the OpenAI SDK you already have, point its base URL at the gateway and use a gateway key, and switching provider is a change to the model name. The same key also generates images, transcribes audio and speaks text, as [Images and voice](/docs/ai-images-and-voice) describes. Each request is logged with its model, tokens, timing and cost, and you can limit what each project may use with [routing rules](/docs/ai-routing). ## Send your first request Create a gateway key under **AI Gateway**, then **Keys**, as [AI keys](/docs/ai-keys) describes, and save it as `DEKKA_AI_KEY`. Then send a chat completion with a model from the [catalogue](/docs/ai-models), named by provider and model. ```ts tab="TypeScript" import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://api.dekka.cloud/v1/ai", apiKey: process.env.DEKKA_AI_KEY, }); const completion = await client.chat.completions.create({ model: "anthropic/claude-sonnet-5-5", messages: [{ role: "user", content: "Summarise this complaint in one sentence." }], }); console.log(completion.choices[0].message.content); ``` ```python tab="Python" import os from openai import OpenAI client = OpenAI( base_url="https://api.dekka.cloud/v1/ai", api_key=os.environ["DEKKA_AI_KEY"], ) completion = client.chat.completions.create( model="anthropic/claude-sonnet-5-5", messages=[{"role": "user", "content": "Summarise this complaint in one sentence."}], ) print(completion.choices[0].message.content) ``` ```bash tab="cURL" curl https://api.dekka.cloud/v1/ai/chat/completions \ -H "Authorization: Bearer $DEKKA_AI_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "anthropic/claude-sonnet-5-5", "messages": [{"role": "user", "content": "Summarise this complaint in one sentence."}] }' ``` The reply is a `chat.completion` object in OpenAI's shape, with the model that answered as `model` and the token counts under `usage`. `GET /v1/ai/models` lists the models your key may use, in OpenAI's model list format. ## Stream the reply Set `stream: true` and the gateway answers with server-sent events of `chat.completion.chunk`, ending in `data: [DONE]`. The last chunk before `[DONE]` has no choices and carries the usage, whether or not you set `stream_options.include_usage`, so read each chunk's choices with care. ```ts title="stream.ts" const stream = await client.chat.completions.create({ model: "anthropic/claude-sonnet-5-5", messages: [{ role: "user", content: "Write a short welcome message for new customers." }], stream: true, }); for await (const chunk of stream) { process.stdout.write(chunk.choices[0]?.delta?.content ?? ""); } ``` If the provider fails after the reply has started, the response is already a 200, so the stream carries an event with `error.code` and `error.message` and then `[DONE]`. ## See which provider and model answered Every successful response carries two headers. They matter after a [fallback](/docs/ai-routing#how-does-fallback-work), when the model that answered isn't the one you asked for. | Header | Value | | --- | --- | | `X-Dekka-Provider` | The provider that answered: `openai`, `anthropic`, `google`, `deepseek`, `moonshot`, `zai`, or `private` for a [private inference endpoint](/docs/gpu-instances#call-an-endpoint-through-the-ai-gateway) | | `X-Dekka-Model` | The catalogue ID of the model that answered, such as `anthropic/claude-sonnet-5-5` | With the OpenAI SDK for TypeScript, `withResponse()` gives you the headers alongside the reply. ```ts const { data, response } = await client.chat.completions .create({ model: "anthropic/claude-sonnet-5-5", messages: [{ role: "user", content: "Hello" }] }) .withResponse(); console.log(response.headers.get("X-Dekka-Model"), data.choices[0].message.content); ``` ## What does the gateway accept? The gateway takes OpenAI's chat completions request and ignores fields it doesn't know. Messages can have the roles `system`, `developer`, `user` and `assistant`. Content is text, or a list of `text` parts and, in user messages, `image_url` parts for models that take images, which [Images and voice](/docs/ai-images-and-voice#send-an-image-in-a-chat) covers. Audio parts answer 422 `unsupported_content`. Tool calling isn't supported yet, so a request with `tools`, `tool_choice`, `functions` or `function_call` answers 422 `unsupported_feature` rather than being sent without them. It passes on `max_tokens` or `max_completion_tokens`, `temperature`, `top_p`, up to four `stop` sequences and `user`. Anthropic needs a maximum, so the gateway sets `max_tokens` to 1024 when you send none. Claude models from 4.7 on accept only their default sampling settings, so `temperature` and `top_p` reach only Claude Haiku 4.5 and Claude Sonnet 4.5 among the Anthropic models. DeepSeek and Z.ai receive the limit as `max_tokens`, and Kimi K3.1 Pro sets its own sampling, so the gateway never sends it `temperature` or `top_p`. ## Where are prompts processed? Every provider in the catalogue processes prompts and replies on infrastructure it manages outside Ghana. OpenAI and Anthropic process them in the United States and DeepSeek in China, while Google (Gemini), Moonshot AI (Kimi) and Z.ai (GLM) don't publish where they process API requests. Each model's `processing_region` in the catalogue says what its provider publishes. Dekka keeps each request's model, token counts, timing and cost, and never stores the prompt, the reply, or any image or audio. To keep personal details out of what leaves, turn on [Veil](/docs/ai-veil) for a project. It finds details such as Ghana Card PINs and phone numbers in each prompt and masks, redacts or blocks them before the provider sees the text. > [!NOTE] > Private inference endpoints, for prompts that can't leave the country, use the same endpoint and the same key. They're on the waitlist until GPU capacity exists, and until then a request to one answers 503 `endpoint_unavailable` in production. [GPU instances](/docs/gpu-instances#request-a-private-inference-endpoint) describes how to request one. --- title: Images and voice description: Send images to chat models, generate images, transcribe audio and turn text into speech through the AI Gateway, with the same key, rules and logs as chat. section: AI order: 1.5 updated: 2026-12-02 --- The AI Gateway takes OpenAI's requests for images and audio as well as chat. You use the same gateway key and the same SDK, and every request goes through the project's [routing rules](/docs/ai-routing), its spend cap and the request log, just as a chat completion does. Each model has a `kind` that decides which endpoint serves it, and the [model catalogue](/docs/ai-models#what-can-each-model-do) lists them. | What you want | Endpoint | Models, for example | | --- | --- | --- | | A chat model to read an image | `POST /v1/ai/chat/completions` | `openai/gpt-6-luna`, `anthropic/claude-sonnet-5-5`, `google/gemini-3.8-flash` | | Generate an image | `POST /v1/ai/images/generations` | `openai/gpt-image-2`, `openai/gpt-image-2.6-flare` | | Transcribe audio | `POST /v1/ai/audio/transcriptions` | `openai/gpt-4o-mini-transcribe`, `openai/gpt-4o-transcribe` | | Turn text into speech | `POST /v1/ai/audio/speech` | `openai/gpt-4o-mini-tts`, `openai/tts-1` | Images and audio pass through the gateway to the provider and are never stored. The request log keeps the kind of request, the model, usage, timing and cost. > [!WARNING] > [Veil](/docs/ai-veil) finds personal details in text but doesn't read images or audio. A project that turns Veil on refuses images in chat and audio for transcription unless it allows them with a warning, and allowed media reaches the provider as it is. Keep material such as a photo of an ID card or a recording of a phone call to providers you've approved for it. ## Send an image in a chat Add an `image_url` part to a user message. The URL can be an `https` address the provider can fetch, or a base64 data URL of a PNG, JPEG, WebP or GIF image of up to 10 MB. A request can carry up to 20 images, and `detail` (`auto`, `low` or `high`) is passed on to providers that read it. ```python tab="Python" import base64 import os from openai import OpenAI client = OpenAI(base_url="https://api.dekka.cloud/v1/ai", api_key=os.environ["DEKKA_AI_KEY"]) with open("receipt.jpg", "rb") as f: receipt = base64.b64encode(f.read()).decode() reply = client.chat.completions.create( model="openai/gpt-6-luna", messages=[{ "role": "user", "content": [ {"type": "text", "text": "What does this receipt total?"}, {"type": "image_url", "image_url": {"url": f"data:image/jpeg;base64,{receipt}"}}, ], }], ) print(reply.choices[0].message.content) ``` ```bash tab="cURL" curl https://api.dekka.cloud/v1/ai/chat/completions \ -H "Authorization: Bearer $DEKKA_AI_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "anthropic/claude-sonnet-5-5", "messages": [{ "role": "user", "content": [ {"type": "text", "text": "Describe this photo in one sentence."}, {"type": "image_url", "image_url": {"url": "https://example.com/market.jpg"}} ] }] }' ``` The gateway passes the parts on unchanged to OpenAI-compatible providers and turns them into image blocks for Anthropic. Images count toward the request's input tokens at the provider's own rate. A model whose `input_modalities` doesn't include `image` answers 422 `modality_not_supported`, and a fallback only moves to models that take images too. ## Generate an image Send a prompt to an image model. The response has each image as base64 in `b64_json`, because the gateway never stores images and so has no URL to give, and `response_format: "url"` answers 422 `unsupported_feature`. You can ask for up to four images, a `size` of `1024x1024`, `1536x1024`, `1024x1536` or `auto`, a `quality` of `low`, `medium`, `high` or `auto`, an `output_format` of `png`, `jpeg` or `webp`, and a `background` of `transparent`, `opaque` or `auto`. ```python tab="Python" image = client.images.generate( model="openai/gpt-image-2", prompt="A poster for a farmers' market in Kumasi, in warm colours", size="1024x1536", quality="medium", ) with open("poster.png", "wb") as f: f.write(base64.b64decode(image.data[0].b64_json)) ``` ```bash tab="cURL" curl https://api.dekka.cloud/v1/ai/images/generations \ -H "Authorization: Bearer $DEKKA_AI_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "openai/gpt-image-2.6-flare", "prompt": "A simple logo of a cocoa pod", "size": "1024x1024"}' \ | jq -r '.data[0].b64_json' | base64 --decode > logo.png ``` The response's `usage` gives the prompt's text tokens and the image tokens the provider reports. A larger or higher-quality image uses more image tokens, so it costs more. ## Transcribe audio Send the audio as multipart form data with a transcription model. The file can be up to 25 MB, and its name must end in one of `flac`, `m4a`, `mp3`, `mp4`, `mpeg`, `mpga`, `oga`, `ogg`, `wav` or `webm`. You can add a `language` such as `en`, a `prompt` with names or terms to listen for, and a `temperature`. The answer is `{"text": ..., "usage": ...}` as JSON, or the text alone with `response_format=text`. ```python tab="Python" with open("voice-note.m4a", "rb") as audio: transcript = client.audio.transcriptions.create( model="openai/gpt-4o-mini-transcribe", file=audio, language="en", ) print(transcript.text) ``` ```bash tab="cURL" curl https://api.dekka.cloud/v1/ai/audio/transcriptions \ -H "Authorization: Bearer $DEKKA_AI_KEY" \ -F model=openai/gpt-4o-transcribe \ -F file=@meeting.mp3 \ -F response_format=text ``` Transcription models are priced per audio token in and text token out, which the provider reports. OpenAI estimates that comes to about $0.003 a minute for `gpt-4o-mini-transcribe` and $0.006 a minute for `gpt-4o-transcribe`. ## Turn text into speech Send up to 4,096 characters of text, a `voice` such as `alloy`, `coral`, `nova` or `sage`, and a `response_format` of `mp3` (the default), `opus`, `aac`, `flac`, `wav` or `pcm`. The reply's body is the audio itself. `gpt-4o-mini-tts` also takes `instructions` about the delivery, such as "speak calmly", and `tts-1` takes a `speed` from 0.25 to 4. ```python tab="Python" speech = client.audio.speech.create( model="openai/gpt-4o-mini-tts", voice="coral", input="Your order is on its way and should arrive by noon.", instructions="Warm and unhurried.", ) speech.write_to_file("update.mp3") ``` ```bash tab="cURL" curl https://api.dekka.cloud/v1/ai/audio/speech \ -H "Authorization: Bearer $DEKKA_AI_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "openai/tts-1", "voice": "nova", "input": "Akwaaba, and thank you for calling."}' \ --output greeting.mp3 ``` `tts-1` is priced per character of input text, so its cost is exact. OpenAI doesn't report usage for `gpt-4o-mini-tts`, so the gateway estimates it from the text at about 1,250 audio tokens for each minute of speech, and the cost it logs for that model is an estimate. ## What every endpoint shares - The response headers `X-Dekka-Provider` and `X-Dekka-Model` say what answered. - Routing rules and the monthly spend cap apply, and a refusal has the same codes as chat, which [the order of checks](/docs/ai-routing#in-what-order-are-requests-checked) lists. - When a model fails with a server error, a rate limit or a timeout, the gateway tries the next model of the same kind in the project's fallback order. - The **Requests** page counts speech priced per character at about four characters a token. ## Without a provider key Outside production, a request whose provider has no key gets a simulated answer, marked with `"simulated": true` or the `X-Dekka-Simulated: true` header, so you can build before adding a key. Image generation returns a 1×1 PNG, transcription returns placeholder text, and speech returns half a second of silence as MP3, WAV or raw PCM, and as WAV for the other formats. Simulated requests cost nothing. In production a request with no key answers 503 `provider_unavailable`. ## Not supported yet Audio inside a chat message, image editing and variations, streamed speech, and transcription formats other than JSON and text. Google's Gemini models read images in chat, but Gemini image generation, speech and transcription aren't offered through the gateway yet. --- title: AI keys description: Use your own provider keys, create gateway keys for your code, choose a project per request, and connect a service to the AI Gateway on the canvas. section: AI order: 2 updated: 2026-11-23 --- The AI Gateway uses two kinds of key. Provider keys are your own keys from OpenAI, Anthropic, Google, DeepSeek, Moonshot AI or Z.ai, which the gateway uses to call the provider, and gateway keys are what your code sends to the gateway. Both live under **AI Gateway**, then **Keys**. ## Add your own OpenAI or Anthropic key Under **Provider keys**, choose **Add key** next to the provider, paste the key and choose **Save key**. OpenAI, DeepSeek and Moonshot AI keys start with `sk-`, Anthropic keys with `sk-ant-` and Google keys with `AIza`, while Z.ai keys have no fixed start. Because an Anthropic key also starts with `sk-`, Dekka refuses one saved for any other provider, and a key with the wrong prefix answers 422 `invalid_provider_key`. Only admins and owners can add or remove provider keys, and only while signed in to the dashboard, so an API key can't. Dekka encrypts the key and shows only its last four characters again. Each provider has one key at a time, so saving a new one replaces the old one straight away, and **Remove** stops Dekka using it. ## What if I don't add a key? The gateway calls each provider with your own key, so add one for every provider whose models you want to use. A request for a model whose provider has no key of yours answers 503 `provider_unavailable`, and the provider bills your account for the tokens your requests use. Dekka charges nothing for them. ## Create a gateway key Under **Gateway keys**, choose **Create gateway key**, give it a name such as `local-development`, choose the **Project** its requests belong to, or **Every project**, and choose **Create key**. Dekka shows the key, which starts with `dk_`, once and stores only a hash, so copy it before you close the dialog. A gateway key has the single scope `ai`, which reaches the gateway under `/v1/ai` and answers 404 on every other route, so it can't manage your organisation. Only admins and owners can create one, from the dashboard. It doesn't expire, so revoke it with **Revoke** next to it when you stop using it. The gateway answers 401 `invalid_api_key` for a key that is wrong, expired or revoked, and 403 `ai_scope_required` for an API key without the `ai` scope. ## Choose a project for each request A key tied to a project logs every request against that project and follows its [routing rules](/docs/ai-routing). A key for every project logs its requests without a project, with no routing rules or spend cap, unless the request names a project in the `X-Dekka-Project` header. The project ID is in the dashboard's address after `/projects/`. ```ts const client = new OpenAI({ baseURL: "https://api.dekka.cloud/v1/ai", apiKey: process.env.DEKKA_AI_KEY, defaultHeaders: { "X-Dekka-Project": process.env.DEKKA_PROJECT_ID }, }); ``` The project must belong to your organisation, and a key tied to one project can only name that project. Anything else answers 404 `project_not_found`. ## Connect a service on the canvas A service on Dekka can get its own gateway key without you creating one. On the project's canvas, choose **Add**, then **AI Gateway**, and choose **Add AI Gateway**. Then drag from the right edge of your service to the AI Gateway node. Dekka creates a gateway key for that connection, tied to the project, sets `DEKKA_AI_BASE_URL` and `DEKKA_AI_KEY` on the service and restarts it. The line turns solid once the restart succeeds, and a stopped service picks the variables up when it next starts. ```ts title="ai.ts" import OpenAI from "openai"; export const ai = new OpenAI({ baseURL: process.env.DEKKA_AI_BASE_URL, apiKey: process.env.DEKKA_AI_KEY, }); ``` These keys don't appear under **Gateway keys**. Removing the connection, the service or the environment revokes the key. --- title: Routing rules description: Choose which providers and models a project may use, the order to fall back in and a monthly spend cap, and see the order the gateway checks each request in. section: AI order: 3 updated: 2026-11-23 --- Routing rules belong to a project and apply to every gateway request logged against it, either from a key tied to the project or one that names it in `X-Dekka-Project` (see [AI keys](/docs/ai-keys#choose-a-project-for-each-request)). A project that has never saved rules may use every available model from every provider, with no fallback and no cap, and requests without a project follow no rules at all. ## Change a project's rules Open **AI Gateway**, then **Routing**, and pick the project. Tick the providers and models it may use, build its fallback order, set a cap if you want one and choose **Save changes**, which appears once something has changed. The rules apply from the next request. Anyone in the organisation can see them, and developers, admins and owners can change them, which the API does with `PUT /v1/projects/{project_id}/ai/policy`. ## Which providers and models may a project use? A project needs at least one provider. Leave every model unticked to allow all of them from the providers you chose, or tick the ones it may use. A request for any other model answers 403 `model_not_allowed`, so prompts never reach a provider you haven't approved. Saving checks that every model you name is in the catalogue, which otherwise answers 422 `unknown_model`, and comes from an allowed provider, which otherwise answers 422 `model_provider_not_allowed`. With models ticked, each model in the fallback order must be one of them, or saving answers 422 `fallback_model_not_allowed`. An AI Gateway node on the canvas can narrow this further for the services connected to it. Its `allowed_models`, which the API sets, is a list of catalogue IDs those services may use on top of the project's rules. ## How does fallback work? When the model you asked for fails before any of its reply has reached your code, the gateway tries the next model in the project's fallback order, which holds up to 10 models. It falls back when the provider answers with a 5xx or a 429, doesn't answer in time, drops the connection, or has no key the gateway can use. If the model you asked for is in the list, the gateway carries on with the models after it, and otherwise it starts from the top. It skips any model the rules don't allow or that is no longer available. Any other failure comes straight back, and so does a failure after a streamed reply has started. When every model fails, you get the last one's error. | Error | What happened | | --- | --- | | 503 `provider_unavailable` | Neither you nor Dekka has a key for the provider. Add one under [AI keys](/docs/ai-keys). | | 504 `upstream_timeout` | The provider didn't answer in time. | | 429 `provider_rate_limited` | The provider is rate-limiting the key. | | 502 `provider_auth_failed` | The provider turned the key down. Check the key you saved. | | 400 `provider_rejected_request` | The provider refused the request, and its message says why. | | 502 `upstream_error` | The provider failed in some other way. | `X-Dekka-Model` names the model that answered, and on the **Requests** page a request that fell back shows which model failed first. ## Set a monthly spend cap The cap is in US dollars at the providers' list prices, for each calendar month in UTC. Before each request the gateway compares what the project has spent this month with the cap, and once spending reaches it, the gateway answers 429 `spend_cap_reached` until the month ends. The error's `details` hold the `cap_usd` and the `spent_usd`. The **Routing** page shows what the project has spent so far this month. Because the check happens before each request, the request that crosses the cap still finishes, so spending can end slightly above it. The cap is an estimate of the provider's bill at list price. ## In what order are requests checked? Once the key and any `X-Dekka-Project` header are accepted, the gateway checks each request in this order and stops at the first refusal. 1. The key's rate limit of 600 requests a minute, which answers 429 `rate_limited` with a `Retry-After` header. 2. That the model exists and is available, or 404 `model_not_found`. 3. That the project's rules and any AI Gateway node allow the model, or 403 `model_not_allowed`. 4. The project's monthly cap, or 429 `spend_cap_reached`. 5. The project's [privacy policy](/docs/ai-veil), when Veil is on, which answers 422 `blocked_by_privacy_policy` for a prompt the policy blocks, or 503 `privacy_scan_unavailable` when Veil can't scan and the project refuses unscanned requests. Only then does the gateway call a provider. Requests refused from step 2 on appear on the **Requests** page as **Refused**, with their error code. --- title: Privacy with Veil description: Turn on Veil for a project so the AI Gateway finds personal details in prompts and masks, redacts, tokenises or blocks them before they leave for a provider. section: AI order: 3.5 updated: 2026-11-23 --- Veil is Dekka's engine for finding personal information in text. When a project turns it on, the AI Gateway sends the text of every request to Veil before any provider sees it, and applies the project's policy to what Veil finds. A Ghana Card PIN can be refused outright, a phone number masked to `024 *** 4567`, and an email address replaced with a placeholder that's put back in the model's reply. The provider receives only what the policy allows. > [!NOTE] > Veil runs in the gateway for every project that turns it on. Its rules find structured details, such as Ghana Card PINs, phone and mobile money numbers, digital addresses, taxpayer numbers, email and IP addresses, payment cards and credentials, and its model finds names, addresses written as directions and institutions' own ID numbers, such as patient and student IDs. It doesn't read images or audio. No detector finds everything, so treat Veil as a layer that reduces what leaves, alongside choosing which providers a project may use. ## Turn it on Open **AI Gateway**, then **Routing**, choose the project, and find **Personal data in prompts** below **Where requests can go**. Choose a mode and save. | Mode | What happens | | --- | --- | | Off | Prompts reach the provider as your app sends them. This is the default. | | Detect | Veil reports what it finds in the request log and the text goes unchanged. Use it to see what your prompts contain before you change anything. | | Protect | Veil applies the policy before the text leaves. A request the policy blocks never reaches a provider. | Veil scans every message in a request, including your system prompt and earlier replies, because a previous reply can contain values Veil restored. **Try it on sample text** runs sample text through your settings, saved or not, and shows what the provider would receive. Nothing you try is stored. ## Choose a policy The built-in `default-protection` policy blocks credentials and Ghana Card PINs, masks phone numbers and redacts every other detail Veil finds as a typed placeholder such as `[EMAIL_ADDRESS]`. For anything else, write a custom policy in YAML. Each rule matches entity types or categories and chooses an action, and the default action covers everything no rule matches. The name and revision are recorded with every request, so you can tell which version of a policy handled it. ```yaml title="policy.yaml" version: 1 name: support-desk revision: "1" default_action: redact rules: - match: { entity_types: [GH_GHANA_CARD_PIN] } action: block - match: { entity_types: [GH_MOBILE_NUMBER] } action: mask - match: { entity_types: [EMAIL_ADDRESS] } action: tokenize - match: { categories: [CREDENTIAL] } action: block ``` A block always wins over any other rule. Veil checks a custom policy when you save it, and any error appears under the editor with its path, such as `rules.0.action`. ## What each action does Each action below is shown on the same prompt. It holds a Ghana Card PIN, an email address, a digital address and two phone numbers, one of which appears twice. ```text title="What your app sends" The customer holds Ghana Card GHA-723451904-3. Call 024 123 4567 or write to ama@example.com. Deliver to GA-183-8164. If nobody is in, call 024 123 4567 again, then 020 555 0187. ``` A policy usually gives each kind of detail its own action, as the one above does. Here a single action is applied to everything, so you can see what it does to each kind and choose by how much the model needs to know. ### Detect and allow `detect` leaves the text alone and records what Veil found in the request log, so the provider receives the prompt exactly as your app sent it. Use it to see what your prompts contain before you change anything. `allow` does the same and says that leaving this kind of detail in place is a decision you made. ### Mask `mask` keeps part of each value readable and hides the rest. How much stays depends on the kind of detail: a phone number keeps its network code and last four digits, an email address keeps its first letter and its domain, and a digital address keeps only its last two digits. The model can still tell that the first and third phone numbers are probably the same one, and a person reading the reply can recognise their own details, but nobody can use them from what the provider holds. ```text title="With mask, the provider receives" The customer holds Ghana Card GHA-********4-3. Call 024 *** 4567 or write to a***@example.com. Deliver to **-***-**64. If nobody is in, call 024 *** 4567 again, then 020 *** 0187. ``` ### Redact `redact` replaces each value with the kind of detail it was. The model knows that a card number, a phone number, an email address and a digital address were there and nothing more, so it can't tell one phone number from the other. Use it when the task doesn't depend on which value is which, such as summarising a conversation or sorting a support ticket. ```text title="With redact, the provider receives" The customer holds Ghana Card [GH_GHANA_CARD_PIN]. Call [GH_MOBILE_NUMBER] or write to [EMAIL_ADDRESS]. Deliver to [GH_DIGITAL_ADDRESS]. If nobody is in, call [GH_MOBILE_NUMBER] again, then [GH_MOBILE_NUMBER]. ``` ### Tokenize `tokenize` gives each different value its own numbered placeholder, counted separately for each kind of detail, and the same value gets the same number within a request. Below, the phone number that appears twice is `[GH_MOBILE_NUMBER_1]` both times and the other is `[GH_MOBILE_NUMBER_2]`, so the model can follow which is which and refer to them in its reply without ever seeing them. ```text title="With tokenize, the provider receives" The customer holds Ghana Card [GH_GHANA_CARD_PIN_1]. Call [GH_MOBILE_NUMBER_1] or write to [EMAIL_ADDRESS_1]. Deliver to [GH_DIGITAL_ADDRESS_1]. If nobody is in, call [GH_MOBILE_NUMBER_1] again, then [GH_MOBILE_NUMBER_2]. ``` With [Restore tokenised values in replies](#restoring-tokenised-values) on, your app gets the real values back in the reply. Use `tokenize` when the reply has to contain them, such as a drafted message that tells a customer which number to call. ### Block `block` refuses the whole request with `blocked_by_privacy_policy`, and the provider receives nothing. Use it for details that should never reach a provider in any form, such as Ghana Card PINs and credentials. ## Stricter rules for some providers A provider can have its own policy and its own choice of what happens when Veil can't scan. Use it to block more before prompts reach a provider outside Ghana, for example, while keeping a lighter policy for others. When a request falls back to another provider, the gateway applies that provider's policy, and reuses the first scan when the policies are the same. ## When Veil can't scan If Veil is unreachable or doesn't answer within two seconds, the project's enforcement decides: - **Refuse it** answers 503 `privacy_scan_unavailable`, and nothing reaches a provider. This is the default. - **Send it with a warning** sends the request as your app wrote it and adds `X-Dekka-Veil-Warning: scan_unavailable` to the response. Detect mode doesn't refuse a request when Veil can't scan, since it only reports. It does refuse images, and audio sent for transcription, with 422 `privacy_media_blocked` while the media rule blocks them, which it does by default. ## Restoring tokenised values With **Restore tokenised values in replies** on, placeholders the policy creates are put back in the model's reply, so your app sees `ama@example.com` where the model wrote `[EMAIL_ADDRESS_1]`. The mapping between placeholders and values exists in memory for that one request and is never logged or stored. Streamed replies are restored as they arrive. The gateway holds back at most one placeholder's length of text, so a placeholder split across two chunks is still replaced. ## Scanning replies With **Scan replies too** on, Veil also scans each reply and the request log records how many personal details it found. A non-streamed reply's count is in the `X-Dekka-Veil-Response-Findings` header. A streamed reply is scanned after it finishes, so the count appears only in the log, and the reply itself is never changed. ## Images and audio Veil reads text only, so a project that uses Veil refuses images in chat and audio for transcription with 422 `privacy_media_blocked`, unless you choose **Allow with a warning**. Allowed requests carry `X-Dekka-Veil-Warning: media_not_scanned`. Image prompts and text to speak are scanned like any other text, and transcripts can be scanned as replies. ## Headers | Header | What it says | | --- | --- | | `X-Dekka-Veil` | `protected`, `detected` or `off` | | `X-Dekka-Veil-Findings` | How many personal details Veil found in the request | | `X-Dekka-Veil-Response-Findings` | How many it found in the reply, when replies are scanned | | `X-Dekka-Veil-Warning` | `scan_unavailable` or `media_not_scanned` | ## What a refusal looks like ```json { "error": { "code": "blocked_by_privacy_policy", "message": "This project's privacy policy blocks the request, because it contains details the policy doesn't allow to leave.", "details": { "policy": "default-protection@2026-11-04", "by_entity": { "GH_GHANA_CARD_PIN": 1 }, "by_action": { "block": 1 } } } } ``` A refusal names the kinds of detail and how many, never the values. ## What the request log keeps Each request on the **Requests** page shows whether Veil protected, detected or blocked it, and which kinds of detail it found. The log keeps the mode, the policy and its revision, counts by entity type and by action, and how long the scan took. It never keeps the prompt, the reply, the values Veil found or the restore map. ## With the API The settings are part of a project's routing rules, and have their own endpoints too. ```bash tab="cURL" curl -X PUT https://api.dekka.cloud/v1/projects/$PROJECT_ID/ai/privacy \ -H "Authorization: Bearer $DEKKA_API_KEY" \ -H "Content-Type: application/json" \ -d '{"mode": "protect", "preset": "default-protection", "enforcement": "closed", "restore_in_responses": true}' ``` `POST /v1/projects/{id}/ai/privacy/preview` with `{"text": "…", "provider": "openai"}` returns what the provider would receive, with the findings, and stores nothing. --- title: Models and usage description: See which models the AI Gateway offers, what each one does and its list prices, what Not available means, and follow each request and your spend over time. section: AI order: 4 updated: 2026-12-02 --- Every gateway request names a model by its catalogue ID, which is the provider followed by the model, such as `openai/gpt-6-luna`, `anthropic/claude-sonnet-5-5`, `google/gemini-3.8-flash`, `deepseek/deepseek-flash`, `moonshot/kimi-k3.1-pro` or `zai/glm-5.3`. The catalogue lists each model with what it does, its context window where it has one, and the provider's list prices. Your organisation's own [private inference endpoints](/docs/gpu-instances) aren't in the catalogue and are named `private/` instead. ## Where do I see the models and their prices? Open **AI Gateway**, then **Models**, and filter by kind if you like. Each provider's models are listed with their ID, what they do, their context window and the list price in US dollars per million input and output units, which the next section explains. The same catalogue is public at `GET /v1/catalog/ai-models`, which also gives each model's `processing_region` and any `notes`, such as a date the provider retires it. ```bash curl https://api.dekka.cloud/v1/catalog/ai-models | jq '.[] | {id, kind, input_modalities, pricing_unit, input_price_per_mtok, output_price_per_mtok, available}' ``` The prices are the providers' own, and Dekka uses them to work out each request's cost, the [monthly spend cap](/docs/ai-routing#set-a-monthly-spend-cap) and the spend in your metrics, so treat those figures as an estimate of the provider's bill. Dekka charges nothing for tokens. ## What can each model do? Every model has a `kind`, which decides the endpoint that serves it, and `input_modalities` and `output_modalities`, which say what it takes in and gives back. | `kind` | Endpoint | Takes | Gives back | What the two prices count | | --- | --- | --- | --- | --- | | `chat` | `/v1/ai/chat/completions` | Text, and images where `input_modalities` includes `image` | Text | Input and output tokens, with images counted as input tokens | | `image` | `/v1/ai/images/generations` | Text | Images | The prompt's text tokens, and the image tokens the provider reports | | `transcription` | `/v1/ai/audio/transcriptions` | Audio | Text | Audio tokens in, and the transcript's text tokens out | | `speech` | `/v1/ai/audio/speech` | Text | Audio | Text tokens in and audio tokens out, or characters of input text where `pricing_unit` is `characters` | A model sent to the wrong endpoint, or an image sent to a chat model whose `input_modalities` lacks `image`, answers 422 `modality_not_supported`. A chat model is listed as taking images only where its provider documents image input for it, so the DeepSeek, Kimi and GLM models are text only for now. [Images and voice](/docs/ai-images-and-voice) shows each endpoint. ## Which providers are there? | Provider | Models | Where it processes requests | | --- | --- | --- | | OpenAI | GPT-4.1, GPT-4.1 mini, GPT-4.1 nano, GPT-4o mini, GPT Image 2, GPT Image 1 mini, GPT-4o Transcribe, GPT-4o mini Transcribe, GPT-4o mini TTS, TTS-1 | United States | | Anthropic | Claude Opus 5.5, Sonnet 5.5, Haiku 5.5, Haiku 4.5, Sonnet 4.5 | United States | | Google | Gemini 4 Argon, Gemini 3.8 Flash, Gemini 3.5 Flash-Lite | Not published | | DeepSeek | DeepSeek V4 Pro, DeepSeek Flash | China | | Moonshot AI | Kimi K3.1 Pro | Not published | | Z.ai | GLM-5.3, GLM-5.3 Flash | Not published, operated from Singapore | DeepSeek halves its prices outside its peak hours, and the gateway always works out cost at the peak rate. You can add your own key for any of these providers under **AI Gateway**, then **Keys**. ## What does "Not available" mean? The provider has retired the model, or Dekka has stopped offering it. It stays in the catalogue so older requests keep their model's name, but a request for it answers 404 `model_not_found`, the **Routing** page no longer offers it, and fallback skips it. ## See each request **AI Gateway**, then **Requests**, lists every request, newest first, and you can filter it by project, model and outcome. Each row shows when it was made, the model that answered, the project, input and output usage, latency, the cost at list price and the outcome. A request that fell back shows which model failed first, and one that didn't succeed shows its error code. | Outcome | `status` | Meaning | | --- | --- | --- | | Succeeded | `succeeded` | A model answered | | Failed | `failed` | Every model the gateway tried failed, or the stream broke off | | Refused | `rejected` | A rule refused it before any provider was called, as [the order of checks](/docs/ai-routing#in-what-order-are-requests-checked) describes | The API lists the same requests with `GET /v1/orgs/{org_id}/ai/requests`, which takes `project_id`, `model`, `status`, a `cursor` and a `limit` of up to 200. ## Follow usage over time The top of **Requests** shows requests, input and output tokens, spend at list price and errors over the last 7, 14 or 30 days, by day and by model. `GET /v1/orgs/{org_id}/ai/metrics` returns the same figures for any range of up to 366 days, with `start` and `end` as UTC dates, `end` included, and the last 14 days when you send neither. Anyone in the organisation can see requests and metrics. ## Are prompts and replies stored? No. Dekka records each request's kind, model, token counts, timing, cost and outcome, and never stores the prompt, the reply, or any image or audio. They pass through the gateway to the model's provider, which processes them outside Ghana, in the region the catalogue's `processing_region` names. --- title: Connect an agent description: Let Claude, Cursor, VS Code or any MCP client deploy and look after your Dekka projects through the Dekka MCP server. section: Agents order: 1 updated: 2026-11-07 --- Dekka runs a remote [Model Context Protocol](https://modelcontextprotocol.io) server, so an AI agent can work with your account the way you would in the dashboard. It can create projects, deploy a repository, add a database and connect it, read build logs when a deploy fails, set variables, apply templates, and create a virtual server and tell you how to reach it over SSH. The agent signs in with an API key you create, sees only what that key allows, and every change it makes is recorded in your organisation's activity log as coming from an agent. The server lives at one address for every client. ```text https://mcp.dekka.cloud/mcp ``` It speaks Streamable HTTP and keeps no sessions, so each request carries its own key. ## Quick start The fastest way is the **Agents** tab in your organisation's settings. Choose what the agent may do and which projects it reaches, and Dekka creates the key and shows the setup for your client with the key already filled in. There's a **Test connection** button to check it before you leave the page. To do it by hand, [create an API key](/docs/api-keys) and add the server to your client. In Claude Code that's one command. ```bash claude mcp add --transport http dekka https://mcp.dekka.cloud/mcp \ --header "Authorization: Bearer $DEKKA_API_KEY" ``` Then ask for something real, such as "deploy acme/storefront to a new Dekka project and tell me its URL" or "why did the last deploy of the api service fail?" Setup for Claude Desktop, Cursor, VS Code, Codex and Windsurf is in [MCP clients](/docs/mcp-clients). ## What the agent can do The tools cover the work people do most often, grouped like the dashboard. | Area | What the agent can do | | --- | --- | | Account | Find out who it's acting for, the plan and what's been used | | Projects | List, read and create projects and their environments | | Services | Create a service from GitHub or an image, change settings, restart, stop and delete | | Deploys | Deploy, list deployments, read or follow build logs with errors marked, and roll back | | Previews | List a project's pull request previews, read one and delete it | | Data | Add PostgreSQL, Redis, a bucket or a queue, connect services and read connection strings | | Variables | List variables with secrets hidden, set them and delete them | | Templates | Find a template, plan it with its inputs, plan a dekka.yaml or a Docker Compose file | | Changes | See pending changes, apply them and discard them | | Domains | Add a custom domain and verify its DNS records | | Observe | Search logs, read or follow runtime logs, read metrics and follow long operations | | Docs | Search and read these docs to answer how-to questions | An agent can't hold a log stream open, so `get_runtime_logs` and `get_deploy_logs` return a `cursor` with their lines. Calling again with that cursor returns only the lines written since and a new cursor, which is how an agent watches a build finish or a service start after a deploy. `list_previews` and `get_preview` show a project's [pull request previews](/docs/projects#preview-a-pull-request) with their status and URL, and `delete_preview` closes one and deletes its environment, as closing the pull request would. Every tool and its arguments are listed in [MCP tools](/docs/mcp-tools). The server also offers each docs page as a resource at `dekka://docs/`, and three ready-made prompts for deploying a repository, adding a database and finding out why a deploy failed. ## How changes happen Most actions take effect straight away, just as they do in the dashboard. Creating a service starts its first deployment, and adding a database creates it. Templates, blueprints and Docker Compose files are planned first. The plan comes back as a list of changes for the agent to show you, and nothing changes until it calls `apply_changes` with `confirm: true`. Deleting a service, a variable or a preview and rolling back work the same way, returning a preview of what would happen until they're confirmed with the token that preview returned. Good clients ask you before confirming, and you can tell an agent to always ask. ## Keep it safe Start with a read-only key, and give a key write or full access only when you want the agent to make changes. A [project token](/docs/project-tokens) limits an agent to one project, and adding `?read_only=true` to the server address hides every tool that changes something, whatever the key allows. [MCP security](/docs/mcp-security) explains scopes, confirmation and how to guard against prompt injection. ## Limits Each key can make 240 tool calls a minute, on top of the API's usual [limits](/docs/limits). Agents act through the same API as everything else, so plan limits, roles and validation all apply to them in the same way. --- title: MCP clients description: Set up the Dekka MCP server in Claude Code, Claude Desktop, Cursor, VS Code, Codex, Windsurf and other MCP clients. section: Agents order: 2 updated: 2026-11-23 --- Every client needs the same two things, which are the server address `https://mcp.dekka.cloud/mcp` and an `Authorization` header carrying a Dekka API key. The **Agents** tab in your organisation's settings creates a key and shows the snippet for Claude Code, Claude Desktop, Cursor, VS Code or Codex with it filled in. The examples here read the key from `DEKKA_API_KEY` so it stays out of files you might commit. ## Claude Code Add the server from a terminal. Use `--scope user` to make it available in every project, or leave it out to add it to the current one only. ```bash claude mcp add --transport http dekka https://mcp.dekka.cloud/mcp \ --header "Authorization: Bearer $DEKKA_API_KEY" ``` Run `/mcp` inside Claude Code to see the server's status and its tools. ## Claude Desktop Claude Desktop starts local servers from its config file, so it reaches a remote server through `mcp-remote`, which needs Node.js. Open **Settings → Developer → Edit Config** and add the server to `claude_desktop_config.json`, then restart Claude Desktop. ```json title="claude_desktop_config.json" { "mcpServers": { "dekka": { "command": "npx", "args": ["-y", "mcp-remote", "https://mcp.dekka.cloud/mcp", "--header", "Authorization:${DEKKA_AUTH}"], "env": { "DEKKA_AUTH": "Bearer dk_your_key" } } } } ``` The header is written without a space after the colon and filled from `env`, which avoids a quoting problem with arguments on Windows. ## Cursor Add the server to `~/.cursor/mcp.json` for every project, or to `.cursor/mcp.json` in one repository. ```json title="~/.cursor/mcp.json" { "mcpServers": { "dekka": { "url": "https://mcp.dekka.cloud/mcp", "headers": { "Authorization": "Bearer ${env:DEKKA_API_KEY}" } } } } ``` ## VS Code Add the server to `.vscode/mcp.json`. VS Code asks for the key the first time the server starts and keeps it in its secret storage, so the file is safe to commit. ```json title=".vscode/mcp.json" { "inputs": [{ "type": "promptString", "id": "dekka-key", "description": "Dekka API key", "password": true }], "servers": { "dekka": { "type": "http", "url": "https://mcp.dekka.cloud/mcp", "headers": { "Authorization": "Bearer ${input:dekka-key}" } } } } ``` The tools appear in Copilot Chat's agent mode. ## Codex Add the server to `~/.codex/config.toml` and export the key in your shell. Codex sends it as a bearer token. ```toml title="~/.codex/config.toml" [mcp_servers.dekka] url = "https://mcp.dekka.cloud/mcp" bearer_token_env_var = "DEKKA_API_KEY" ``` ## Windsurf Add the server to `~/.codeium/windsurf/mcp_config.json`. ```json title="mcp_config.json" { "mcpServers": { "dekka": { "serverUrl": "https://mcp.dekka.cloud/mcp", "headers": { "Authorization": "Bearer ${env:DEKKA_API_KEY}" } } } } ``` ## Other clients Any client that supports remote servers over Streamable HTTP and lets you set a header will work. Where a client only starts local servers, run it through `mcp-remote` as in the Claude Desktop example. To see the tools and try them by hand, use the MCP Inspector. ```bash npx @modelcontextprotocol/inspector ``` Choose **Streamable HTTP**, enter the server address, and add the `Authorization` header with your key. ## Read-only sessions Add `?read_only=true` to the address to hide every tool that changes something, whatever the key allows. It's a quick way to let an agent investigate a problem without the chance of it fixing the wrong thing. ```text https://mcp.dekka.cloud/mcp?read_only=true ``` ## When it doesn't connect A `401` means the key is missing, mistyped, revoked or expired, or it's an AI Gateway key, which reaches only the gateway. Create a new one in the **Agents** tab and check the header reads `Authorization: Bearer dk_...` with a single space after `Bearer`. If the server connects but a tool you expected is missing, the key's scopes don't include it. A read key sees only the tools that look at things, a write key adds the ones that change things, and deleting needs full access. [MCP security](/docs/mcp-security) has the full list. --- title: MCP tools description: Every tool the Dekka MCP server offers, the scope each one needs, and its arguments. section: Agents order: 3 updated: 2026-11-24 --- A key sees the tools its scopes allow. **Read** tools look at things and change nothing, **write** tools create and change things, and **admin** tools delete things or reveal credentials. A key with write also sees the read tools, and a key with admin sees them all. Ids come from earlier calls, so an agent usually starts with `whoami`, then `list_projects` and `get_project`. ## Account and projects | Tool | Scope | Arguments | What it does | | --- | --- | --- | --- | | `whoami` | read | | The person the key acts for, the organisation, the key's scopes, and the plan's limits and usage | | `list_projects` | read | | Every project with its environments and service count | | `get_project` | read | `project_id` | Environments, services and databases with status and URLs, and the connections between them | | `create_project` | write | `name`, `description`, `region_id` | A new project with a production environment | ## Services | Tool | Scope | Arguments | What it does | | --- | --- | --- | --- | | `list_services` | read | `project_id`, `environment_id` | Services and databases with status, URL and source | | `get_service` | read | `service_id` | Status, URL, every setting and the three latest deployments | | `create_service` | write | `project_id`, `name`, `repo` or `image`, `branch`, `root_dir`, `kind`, `port`, `start_command`, `cron_schedule`, `environment_id` | A service from a GitHub repository or a Docker image, deployed straight away | | `update_service` | write | `service_id`, `settings`, `name` | Merges the settings given into the current ones; they apply on the next deploy | | `restart_service` | write | `service_id`, `action` | Restarts, stops or starts a service | | `delete_service` | admin | `service_id`, `confirm`, `confirm_token` | Deletes a service or database with everything in it | `kind` is `application` for a service that answers HTTP on a port, `worker` for one that runs in the background, or `scheduled_job` for one that runs on `cron_schedule`, a five-field cron in UTC. `settings` uses the groups `get_service` shows, so `{"runtime": {"memory_mib": 512}}` changes the memory and leaves everything else alone. ## Deploys | Tool | Scope | Arguments | What it does | | --- | --- | --- | --- | | `deploy` | write | `service_id`, `branch`, `commit_sha` | Builds the branch head or the given commit, or pulls an image again | | `list_deployments` | read | `service_id` or `project_id`, `limit` | Recent deployments, newest first | | `get_deployment` | read | `deployment_id` | Status, commit, image, timings, error and the settings it deployed | | `get_deploy_logs` | read | `deployment_id`, `tail`, `errors_only`, `cursor` | The build and deploy log, with lines that look like errors marked, and a cursor to follow it | | `rollback` | write | `deployment_id`, `keep_current_variables`, `confirm`, `confirm_token` | Redeploys an earlier deployment's image with its settings and variables, or with the current variables | ## Previews | Tool | Scope | Arguments | What it does | | --- | --- | --- | --- | | `list_previews` | read | `project_id`, `include_closed` | A project's pull request previews, newest first, with status and URL | | `get_preview` | read | `preview_id` | One preview's status, URL, branch, commit, environment and error | | `delete_preview` | write | `preview_id`, `confirm`, `confirm_token` | Closes a preview and deletes its environment with the services and databases in it | A later push to the pull request opens a new preview, so deleting one doesn't stop previews for that pull request. ## Data and variables | Tool | Scope | Arguments | What it does | | --- | --- | --- | --- | | `add_database` | write | `project_id`, `kind`, `name`, `connect_to`, `environment_id` | PostgreSQL, Redis, a bucket or a queue, optionally connected to services | | `connect_services` | write | `service_id`, `database_id` | Connects a service, which gets variables such as `DATABASE_URL`. A running service restarts to pick them up, and one that hasn't deployed gets them on its first deploy | | `disconnect_services` | write | `service_id`, `database_id`, `confirm`, `confirm_token` | Removes a connection, revoking the service's credentials and variables, and restarts a running service without them. The database isn't touched | | `rotate_credentials` | write | `database_id`, `confirm`, `confirm_token` | Gives every connected service new credentials, revokes the old ones and restarts those services | | `get_connection_strings` | admin | `database_id`, `reveal` | Each connected service's URL, masked unless `reveal` is true | | `list_variables` | read | `service_id` or `environment_id` | Variables with secret values hidden | | `set_variables` | write | `variables`, `service_id` or `environment_id`, `secret` | Creates or updates variables and leaves the rest alone | | `delete_variable` | admin | `key`, `service_id` or `environment_id`, `confirm`, `confirm_token` | Deletes one variable | Values passed to `set_variables` can use [references](/docs/environment-variables), such as `${{api.DEKKA_PRIVATE_DOMAIN}}` or `${{shared.STRIPE_KEY}}`. Each reveal of a connection string is recorded in the activity log. ## Templates and changes | Tool | Scope | Arguments | What it does | | --- | --- | --- | --- | | `list_templates` | read | `category` | Templates with what each creates and the inputs it needs | | `get_template` | read | `template_id`, `include_yaml` | One template's services, volumes, inputs and generated secrets | | `plan_template` | write | `environment_id`, `template_id`, `inputs` | Plans a template and returns the changes | | `plan_blueprint` | write | `environment_id`, `content`, `inputs`, `prune` | Plans a [dekka.yaml](/docs/config-as-code), with every validation error and its path | | `plan_compose` | write | `environment_id`, `content`, `inputs`, `repository`, `branch`, `path` | Translates a [Docker Compose file](/docs/docker-compose), passed as `content` or read from a connected `repository` at `path`, and plans it with a report of what was adjusted | | `plan_config_services` | write | `service_id` | Plans the databases, caches, buckets and queues a service's `dekka.toml` declares under `[services.]`, read at its latest deployed commit | | `get_pending_changes` | read | `environment_id` | Changesets waiting to be applied | | `apply_changes` | write | `changeset_id`, `confirm`, `confirm_token` | Applies every change in a changeset | | `discard_changes` | write | `changeset_id` | Throws a changeset away | Plans change nothing. `apply_changes` without `confirm` returns the same list of changes, which is what an agent should show you before confirming. ## Domains | Tool | Scope | Arguments | What it does | | --- | --- | --- | --- | | `add_domain` | write | `service_id`, `hostname` | Adds a custom domain and returns the DNS records to create: a TXT record, and a CNAME or an A record | | `verify_domain` | write | `domain_id` | Checks the records, and the domain goes active once the TXT record matches | ## Virtual servers | Tool | Scope | Arguments | What it does | | --- | --- | --- | --- | | `server_catalog` | read | | The sizes and images a new server can use, with monthly prices and which sizes have room now | | `list_ssh_keys` | read | | The organisation's SSH public keys | | `add_ssh_key` | write | `name`, `public_key` | Adds an SSH public key for new servers to install for root | | `list_servers` | read | `project_id`, `environment_id` | A project's servers with state, size and addresses | | `get_server` | read | `server_id` | A server's state, size, addresses and the SSH command that reaches it once it's running | | `wait_for_server` | read | `server_id`, `timeout_seconds` | Waits until a server finishes booting or whatever else it's doing, then returns it with its SSH command | | `create_server` | write | `project_id`, `name`, `size_id`, `image_id`, `ssh_key_ids`, `hostname`, `user_data`, `environment_id` | A Linux server with root over SSH, billed by the hour while it exists | | `server_action` | write | `server_id`, `action` | Starts, stops or reboots a server | | `resize_server` | write | `server_id`, `size_id` | Moves a stopped server to a size with at least as much disk | | `rebuild_server` | admin | `server_id`, `image_id`, `confirm`, `confirm_token` | Reinstalls a server from an image, wiping its disk | | `delete_server` | admin | `server_id`, `confirm`, `confirm_token` | Deletes a server with its disk and snapshots | | `list_snapshots` | read | `server_id` | A server's disk snapshots and its nightly schedule | | `create_snapshot` | write | `server_id`, `name` | Takes a snapshot of a server's disk | | `restore_snapshot` | write | `server_id`, `snapshot_id`, `confirm`, `confirm_token` | Puts a stopped server's disk back to a snapshot, losing what was written since | An agent creates a server by choosing a size and image from `server_catalog`, a key from `list_ssh_keys` or one the person gives it through `add_ssh_key`, then calling `create_server` and `wait_for_server`, which returns the SSH command to hand the person. ## Logs, metrics and operations | Tool | Scope | Arguments | What it does | | --- | --- | --- | --- | | `search_logs` | read | `project_id`, `query`, `service_id`, `stream`, `since_minutes`, `limit` | Searches build, deploy and runtime logs across a project | | `get_runtime_logs` | read | `service_id`, `tail`, `cursor` | The latest lines a running service wrote, and a cursor to follow it | | `get_metrics` | read | `service_id`, `window` | CPU, memory, network, disk, requests and p95 latency as latest, average and peak | | `get_operation` | read | `operation_id` | The state and progress of a long-running operation | Both log tools return a `cursor`. Passing it back returns only the lines written since, oldest first, with a new cursor, and `more` is true when lines are already waiting. A deploy log is finished once `finished` is true. ## Docs | Tool | Scope | Arguments | What it does | | --- | --- | --- | --- | | `search_docs` | read | `query` | Finds docs pages about a topic | | `read_doc` | read | `slug` | One docs page as Markdown | ## Resources and prompts Each docs page is also a resource at `dekka://docs/`, such as `dekka://docs/connections`. The server offers three prompts, which clients usually show as slash commands. | Prompt | Arguments | What it asks the agent to do | | --- | --- | --- | | `deploy_repo` | `repo`, `project` | Deploy a GitHub repository, follow the build and report the URL | | `add_database` | `service`, `kind` | Add a database to a service's project, connect it and redeploy | | `debug_deploy` | `service` | Find out why the latest deployment failed and suggest a fix without changing anything | ## Errors When the API refuses something, the tool returns its message with the status and code, such as `The Trial plan includes 1 project. (403 entitlement_exceeded)`. A 404 can mean the thing doesn't exist or that the key can't reach it, since a [project token](/docs/project-tokens) sees only its own project. --- title: MCP security description: How keys, scopes, project tokens, confirmation and the activity log keep an agent within the limits you set. section: Agents order: 4 updated: 2026-11-27 --- An agent connected to Dekka acts as the person who created its key, within that key's scopes and that person's role. It goes through the same API, permission checks, plan limits and validation as the dashboard, so it can never do more than the key's owner could. ## Choose the scope | Scope | Tools the agent sees | Use it when | | --- | --- | --- | | read | Projects, services, deployments, logs, metrics, variables with secrets hidden, templates and docs | You want answers and investigation, with no chance of a change | | write | Everything in read, plus creating services, deploying, setting variables, restarting, adding databases and domains, planning and applying templates, and deleting pull request previews | You want the agent to build and ship | | admin | Everything, including deleting services and variables and revealing connection strings | You need the agent to clean up or hand out credentials | A key's scope is a ceiling on its owner's role. A developer's admin key still can't do what only an owner can. Tools a key can't use don't appear in its list at all, and calling one by name fails as if it didn't exist. ## Limit it to one project A [project token](/docs/project-tokens) reaches one project and nothing else in the organisation. It can hold read or write but never admin, so it can't delete services. Choose a project in the **Agents** tab, or create a token in the project's settings, when an agent works on a single app. ## Read-only sessions Adding `?read_only=true` to the server address hides every write and admin tool for that connection, whatever the key allows. Use it when you want an agent to look into a problem without fixing anything yet. ## Confirmation Tools that can't be undone, which are `delete_service`, `delete_variable`, `delete_preview`, `rollback`, `apply_changes`, `disconnect_services` and `rotate_credentials`, return a preview with a `confirm_token` unless they're called with `confirm: true` and that token. The token is signed by Dekka, lasts ten minutes, works once, and approves only the action its preview described, for the same key, target and details, so a preview of one delete can't confirm another and a plan that changed after its preview isn't applied. Plans for templates, blueprints and Compose files change nothing until they're applied. Most clients ask before running a tool, and you can tell an agent to always show you the preview and wait for a yes. ## Secrets Secret and sealed variables are never returned. `list_variables` shows `(secret)` or `(sealed)` in their place, and planned changes never contain values. Generated secrets in templates are created on Dekka and are never sent to the agent. The only way to read a credential is `get_connection_strings` with `reveal`, which needs admin and is recorded in the activity log each time. ## Prompt injection An agent reads text it doesn't control, such as build logs, commit messages, README files and web pages, and that text can contain instructions meant to steer it. Dekka's tools name the fields that hold such text in `outside_text`, and the server tells the agent to read them as data and never as instructions. No agent follows that every time, so treat the agent's key as the limit of what such text could make it do. - Give the agent the narrowest key that does the job, and prefer read-only while it investigates. - Use a project token so a mistake can't reach other projects. - Read previews before you confirm deletes, rollbacks and applied plans. - Don't connect a write key in the same session as tools that browse untrusted sites, unless you review each call. ## Audit Every change an agent makes is recorded in the organisation's activity log with the key that made it and a note that it came from the MCP server. The key's **last used** time in **Settings → API keys** shows when it was last active. ## Revoke a key Revoke a key under **Settings → API keys**, or a project token in the project's settings. The next request from the agent is refused straight away. Keys you create in the **Agents** tab expire after 90 days unless you choose otherwise. ## Rate limits Each key can make 240 tool calls a minute. An agent that goes over gets a message saying how long to wait, and the API's own [limits](/docs/limits) apply to the calls behind each tool as well. --- title: Read and search Dekka from an agent description: How an AI agent finds what it needs on dekka.cloud, with a search endpoint, every docs page as Markdown and a map of the whole site. section: Agents order: 5 updated: 2026-11-30 --- An agent that needs to know how something on Dekka works can search the documentation, the API reference, the products and the research in one request, without crawling the site page by page. It can also read any docs page as Markdown and start from a map of the whole site. None of this needs an account or a key. To let an agent work on your projects, [connect it over MCP](/docs/mcp). ## Search Send the words to look for in `q`, as keywords or as a question. ```bash curl --get "https://dekka.cloud/.well-known/search" --data-urlencode "q=How do I turn on lockdown mode?" ``` The answer is Markdown. It holds up to eight passages with the best match first, and each has the address it came from and a score against the best match. ```markdown # Search results for: "How do I turn on lockdown mode?" ## Lockdown mode › Turn it on (score: 1.000) Source: https://docs.dekka.cloud/lockdown-mode#turn-it-on Choose **Lockdown** in the top bar of the dashboard. Inside a project you can lock down that project or every project in your organisation... ``` The passages are what Dekka's own pages say, so an agent reasons over the source and writes the answer itself. Every page on dekka.cloud names this address in four `agent:` meta tags in its ``, and every Markdown page names it in its front matter, so an agent that lands on any page can find the search. ## Read a page as Markdown Every docs page has a Markdown twin at the same address with `.md` on the end, such as `https://docs.dekka.cloud/lockdown-mode.md`. A request that asks for `text/markdown` in its `Accept` header gets the Markdown at the page's own address. ## Start from a map of the site [llms.txt](https://dekka.cloud/llms.txt) lists every docs page, product and research report with a line about each, and [llms-full.txt](https://dekka.cloud/llms-full.txt) holds the full text of the docs in one file. --- title: Virtual servers description: Create a Linux server with root access over SSH, open a shell or the serial console from its page, take snapshots, set its firewall, then start, stop, resize, rebuild and delete it, and see how it's billed and how many you can have. section: Servers order: 1 updated: 2026-11-26 --- A virtual server is a Linux machine of your own with root access over SSH, for software that doesn't fit a service, a database or a bucket. Each server is a virtual machine with its own kernel, and it belongs to a project and an environment, and appears on the project's canvas. **Servers** in the sidebar lists every server in your organisation. ## What a server is A server is a full KVM virtual machine booted from a stock cloud image. Inside it you get a normal distribution with systemd, package managers and root over SSH, so most things that run on a Linux box run on a server, Docker included. The server sees the host's processor as it is, virtualisation extensions included, so nested virtualisation works and you can run KVM and VM-based sandboxes inside it. It has an address on its environment's private network, where the environment's servers reach each other by name and no other environment can reach them, and the server's page shows that address beside the one SSH uses. Servers share the host's public address, and each is reached on a port of its own. A server that needs a dedicated public IPv4 address can have one on request, so write to us at [hello@dekka.cloud](mailto:hello@dekka.cloud) with the server's name. A server's disk and its [snapshots](#snapshots) live on one host in one failure domain, and Dekka doesn't back a server up anywhere else yet. Anything you can't lose should also be somewhere else, such as [object storage](/docs/object-storage) or a [PostgreSQL](/docs/postgresql) database. ## Create a server 1. Open **Servers** and choose **Create server**. 2. Give it a **Name** and choose its **Project**. To put it in a new project, choose **New project** and name it. If you have no project yet, the dialog asks for the first one's name. 3. Choose an **Image**, which is Ubuntu 24.04 LTS or Debian 12. 4. Choose a **Size**. Sizes are tiers, from Seed up to Forge, and the dialog shows each one's resources and monthly price. A tier the Ghana host has no room for right now can't be chosen, and when the host's capacity can't be checked the dialog says so, because the request may then be refused. 5. Under **SSH keys**, keep ticked the keys that may sign in as root. Every saved key starts ticked, a server needs at least one, and **Add a key** saves a new one. See [SSH keys](/docs/ssh-keys). 6. To have the server set itself up, choose **Set the server up on first boot** and fill in what you want. See [Set up on first boot](#set-up-on-first-boot). 7. Keep **Open a shell on the server from its page** ticked to sign in from the dashboard without a key of your own. See [Open a shell from the dashboard](#open-a-shell-from-the-dashboard). 8. Tick **Install the Dekka Sentry agent** to have [Dekka Sentry](/docs/dekka-sentry) watch what runs inside the server. The agent is installed when the server first starts, and it turns Sentry on for the project if it isn't on already. The option is there on plans that include Sentry. 9. Choose **Create server**. The server usually takes about a minute to boot. Dekka stores the user data encrypted and never shows it again, and rebuilding the server uses it again. | Tier | `size_id` | vCPU | Memory | Disk | | --- | --- | --- | --- | --- | | Seed | `server-seed-kvm-v4` | 2 | 2 GiB | 50 GB | | Core | `server-core-kvm-v4` | 2 | 4 GiB | 100 GB | | Forge | `server-forge-kvm-v4` | 4 | 8 GiB | 200 GB | The images are `kvm-ubuntu-24.04` and `kvm-debian-12`. Tier ids carry a version, so a tier's resources and price never change under an existing server: a server created on an earlier version keeps it, and can be resized to a current tier. `GET /v1/catalog/servers` returns each size with its `tier`, `name`, resources, price and whether it's `available` right now, along with the images, and `capacity_known` says whether the engine could check what the host has room for. Creating a server with a size the host can't fit answers 422 `capacity_unavailable`, and the dashboard shows the message the API sends. To create a server with the API, send the size, the image, `runtime_profile` as `kvm-linux-v1` and between one and ten SSH key IDs from `GET /v1/orgs/{org_id}/ssh-keys` to `POST /v1/projects/{project_id}/servers`. `hostname` is optional and defaults to the name. ```bash curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/servers \ -H "Authorization: Bearer $DEKKA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "web-1", "size_id": "server-seed-kvm-v4", "image_id": "kvm-ubuntu-24.04", "runtime_profile": "kvm-linux-v1", "ssh_key_ids": [""], "user_data": "#cloud-config\npackages:\n - nginx\n" }' ``` ## Set up on first boot The create dialog can do the first things most servers need, so you don't have to sign in to do them. Every field is optional. | Field | What it does | | --- | --- | | **Packages** | Installs the packages you name from the image's own package manager, such as `nginx docker.io` | | **User** | Creates a user with `sudo` who signs in with the same SSH keys as root | | **Commands** | Runs each line as root once the server is up | | **Update packages first** | Brings the system's packages up to date before anything else, which adds a minute or two to the first boot | Dekka turns your answers into [cloud-init](https://cloudinit.readthedocs.io/) user data. **Write cloud-init yourself** shows what the form made and lets you edit it or paste your own, up to 32 KiB, and from then on the text in the box is what the server gets. The server reads Running as soon as it answers on SSH, which can be before the setup has finished. `cloud-init status --wait` on the server returns when it has, and `/var/log/cloud-init-output.log` shows what each step printed. ## Connect with SSH A server is reached on the host's public address and a port of its own, so it has no dedicated address. Once the server is running, its page shows the host, the port and the full command under **Connect**, and the command can be copied from there. Sign in as root with one of the keys you chose when you created it. ```bash ssh -p root@ ``` While the server is still booting or is stopped, the page says so instead of showing a command, because the engine reports the endpoint only while the server runs. ## Open a shell from the dashboard **Console** on the server's page opens a terminal on the server, signed in as root, while the server is running. Each session signs in with a certificate made for it alone, which lasts two minutes and puts your email in the server's SSH log, so no key or password of yours is used. Opening a shell takes someone signed in to the dashboard, and an API key can't. A server created with **Open a shell on the server from its page** ticked trusts the shell already. For one created without it, switching the shell on gives you a command to run once as root, over SSH. Switching it off deletes the key that signs the sessions and ends any shell that's open, so nothing can sign in that way until it's switched on again. ## Use the serial console The serial console, also under **Console**, is a terminal on the server itself, for when SSH can't reach it, such as after a firewall or network change. It signs in as root with a password, since SSH takes keys only. Set the password under **Root's password**, at least 12 characters, and it takes effect the next time the server starts after being stopped. Dekka keeps only a hash of it. ## Snapshots A snapshot keeps the disk as it is now, so a change can be undone in seconds. Under **Snapshots**, name one and take it, with the server running or stopped. A server keeps up to ten, so delete one to take another. Turn on **Take a snapshot every night** to have one taken each night. The newest nightly ones are kept, up to seven, and the ones you took yourself are left alone. To put the disk back as a snapshot holds it, stop the server, choose **Restore the disk** on the snapshot and type the server's name. Everything written since the snapshot is lost. Deleting a snapshot doesn't touch the disk as it is now. Snapshots stay on the same host as the disk, and rebuilding the server deletes them. The API takes snapshots with `POST /v1/servers/{id}/snapshots` and a `name`, lists them with `GET`, switches the nightly snapshot with `PUT /v1/servers/{id}/snapshots/schedule`, and restores one with `POST /v1/servers/{id}/snapshots/{snapshot_id}/revert` and the server's name as `confirm`. ## Firewall The servers in an environment share its private network, and **Firewall** on a server's page holds that network's inbound rules, so a change applies to every server in the environment. A new network lets its own servers reach each other, and lets anyone reach SSH and ping them. Each rule allows or denies traffic from the environment's own servers, from anywhere, or from an address or range, to a port or range. The rule with the lowest priority that matches a new connection decides it, and a connection no rule matches is dropped, so with no rules at all nothing reaches the servers, SSH included. The host takes new rules within seconds. They apply to new connections, and one that's already open isn't cut. The API reads and replaces the rules with `GET` and `PUT /v1/environments/{environment_id}/firewall`, which replaces every rule at once. ## See what a server uses The server's overview shows its CPU, memory and disk use now, and charts its CPU, memory, network in and out, and disk reads and writes over the time window you choose. ## What do the states mean? | In the dashboard | `state` | Meaning | | --- | --- | --- | | Creating | `provisioning` | The server is booting for the first time, or again after a rebuild | | Running | `running` | The server is up | | Stopping | `stopping` | The server is shutting down | | Stopped | `stopped` | The server is off and keeps its disk, and it's still billed | | Rebooting | `rebooting` | The server is restarting | | Failed | `failed` | An operation failed, and **Details** shows why | | Deleting | `deleting` | The server and its disk are being deleted | A server shut down from inside, with `poweroff` for example, moves to **Stopped** by itself. A server runs one operation at a time, and asking for another while one is in progress answers 409 `operation_in_progress`. ## Start, stop or reboot a server Use **Start**, **Stop** and **Reboot** at the top of the server's page, or `POST /v1/servers/{id}/actions/{action}` with `start`, `stop` or `reboot`. Stop and reboot need a running server, and start needs a stopped one, which the API also allows for a failed server. Anything else answers 409 `invalid_state`. ## Resize a server Stop the server, then choose a tier under **Resize** and choose **Resize**. A server that isn't stopped answers 409 `server_not_stopped`. The disk can grow with a larger tier but never shrinks, so only tiers with at least as much disk are offered, and the API answers 422 `disk_shrink_not_supported` for a smaller one. A tier the host has no room for answers 422 `capacity_unavailable`. The server stays stopped afterwards, so start it when you're ready. Moving to a size that costs more checks your organisation's [spend limit](/docs/billing#what-happens-at-the-spend-limit) and costs the difference for the days left in the month already paid for, which is charged to your saved card or paid at a checkout before the resize starts. The next month is charged at the new size's price. With a checkout to pay, the API answers with its address as `checkout_url`. The API resizes with `POST /v1/servers/{id}/resize` and a `size_id`. ## Rebuild a server Rebuilding wipes the disk and installs a fresh image, keeping the server's addresses, size, SSH keys and user data, and it deletes the server's snapshots. The server gets a new SSH host key, so your SSH client will ask you to trust it again. Under **Danger zone**, choose **Rebuild**, pick the image, type the server's name and choose **Wipe and rebuild**. A server can be rebuilt while it's running, stopped or failed. The API rebuilds with `POST /v1/servers/{id}/rebuild`, an `image_id` and the server's name as `confirm`, and answers 422 `confirmation_required` without it. User data can't be changed after creation, so to use different user data, create a new server. ## Delete a server Under **Danger zone**, choose **Delete server**, type its name and choose **Delete server**. Dekka deletes the server and everything on its disk, and its billing stops. The month already paid for isn't refunded. The API deletes with `DELETE /v1/servers/{id}?confirm=`. > [!WARNING] > Rebuilding or deleting a server erases its disk and its snapshots for good, and Dekka keeps no copy elsewhere. Keep anything you can't lose somewhere else, such as [object storage](/docs/object-storage) or a [PostgreSQL](/docs/postgresql) database. ## How is a server billed? A server is paid for a month at a time, before it runs. Creating one opens Paystack's checkout for its first month at the size's monthly price, and the server is made once the payment goes through. One that isn't paid for within a day is deleted. Each server has its own month, starting the day it was paid for, and it costs the same whether it's running or stopped, because a stopped server still holds its disk and reserved capacity. When the month ends, a server paid for with a card is charged for the next one on that card. A server paid for with mobile money is paid for a month at a time, so its owners and admins get an email three days before the month ends, and **Pay for next month** on the server's page takes the payment. If a month is still unpaid three days after it ends, Dekka stops the server and emails that it will be deleted seven days later, and once more two days before. Paying in between starts it again. The API takes a payment for a server with `POST /v1/servers/{id}/checkout`, which answers with the checkout's address as `checkout_url`. A server's `billing` says what it costs, until when it's paid for, and whether a payment is due. Servers made before 3 December 2026, and servers in an organisation whose plan Dekka set, are billed by the hour as before: every started hour at the size's monthly price divided by 730, including while stopped, on the invoice for usage. Server months aren't part of any plan's allowance, and each appears on its own invoice as a line such as "Server web-1 (Seed)". Each server comes with outbound internet traffic every month, 250 GB with Seed and Core and 500 GB with Forge, and inbound traffic is unlimited. Traffic between servers in the same environment doesn't count. Traffic a server sends beyond its allowance costs GHS 1.00 a GB and appears on the invoice as its own line, and if a server needs more, ask support and we can raise its allowance for the month. The prices are pilot prices and may change before launch. ## How many servers can I have? | Plan | Servers | | --- | --- | | Trial | None | | Starter | 1 | | Growth | 3 | Every server that isn't deleted counts, including stopped ones, and creating one past the limit answers 403 `entitlement_exceeded`. Creating a server also checks your organisation's hard spend limit. Forked environments, such as pull request previews, leave servers out, so a preview never starts a machine that's billed by the hour. --- title: SSH keys description: Add the public keys Dekka installs on new virtual servers or have a key made for you, check fingerprints, and fix a key Dekka refuses. section: Servers order: 2 updated: 2026-11-17 --- SSH keys belong to your organisation, and Dekka installs the ones you choose for root when it creates a [virtual server](/docs/virtual-servers). Dekka only ever holds the public half, and your private key stays on your machine. ## Add a key Open **Settings**, then **SSH keys**, and choose **Add SSH key**, or choose **Add a key** while creating a server. Paste one public key on a single line, which is usually the contents of `~/.ssh/id_ed25519.pub`, and choose **Add key**. The **Name** is optional and defaults to the comment at the end of the key. ## Have a key made for you If you don't have a key yet, choose **Make one for me** in the same dialog and give the key a name. Your browser makes an Ed25519 pair, saves the public half to Dekka and downloads the private half as a file named after the key, such as `dekka-work-laptop`. The private key never reaches Dekka, so that file is the only copy and Dekka can't give it to you again. The dialog then shows two commands. The first moves the file to where SSH looks for keys and makes it readable only by you, and the second signs in to a server with it. ```bash mkdir -p ~/.ssh && mv ~/Downloads/dekka-work-laptop ~/.ssh/ && chmod 600 ~/.ssh/dekka-work-laptop ssh -i ~/.ssh/dekka-work-laptop -p root@ ``` You can also make a key yourself and paste its public half. ```bash ssh-keygen -t ed25519 -C "you@laptop" cat ~/.ssh/id_ed25519.pub ``` ## Who can add a key? Developers, admins and owners can add and delete keys, and everyone in the organisation can see them. The API adds a key with `POST /v1/orgs/{org_id}/ssh-keys`, a `name` and the `public_key`. ## Which keys are accepted? | Type | Notes | | --- | --- | | `ssh-ed25519` | The best choice for a new key | | `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, `ecdsa-sha2-nistp521` | ECDSA on the NIST curves | | `ssh-rsa` | At least 2048 bits | Any other type answers 422 `unsupported_ssh_key_type`. ## Check a fingerprint Dekka shows each key's SHA-256 fingerprint, which starts with `SHA256:`, in the same form `ssh-keygen` prints, so you can compare it with the key on your machine. ```bash ssh-keygen -lf ~/.ssh/id_ed25519.pub ``` Each key can be saved once per organisation, and saving it again answers 409 `ssh_key_exists` with the name it's already saved under. ## Why was my key refused? | Code | What to do | | --- | --- | | `private_key_rejected` | You pasted a private key. Paste the public key from the file ending in `.pub` instead, and keep the private key on your machine. | | `ssh_key_too_weak` | The RSA key has fewer than 2048 bits. Make a new ed25519 key. | | `unsupported_ssh_key_type` | The key's type isn't in the table above. | | `invalid_ssh_key` | The text isn't a valid public key, or it spans more than one line. | | `ssh_key_exists` | The key is already saved, under the name in the message. | ## Delete a key Choose the bin icon next to the key under **SSH keys**. New servers can no longer use it, but each server keeps the keys it was created with, so deleting a key doesn't remove it from existing servers, and rebuilding a server installs them again. To stop a key signing in to a server, remove its line from `~/.ssh/authorized_keys` on that server. --- title: GPU instances description: See the GPU instances Dekka plans to offer, join the waitlist, and request a private inference endpoint you can call through the AI Gateway. section: Servers order: 3 updated: 2026-11-23 --- GPU instances are for training and serving models, and none can be provisioned yet because no GPU capacity is available in any region. **GPU instances**, a tab under **Servers**, lists what Dekka plans to offer and takes waitlist requests. You can also request a private inference endpoint there, which the AI Gateway answers with a simulated reply outside production, so you can build against it before it runs. ## Which GPU instances are planned? Every instance is on the waitlist, and none has a price until a host quotes for the capacity. | Instance | `id` | GPUs | GPU memory | vCPU | Memory | Disk | | --- | --- | --- | --- | --- | --- | --- | | L4, one GPU | `gpu-l4-1` | 1 × L4 | 24 GB | 8 | 32 GiB | 200 GB | | L40S, one GPU | `gpu-l40s-1` | 1 × L40S | 48 GB | 16 | 64 GiB | 400 GB | | A100 80 GB, one GPU | `gpu-a100-80gb-1` | 1 × A100 80 GB | 80 GB | 16 | 128 GiB | 800 GB | | A100 80 GB, four GPUs | `gpu-a100-80gb-4` | 4 × A100 80 GB | 320 GB | 64 | 512 GiB | 2000 GB | `GET /v1/catalog/gpu-instances` is public and returns each instance with its `gpu_class`, which is `l4`, `l40s` or `a100-80gb`, along with `available` set to `false` and `availability` set to `waitlist`. Creating a `gpu_runtime` resource answers 422 `kind_not_available`, and the error's `details` give the waitlist's path. ## Join the waitlist On an instance, choose **Join the waitlist**. Say how many you'd need under **How many** and what you'd run under **What you'd run**, add **When you'd start** if you know, and choose **Join the waitlist**. Nothing is reserved or charged, and Dekka contacts you when it can offer capacity. The API takes the same request at `POST /v1/orgs/{org_id}/gpu/requests`, with a `quantity` from 1 to 64 and a `use_case` of up to 2000 characters. It also accepts a preferred `region_id`, and a `kind` of `reservation` to ask to reserve instances instead of joining the waitlist. An organisation can make 10 requests an hour. ```bash curl https://api.dekka.cloud/v1/orgs/$ORG_ID/gpu/requests \ -H "Authorization: Bearer $DEKKA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "offering_id": "gpu-l40s-1", "quantity": 2, "use_case": "Fine-tuning a speech model on Twi and Ewe recordings", "desired_start": "2027-01-15" }' ``` ## What do the request statuses mean? Your requests are listed under **Your requests**, newest first. | In the dashboard | `status` | Meaning | | --- | --- | --- | | Received | `received` | Dekka has the request | | We've been in touch | `contacted` | Dekka has contacted you about capacity | | Closed | `closed` | The request is settled | ## Withdraw a request Choose **Withdraw** next to the request, or send `DELETE /v1/gpu-requests/{id}`. Dekka closes the request and stops listing it. A request that's already closed can't be withdrawn from the dashboard. ## Request a private inference endpoint A private inference endpoint serves an open-weights model for your organisation, and your code calls it through the AI Gateway like any other model. Under **Private inference endpoints**, choose **Request an endpoint** and fill in these fields, then choose **Request endpoint**. - **Name** is lowercase letters, digits and dashes, up to 63 characters. It must be unique in the organisation and can't change later, because it's part of the endpoint's model ID. - **Model** is the model's Hugging Face ID, such as `meta-llama/Llama-3.1-8B-Instruct`. - **GPU** is a GPU class from the catalogue. - **Min replicas** and **Max replicas** run from 0 to 8, and the maximum must be at least 1 and no lower than the minimum. A minimum of 0 lets the endpoint scale to zero when it's idle. New endpoints have 0 and 1. The endpoint joins the waitlist straight away. The API creates one with `POST /v1/orgs/{org_id}/inference-endpoints`, which also takes a `project_id` to limit the endpoint to that project's keys, and an organisation can create 20 an hour. `PATCH /v1/inference-endpoints/{id}` changes the model, the GPU class or the replicas. To delete an endpoint, choose **Remove** next to it or send `DELETE /v1/inference-endpoints/{id}`, and the gateway stops answering its model at once. ## What do the endpoint states mean? Every endpoint is on the waitlist for now. The other states apply once GPU capacity exists. | In the dashboard | `state` | Meaning | | --- | --- | --- | | On the waitlist | `waitlisted` | The endpoint is waiting for GPU capacity | | Provisioning | `provisioning` | The endpoint is starting on GPUs | | Running | `running` | The endpoint is serving requests | | Scaled to zero | `scaled_to_zero` | No replicas are running because the endpoint is idle | | Failed | `failed` | The endpoint couldn't start or stopped working | ## Call an endpoint through the AI Gateway Send `private/` as the model, with a gateway key as the [AI Gateway](/docs/ai-gateway) page describes. The dashboard shows this ID under the endpoint's name with a copy button, and the API returns it as `gateway_model`. ```ts const completion = await client.chat.completions.create({ model: "private/support-assistant", messages: [{ role: "user", content: "Summarise this complaint in one sentence." }], }); ``` Outside production, the gateway answers with a simulated reply that carries `simulated: true`, streamed or not, and no model runs. In production it answers 503 `endpoint_unavailable` until capacity exists, with `availability` and the endpoint's `state` in the error's `details`. An endpoint limited to a project answers only that project's keys and keys for the whole organisation, and any other key gets 404 `model_not_found`. Routing rules and an AI Gateway node's `allowed_models` accept only catalogue models, so a project or node that names particular models refuses every endpoint with 403 `model_not_allowed`, and a project's allowed providers don't apply. Requests to an endpoint appear under **Requests** with no cost, because nothing runs on a GPU. `X-Dekka-Provider` is `private`, and `GET /v1/ai/models` lists the endpoints your key may use with `owned_by` set to `private`. --- title: Public addresses and custom domains description: The HTTPS address every web service gets on apps.dekka.cloud, how to choose it, and how to point your own domain at a service. section: Networking order: 1 updated: 2026-11-06 --- Every web service gets an HTTPS address on `apps.dekka.cloud` when it first deploys, and on the Starter and Growth plans you can add your own domains to it. Workers and cron jobs have no public address. ## What is my service's address? It's the first part you choose, then `.apps.dekka.cloud`, such as `shop.apps.dekka.cloud`. The deploy dialog fills the field with the service's name and says whether that address is free as you type. When it's taken, you can pick another or let Dekka add four random characters to the name, which gives an address such as `web-x2k4.apps.dekka.cloud`. The address stays the same across deploys, and it's shown in the service's details and on the project's **Domains** page. Your code can read it from `DEKKA_PUBLIC_DOMAIN`. The first part is 3 to 40 lowercase letters, digits and hyphens, and it has to start and end with a letter or digit. A few names are Dekka's own, such as `api`, `www`, `admin`, `docs`, `mcp` and `status`, and an address is one service's across the whole platform, so a name another organisation holds isn't free for yours. To change it later, open the service's **Settings**, then **Networking**, and type a new first part under **Address**. A running service answers at the new address straight away, and the old one stops answering. If a deploy is under way, the change reaches the service when the deploy finishes, and the old address stays yours until Dekka has stopped serving it, so no one else can take it in the meantime. A custom domain's CNAME record keeps resolving to Dekka, so traffic to it still arrives, but point it at the new address when you next edit DNS, because **Check DNS** compares against the current one. To stop serving a service at this address, turn off **Public address** in its settings. Its custom domains keep working. ```bash tab="cURL" curl https://api.dekka.cloud/v1/domains/availability?subdomain=shop \ -H "Authorization: Bearer $DEKKA_API_KEY" curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/resources \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "kind": "application", "name": "shop", "subdomain": "shop", "spec": { ... } }' curl -X PATCH https://api.dekka.cloud/v1/resources/$SERVICE_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "subdomain": "akwaaba-shop" }' ``` The availability check answers `available` with a `reason` of `invalid`, `reserved` or `taken` when it isn't. Creating or updating with a label that is taken answers `409 subdomain_taken`, including when two requests chose the same label at the same moment, and a label that breaks the rules answers `422 invalid_subdomain` or `422 reserved_subdomain`. The dashboard's session cookie is pinned to the dashboard's own origin, so code running on an `apps.dekka.cloud` address can't read your Dekka session. ## Add a custom domain 1. Open the project's **Domains** page, enter the **Domain**, such as `shop.example.com`, pick the **Service** and choose **Add domain**. 2. At your DNS provider, create the two records Dekka shows. - A **CNAME** record named `shop.example.com` with the service's address as its value, such as `web-x2k4.apps.dekka.cloud`, which sends traffic to the service. - A **TXT** record named `_dekka-challenge.shop.example.com` with the value Dekka shows, which starts `dekka-verify=` and proves you control the domain. 3. Choose **Check DNS**. Many DNS providers don't allow a CNAME on a bare domain such as `example.com`. There, create the **A** record the dashboard shows in place of the CNAME, which points the domain at Dekka's address. A CNAME follows the service wherever Dekka serves it, so prefer one wherever your provider allows it. ```bash tab="cURL" curl https://api.dekka.cloud/v1/resources/$SERVICE_ID/domains \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "hostname": "shop.example.com" }' curl -X POST https://api.dekka.cloud/v1/domains/$DOMAIN_ID/verify \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ## How does verification work? **Check DNS** looks up the TXT record. When it holds the right value, the domain becomes **Verified**, Dekka starts routing it to the service and asks for a certificate. When it doesn't, the domain shows **DNS doesn't match** with the reason, and you can fix the record and check again. DNS changes can take a few minutes to arrive. A domain that hasn't verified within seven days is removed, and you can add it again. Adding a domain doesn't reserve it, because anyone can type a name. Until it verifies, another organization can add the same name too, and whichever verifies first keeps it while the other claims are removed. Dekka also checks the CNAME, or the A record in its place, and tells you when it "doesn't point at Dekka yet". The domain can verify without it, but traffic won't reach the service until it points at the service's address. ## Certificate states | Shown as | Certificate status | What it means | | --- | --- | --- | | Certificate after verification | `pending` | The domain hasn't been verified yet | | Issuing certificate | `issuing` | The domain is verified and the certificate is on its way | | HTTPS ready | `active` | The domain serves HTTPS | | Certificate failed | `failed` | The certificate couldn't be issued | ## Limits Custom domains need the Starter or Growth plan, and adding one on the trial answers 403 `entitlement_exceeded`. A web service can have up to 20, and names under `dekka.cloud` or `dekka.internal` are reserved. A domain can belong to only one service, and removing it stops routing it straight away. --- title: Private networking description: Reach other services in the same environment by a private name, without going over the internet. section: Networking order: 2 updated: 2026-12-03 --- Every service, PostgreSQL database and Redis cache has a private hostname in the form `.internal..dekka.cloud`, such as `api-x7k2.internal.gh-1.dekka.cloud`, where the slug is the name Dekka gave the service when you created it. The dashboard shows it as **Private address**. The name only resolves inside the region's network, and there it always leads to the service with that slug in the asking service's own environment, so other services in the environment can reach it while nothing outside can. ## Call another service privately Use the other service's private hostname and the port it listens on. Dekka sets `DEKKA_PRIVATE_DOMAIN` on every service and `PORT` on web services, so a [reference](/docs/environment-variables#reference-another-services-variable) builds the address for you and keeps it current: ```bash title=".env" API_INTERNAL_URL=http://${{api.DEKKA_PRIVATE_DOMAIN}}:${{api.PORT}} ``` Here `api` is the other service's name. The hostname is built from the slug, which stays the same when you rename the service or its environment, and Dekka updates references that point at a renamed service. ## Do I need private hostnames for databases? No. A [connection](/docs/connections) gives your service a `DATABASE_URL` or `REDIS_URL` with the right host, so use that rather than building the address yourself. ## What can't use private networking? Buckets have no private hostname and are reached through `S3_ENDPOINT`. Services in different environments or projects can't reach each other privately, which is what keeps `staging` away from `production` data. ## Virtual servers Virtual servers in an environment share a private network of their own, where each has a private address and the environment's servers reach each other by name. That network has its own inbound rules, which [Firewall](/docs/virtual-servers#firewall) describes. ## Allow your apps through a firewall elsewhere Some services only answer known addresses, such as a bank's API, a partner's webhook endpoint or a database hosted somewhere else. Give them the address your apps call out from, which is the same public IPv4 address for every service, worker and scheduled job in a region. The dashboard shows it as **Outbound address** in a service's details, and `GET /v1/regions` returns it as `outbound_ipv4`. Dekka tells your organisation's owners and admins before that address changes. Treat it as one layer of protection and keep the other service's own keys or sign-in in place as well. --- title: TCP proxy description: Give a PostgreSQL or Redis database a public host and port so you can connect from your own machine. section: Networking order: 3 updated: 2026-11-06 --- A TCP proxy gives a PostgreSQL or Redis database a public host and port that forward raw TCP to it, so you can connect from `psql`, `redis-cli` or a desktop client on your own machine. It's off by default. ## Turn on the TCP proxy Open the database's **Settings**, turn on **Public TCP proxy**, choose **Stage changes**, then **Review** and **Deploy** in the top bar. Dekka gives the database a public name of its own under `db.gh-1.dekka.cloud`, on the protocol's usual port, 5432 for PostgreSQL and 6379 for Redis. > [!WARNING] > Anyone with the database's credentials can connect through the proxy from anywhere. Turn it off when you no longer need it, and [rotate the credentials](/docs/postgresql#rotate-credentials) if they may have leaked. ## Find the proxy's address The database's **Overview** shows the host and port under **Public TCP proxy** once the engine reports them, and says the address is being set up until then. The API returns the same address as `tcp_proxy`: ```bash tab="cURL" curl https://api.dekka.cloud/v1/resources/$DATABASE_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json title="Response, abridged" { "tcp_proxy": { "host": "orders-db-x7k2-3f2a9c1e5b7d4a60.db.gh-1.dekka.cloud", "port": 5432 }, "pending_settings": [] } ``` If the engine finishes without applying the proxy, `pending_settings` lists `tcp_proxy` and the dashboard offers **Apply again**, which sends the database's current settings to the engine once more. ## Connect through the proxy Clients must connect over TLS, because the proxy routes each connection by the TLS server name the client sends. `sslmode=require` for PostgreSQL and the `rediss://` scheme for Redis both do that. The dashboard shows a connection string without the password, and for PostgreSQL it uses the user and database of a connected service. The password is that service's `PGPASSWORD` or `REDIS_PASSWORD`, which you can reveal on the **Variables** page. Credentials only exist for connected services, so connect one first if nothing uses the database yet. ```bash tab="PostgreSQL" psql "postgresql://:@orders-db-x7k2-3f2a9c1e5b7d4a60.db.gh-1.dekka.cloud:5432/?sslmode=require" ``` ```bash tab="Redis" redis-cli -u "rediss://default:@cache-p4m9-8b1d0e6f2a4c9375.db.gh-1.dekka.cloud:6379" ``` --- title: Limits on a service's traffic description: Cap how many requests one visitor can send to a web service, ask every visitor for a password, and block a source, all enforced before a request reaches it. section: Networking order: 4 updated: 2026-12-03 --- A web service can turn requests away at Dekka's edge, before they reach your code, so one client sending thousands of requests a second can't take a small service down. ## Limit each visitor's requests Open the service's **Settings**, and under **Networking** turn on **Limit each visitor's requests**. Choose how many requests one visitor may make and whether that is per second or per minute, then save. The limit is applied to the running service within a minute, without a deploy and without restarting it, and turning it off works the same way. A visitor is counted by the address their requests come from. They may use the whole allowance at once, and then wait for it to refill over the period you chose. A request over the limit gets `429 Too Many Requests` and never reaches your service, and it appears in the service's **Requests** with that status, so you can see how often the limit is used. Many people in Ghana share one mobile network address, and so do the people in an office behind one connection, so a limit that is too low refuses real visitors. The limit starts at 600 requests a minute, which leaves room for that. Lower it only if you know who sends your traffic. In the API the limit is the service spec's `networking.rate_limit`, for example `{"requests": 600, "period": "minute"}`, or `null` for no limit. A request of 1 to 100,000 is accepted, and only an application, which has a public address, can have one. ## Ask visitors for a password A staging site or a preview can be kept private with a password, which every visitor gives before the site loads. It guards your own site and has nothing to do with signing in to Dekka. Under **Networking** in the service's settings, turn on **Ask visitors for a password**, choose the name visitors give (it starts as `dekka`) and a password of at least 8 characters, and choose **Save password**. Browsers ask for the name and password in their own sign-in box, and remember them for the visit. It applies within a minute on every address the service has, its `apps.dekka.cloud` address and your own domains, without a deploy. **Change the password** replaces it, and turning the switch off lets anyone in again. Dekka keeps only a bcrypt hash of the password and never shows it again, so keep it somewhere safe. A request without the right password gets `401 Unauthorized` and never reaches your service, and the password is taken off the request before your service sees it. Your service's own health checks are unaffected, because they reach it directly. In the API, `PUT /v1/resources/{resource_id}/password` with `{"username": "dekka", "password": "..."}` sets it, `DELETE` on the same path removes it, and a service's `password_protection` names the user while it is on. ## Block a source When [Dekka Sentry](/docs/dekka-sentry) finds a source scanning your paths or guessing passwords, its finding shows the source's address and offers **Block this source**. Choose how long the block lasts, a day, a week or until someone unblocks it, and every request from that address to the project's web services gets `403 Forbidden` within seconds, before it reaches them. A blocked source isn't counted against a rate limit or asked for a password. Many people in Ghana share one mobile network address, so blocking an address may block other people behind it. A block for a day is usually enough to stop an attack while you fix what it found. The project's Sentry page lists its blocked sources, who blocked each, when, and until when, with **Unblock** beside each. Blocking and unblocking need an owner or an admin signed in to the dashboard, never an API key, so a stolen key can't block your visitors or let an attacker back in. Both appear in the organisation's activity. In the API, `POST /v1/projects/{project_id}/blocked-sources` with `{"source": "41.66.1.9", "duration": "day"}` blocks an address or a range no wider than a /16, `GET` on the same path lists them, and `DELETE /v1/projects/{project_id}/blocked-sources/{id}` unblocks one. Up to 200 sources a project can be blocked at once. --- title: Logs description: Read a service's runtime output and HTTP request logs, search build, deploy and job output, and fetch logs from the API. section: Observability order: 1 updated: 2026-11-23 --- Runtime logs hold what a running service writes to standard output and standard error, and HTTP request logs record each request a web service answers. Each deployment also keeps its own build and deploy output, which [Deployments](/docs/deployments#read-a-deployments-logs) covers, and each cron job run keeps its output under the job's **Runs**. ## Read runtime logs Open the project's **Logs** page and pick a service. New lines appear as they arrive, and scrolling up stops following them until you choose **Jump to latest**. **Jump to first error** goes to the first line that looks like an error, **Search the log** marks every line that contains your text, and Enter steps from one match to the next. The level buttons narrow the view to errors, warnings or the other levels, a line's number is a link to that line, and you can copy or download the lines shown. ```bash tab="cURL" curl "https://api.dekka.cloud/v1/resources/$SERVICE_ID/logs?after=0&limit=500" \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` Each line has a `seq`, a timestamp, its `stream` and the `line` itself. To follow new lines, call again with `after` set to the `next_after` from the last response. A page holds up to 1,000 lines. ## Read HTTP request logs For a web service, choose **HTTP requests** next to the service picker. Each request shows its time, method, path, status, duration and response size. Narrow them with the **Status** menu, which takes a class such as 5xx, and **Path starts with**, such as `/api`. ```bash tab="cURL" curl "https://api.dekka.cloud/v1/resources/$SERVICE_ID/http-logs?status=5xx&path_prefix=/api" \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` The API also accepts an exact status such as `status=404`. Dekka never stores the client's IP address, only a salted hash of it as `client_ip_hash`. Workers and cron jobs don't serve HTTP, so they have no request logs, and asking for them answers 422 `not_supported`. ## Search across the environment Choose **Search all** to search the build and deploy output of every deployment, and the output of every cron job run, in the environment. Type a word such as `timeout` or a request ID, and narrow the results to the build, deploy or runtime stream. Results come newest first. ```bash tab="cURL" curl "https://api.dekka.cloud/v1/projects/$PROJECT_ID/logs/search?q=timeout&environment_id=$ENV_ID" \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` The search also takes `resource_id`, `stream`, `since` and `until`, and pages with the `cursor` from the previous response. Runtime logs of web services and workers aren't part of it, so read those from the service's own runtime logs. --- title: Metrics description: Chart a service's CPU, memory, network, disk, request rate and response time over the last hour to the last seven days. section: Observability order: 2 updated: 2026-11-23 --- The project's **Metrics** page charts a service's CPU and memory, and its network, disk, requests and response time when it has them. Pick a service, or a PostgreSQL database, Redis cache or queue, and a time range of 1 hour, 6 hours, 24 hours or 7 days. Measurements start a minute or two after a service is running. ## Which series are there? | Series | Chart | Unit | | --- | --- | --- | | `cpu_percent` | CPU | Percent | | `memory_mib` | Memory, against the service's limit | MiB | | `network_in_bytes` | Network in | Bytes per step | | `network_out_bytes` | Network out | Bytes per step | | `disk_mib` | Disk | MiB | | `requests_per_minute` | Requests | Requests per minute | | `p95_latency_ms` | Response time, 95th percentile | Milliseconds | ## How far apart are the points? | Window | Step | | --- | --- | | `1h` | 60 seconds | | `6h` | 5 minutes | | `24h` | 15 minutes | | `7d` | 1 hour | ## Read metrics from the API ```bash tab="cURL" curl "https://api.dekka.cloud/v1/resources/$SERVICE_ID/metrics?window=24h" \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` The response holds `step_seconds` and a list of `series`, each with a `name`, a `unit` and its `points`. When `simulated` is `true`, the numbers come from the mock engine used in development rather than from a running service. --- title: Analytics description: See an application's visitors, page views, top pages and devices, counted from its requests with no script and no cookies. section: Observability order: 3 updated: 2026-12-03 --- The project's **Analytics** page shows how many people visit an application, how many pages they open, which pages those are and whether they come on a phone, a tablet or a desktop. Pick an application and a range of 7, 30 or 90 days. There's nothing to add to your site, because Dekka counts from the requests your application already serves, and figures appear a few minutes after it serves its first page. ## What is counted? A page view is a successful `GET` for something a person reads. The files a page loads, such as scripts, styles, images and fonts, aren't page views, and neither are failed requests, form posts or the page shown during [lockdown mode](/docs/lockdown-mode). A visitor is counted once a day, so the same person on Monday and Tuesday counts as two daily visitors, and the total for a range adds up each day's visitors. Crawlers, uptime checks and scripts are counted apart under **Crawlers left out** and stay out of the other figures. Paths are grouped as pages, so `/orders/1042` and `/orders/1043` count as `/orders/:id`. Numbers, long tokens, email addresses and phone numbers in a path are replaced in the same way. Each day keeps up to 300 different pages for an application, and the rest are counted as **(other pages)**. ## What is kept? The totals are kept for 400 days. Nothing that identifies a visitor is kept with them: addresses are scrambled before Dekka counts anything, query strings are never recorded, and the scrambled form a visitor is counted with changes every day and is deleted once the day is over. Counting from requests can't see a page change inside a single-page application that never asks the server for the new page, so such an application shows the pages people arrive on. ## Read analytics from the API ```bash tab="cURL" curl "https://api.dekka.cloud/v1/resources/$APP_ID/analytics?days=30" \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` The response holds the range's `start` and `end`, its `views`, `visitors` and `bot_views`, each counted day in `days`, the `top_pages` and the visitors by `devices`. --- title: Deploy webhooks description: Get a signed HTTP request when a deploy starts, succeeds or fails or a service crashes, verify it, and handle retries, tests and redelivery. section: Observability order: 3 updated: 2026-11-23 --- A deploy webhook sends a signed `POST` to your own URL when something happens to a deployment in a project, so you can post results to Slack, update a status page or start your own tooling. Each project can have up to 20 webhooks. ## Add a webhook Open the project's **Settings** and choose **Add webhook** under **Deploy webhooks**. Enter the URL, choose the events it should receive and choose **Add webhook**. Dekka then shows the signing secret, which starts with `whsec_`, once, so store it where your endpoint can read it. The URL must use `https` and point at a public address, and it can't contain a username or password. Dekka refuses anything else with 422 `invalid_webhook_url`. Admins and owners can add, change and delete webhooks, and developers can send tests and redeliver. ## Which events are sent? | Event | Shown as | Sent when | | --- | --- | --- | | `deployment.started` | Deploy started | A deployment leaves `queued` and starts preparing, building or deploying | | `deployment.succeeded` | Deploy succeeded | A deployment passes its health check and becomes `healthy` | | `deployment.failed` | Deploy failed | A deployment fails | | `deployment.crashed` | Service crashed | A running service is reported unhealthy, sent with the deployment that is serving | | `sentry.finding` | Dekka Sentry raised a serious finding | [Dekka Sentry](/docs/dekka-sentry) emailed the organisation about a serious finding. A new webhook doesn't get this event unless you tick it | A cancelled deployment sends nothing. Switch a webhook off to pause it, and deliveries that were waiting to be sent fail instead of going out. ## What does a delivery look like? Each delivery is a `POST` with a JSON body and these headers: | Header | Value | | --- | --- | | `X-Dekka-Event` | The event, such as `deployment.failed` | | `X-Dekka-Delivery` | The delivery's ID, which stays the same through retries and redeliveries | | `X-Dekka-Signature` | `t=,v1=`, described below | | `User-Agent` | `Dekka-Webhooks/1` | The body has the delivery's `id`, the event as `type`, when it happened as `created_at`, and the deployment with its service, environment, project and organisation under `data`. ```json { "created_at": "2026-11-04T09:12:30.512088+00:00", "data": { "deployment": { "branch": "main", "commit_message": "Fix the checkout total", "commit_sha": "4f2a9c1e8b7d6a5f4e3d2c1b0a9f8e7d6c5b4a39", "created_at": "2026-11-04T09:12:28.904113+00:00", "error": null, "finished_at": null, "id": "…", "image_ref": null, "status": "preparing", "trigger": "push" }, "environment": { "id": "…", "name": "production" }, "organization": { "id": "…", "slug": "acme" }, "project": { "id": "…", "name": "Shop" }, "resource": { "id": "…", "kind": "application", "name": "api" } }, "id": "…", "type": "deployment.started" } ``` `status` and `trigger` take the values in [Deployments](/docs/deployments). For `deployment.failed`, `error` holds the failure's `code`, `message` and the `phase` it failed in, such as `building`. `image_ref` is the image that was deployed, which a deployment from GitHub records once it's healthy. ## Verify the signature Check every request before you trust it. Dekka signs the raw body with HMAC-SHA256, using the whole secret, `whsec_` included, as the key. The signed message is the timestamp from `t`, a full stop, then the body exactly as it arrived, and `v1` is the result in lowercase hex. Compute the same value and compare it in constant time, and reject a request whose `t` is more than five minutes from your clock so an old request can't be replayed. Each attempt is signed again with a fresh timestamp. Verify the bytes you received, because parsing the JSON and serialising it again changes them. ```js tab="Node" import crypto from "node:crypto"; import express from "express"; const secret = process.env.DEKKA_WEBHOOK_SECRET; function verify(header, body) { const parts = header.split(",").map((p) => p.trim().split("=")); const t = Number(parts.find(([k]) => k === "t")?.[1]); if (!Number.isInteger(t) || Math.abs(Date.now() / 1000 - t) > 300) return false; const expected = Buffer.from(crypto.createHmac("sha256", secret).update(`${t}.`).update(body).digest("hex")); return parts .filter(([k]) => k === "v1") .some(([, v]) => v.length === expected.length && crypto.timingSafeEqual(Buffer.from(v), expected)); } const app = express(); app.post("/hooks/dekka", express.raw({ type: "application/json" }), (req, res) => { if (!verify(req.get("X-Dekka-Signature") ?? "", req.body)) return res.sendStatus(400); const event = JSON.parse(req.body); console.log(event.type, event.data.deployment.status); res.sendStatus(204); }); app.listen(3000); ``` ```python tab="Python" import hashlib import hmac import os import time from fastapi import FastAPI, HTTPException, Request SECRET = os.environ["DEKKA_WEBHOOK_SECRET"] app = FastAPI() def verify(body: bytes, header: str, tolerance: int = 300) -> bool: parts: dict[str, list[str]] = {} for item in header.split(","): key, _, value = item.strip().partition("=") parts.setdefault(key, []).append(value) try: timestamp = int(parts["t"][0]) except (KeyError, ValueError): return False if abs(time.time() - timestamp) > tolerance: return False expected = hmac.new(SECRET.encode(), f"{timestamp}.".encode() + body, hashlib.sha256).hexdigest() return any(hmac.compare_digest(expected, v) for v in parts.get("v1", [])) @app.post("/hooks/dekka", status_code=204) async def dekka_webhook(request: Request) -> None: body = await request.body() if not verify(body, request.headers.get("X-Dekka-Signature", "")): raise HTTPException(status_code=400) event = await request.json() print(event["type"], event["data"]["deployment"]["status"]) ``` ## What if my endpoint is down? Dekka counts any 2xx answer as delivered. Anything else counts as a failure, including a redirect, which Dekka doesn't follow, and no answer within 5 seconds. Dekka tries again after 30 seconds and waits twice as long before each later try. After 8 attempts, about an hour after the first, the delivery is marked failed. A delivery can arrive more than once, so use `X-Dekka-Delivery` to ignore one you've already handled. Answer quickly and do slow work after you respond, so a busy handler isn't mistaken for a failure. ## Send a test event Choose **Send test** next to a webhook. Dekka sends a `webhook.test` event straight away, even when the webhook is turned off, and the result appears in its deliveries. A test isn't retried if it fails. ```json { "created_at": "2026-11-04T09:20:02.118734+00:00", "data": { "message": "This is a test delivery from Dekka.", "project": { "id": "…", "name": "Shop" }, "webhook_id": "…" }, "id": "…", "type": "webhook.test" } ``` ## Redeliver an event Each webhook lists its recent deliveries beneath it, with the status your endpoint answered and how many attempts each took. Choose **Redeliver** on a delivery that has finished, whether it succeeded or failed, and Dekka sends it again with the same `X-Dekka-Delivery` ID and body and a fresh set of attempts. The API redelivers one with `POST /v1/webhook-deliveries/{id}/redeliver`, and answers 409 `delivery_pending` while a delivery is still being sent. ## Rotate the secret Select the webhook and choose **Rotate secret**. Dekka shows the new secret once, and signs every delivery with it from then on, including ones still waiting to be retried. The old secret stops working at once, so have your endpoint accept a signature from either secret until you've deployed the new one. **Delete** removes the webhook and its delivery history. --- title: Signing in description: Sign in to Dekka with an email link, GitHub, Google or a passkey, and manage your sign-in methods and sessions. section: Account order: 1 updated: 2026-11-23 --- Dekka has no passwords. You sign in with a link sent to your email, with GitHub or Google, or with a passkey, and every method leads to the same account. ## Sign in with an email link Enter your email address on the sign-in page and open the link Dekka sends. The link works once and expires after 15 minutes. If no account uses that address yet and its pilot application has been approved, the same link creates one, with your own organisation on a seven-day trial. Otherwise Dekka emails the address to say it has no account and how to apply, and the sign-in page looks the same either way, so it never reveals who has an account. ## Sign in with GitHub or Google Choose **GitHub** or **Google** on the sign-in page. If the account you sign in with is already linked to Dekka, you're signed in to that Dekka account, and otherwise Dekka links it to the account with the same verified email address. If there's no such account, Dekka creates one only while sign-ups are open or for an address whose pilot application was approved, and sends anyone else back to the sign-in page. To link GitHub or Google to an account you already have, open **Settings**, then **Account**, and choose **Connect** next to it. GitHub sign-in needs a verified primary email address on your GitHub account, because that's the address Dekka matches or creates an account with. Without one, sign-in stops with `github_email_unverified`, so sign in with an email link instead and then connect GitHub from **Settings**, then **Account**. Once it's connected, GitHub signs you in whether or not the address is verified. If GitHub sign-in is turned off, choosing **GitHub** brings you back to the sign-in page with `github_unavailable`, and an email link, Google or a passkey still works. ## Add a passkey A passkey lets you sign in with your device's fingerprint, face or PIN without waiting for an email. Dekka offers to add one after you first sign in, and you can add or remove passkeys at any time under **Settings**, then **Account**. Next time, choose **Sign in with a passkey**. ## Sign out other devices The **Account** settings list every session that's signed in, with its browser and address. Choose **Sign out** next to one, or **Sign out other sessions** to keep only the device you're using. A session ends after three days without use, and after 30 days in any case. --- title: Organisations and members description: What an organisation holds, the four member roles, inviting teammates, changing roles and removing members, deleting an organisation, and where to see your organisation's activity. section: Account order: 2 updated: 2026-12-02 --- An organisation owns projects, API keys, registry credentials and a billing plan. Every new account gets its own organisation, on a seven-day [trial](/docs/billing#how-does-the-trial-work), and everything you create belongs to it. It starts named after your first name, as in "Ama's org", which you can change under **Settings**. ## What can each role do? | Role | Can | | --- | --- | | Viewer | See projects, services, deployments, logs and usage | | Developer | Everything a viewer can, and create, deploy, change and delete services, variables, domains and registry credentials | | Admin | Everything a developer can, and invite and remove members, change their roles, manage API keys and billing, and delete environments and projects | | Owner | Everything an admin can, and invite owners, change an owner's role and remove owners | A person outside an organisation gets 404 for its projects, so its existence isn't revealed, and a member without the right role gets 403 with the role it needs in `details.required_role`. ## Invite a teammate Open **Settings**, then **Organisation**. Under **Invite people**, enter the email address they'll sign in with, choose a role and choose **Send invitation**. Only owners can invite someone as an owner, and an admin who tries gets 403 `owner_required`. Dekka emails them a link that works once and expires after seven days. Open invitations are listed under the form until they're accepted, and you can choose **Revoke** to cancel one. An invitation that has expired stays listed until you revoke it or invite the same address again, which replaces it. An address that already has an open invitation gets 409 `invitation_exists`, so revoke that one first if you want to send a new link, and inviting someone who is already a member gets 409 `already_member`. Inviting, changing roles and removing members all need you to be signed in to the dashboard, so an API key gets 403 `session_required` for them. ## How many people can join? Each plan includes a number of team members, and Dekka counts open invitations as well as members when you invite someone. | Plan | Team members | | --- | --- | | Trial | 1 | | Starter | 1 | | Growth | 3 | An invitation that would go past the limit is refused with 403 `entitlement_exceeded` and `details.entitlement` set to `team_members`. Revoking an open invitation frees its place, and an expired one no longer counts. ## Accept an invitation The link opens a page that says who invited you, to which organisation and with which role. Sign in or create an account with the address the invitation was sent to, then choose **Accept invitation**. Dekka checks that your verified email address matches the invited one, and a different address gets 403 `invitation_email_mismatch`, so sign out and sign in with the right one. A link that has expired, was revoked or was already used gets 400 `invalid_invitation`, and whoever invited you can send a new one. If you're already a member, accepting keeps the role you have. ## Change someone's role Choose a new role from the menu next to their name in **Members**. Admins can change the role of developers, viewers and other admins. Only owners can make someone an owner or change an owner's role. Every organisation needs at least one owner, so changing the role of its only owner gets 409 `last_owner`. Make someone else an owner first. ## Remove a member Choose **Remove** next to their name. Admins can remove developers, viewers and other admins, and only owners can remove an owner. Removing the only owner gets 409 `last_owner`. The person loses access straight away, and every API key and [project token](/docs/project-tokens) they created in the organisation is revoked, so check that your CI isn't using one of theirs. ## Delete an organisation Owners and admins can delete an organisation under **Settings**, then **Organisation**, by typing its name. It has to be done signed in to the dashboard, so an API key can't do it. Its services and servers stop straight away, and every member gets an email. Seven days later everything in it is deleted for good: its projects, databases, files and servers, and then the organisation itself. Backups of its databases are removed seven days after that, as they are for any database you delete. Anyone who belongs to no other organisation loses their Dekka sign-in with it. Until that day any owner or admin can choose **Keep this organisation**, on the notice at the top of every page or in the same place in Settings, and what was stopped starts again. While an organisation is waiting to be deleted nothing new can be created, started or deployed in it, and those calls get 409 `organization_being_deleted`. ## See what changed **Activity** records every change to services, connections, variables, domains, keys and billing, with who made it and when. Invitations, role changes and removed members are recorded too, as are revealing a secret and running a database query. --- title: API keys description: Create an API key for scripts and CI, choose what it can do, and call the Dekka API with it. section: Account order: 3 updated: 2026-11-23 --- An API key lets a script or CI job use the [Dekka API](/docs/api) on your organisation's behalf. Keys start with `dk_` and are sent as a bearer token to `https://api.dekka.cloud/v1`. A CI job that only deploys one project is safer with a [project token](/docs/project-tokens), which can't reach anything outside that project. ## Create a key Open **Settings**, then **API keys**, and choose **Create key**. Give it a name that says where it's used, such as `github-actions`, choose its access, **Read only**, **Read and write** or **Admin**, and choose when it **Expires**: in 30 days, 90 days, a year or never. Dekka shows the key once and stores only a hash, so copy it before you close the dialog. Only admins can create keys, and only from the dashboard, so a key can never create another key. ## Which access should a key have? | Access | Lets the key | | --- | --- | | Read | See projects, services and logs | | Write | Create, deploy and change services | | Admin | Manage organisation settings | A key can never do more than the person who created it. A developer's key with **Admin** access still acts as a developer. ## Call the API ```bash tab="cURL" curl https://api.dekka.cloud/v1/me \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```ts tab="TypeScript" const res = await fetch("https://api.dekka.cloud/v1/me", { headers: { Authorization: `Bearer ${process.env.DEKKA_API_KEY}` }, }); const me = await res.json(); ``` ```python tab="Python" import os import httpx me = httpx.get( "https://api.dekka.cloud/v1/me", headers={"Authorization": f"Bearer {os.environ['DEKKA_API_KEY']}"}, ).json() ``` A key that is wrong, expired or revoked answers 401 `invalid_api_key`. Every error has the same shape, with a `request_id` to quote if you contact support: ```json { "error": { "code": "entitlement_exceeded", "message": "The Trial plan does not include custom domains. Upgrade to add one.", "details": { "entitlement": "custom_domains", "limit": 0, "current": 0, "requested": 1, "plan": "Trial" }, "request_id": "…" } } ``` ## Revoke a key Choose **Revoke** next to the key on the **API keys** page. It stops working straight away and leaves the list. --- title: Project tokens description: Create a token that reaches only one project, and deploy from GitHub Actions or another CI system with it. section: Account order: 4 updated: 2026-11-23 --- A project token is an [API key](/docs/api-keys) that reaches only one project, which makes it the safer choice for CI. It can use that project's services, deployments, environments and variables, and every other project and every organisation-level route answer it with 404. ## Create a token Open the project's **Settings** and choose **Create token** under **Project tokens**. Give it a name that says where it's used, such as `github-actions`, and leave **Can deploy and change settings** on for a token that deploys, or turn it off for one that only reads. Dekka shows the token once and stores only a hash, so copy it into your CI secrets, as `DEKKA_TOKEN` for the examples below, before you close the dialog. Only admins and owners can create project tokens, and an API key can't create one. A token made in the dashboard expires after 90 days unless you choose 30 days, a year or never under **Expires**, and you can revoke it whenever you stop using it. ## What can a token do? | Access | Acts as | Lets the token | | --- | --- | --- | | Read | Viewer | See the project's services, deployments, variables and logs | | Write | Developer | Deploy, and create and change services and variables | A token never does more than the person who created it can, and Dekka checks their role on every request. If that person becomes a viewer, their write tokens can only read, and if they leave the organisation their tokens are revoked. ## Find the service to deploy Deploying needs the ID of the service, which the API lists for the project. The project ID is in the dashboard's address after `/projects/`. ```bash curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/resources \ -H "Authorization: Bearer $DEKKA_TOKEN" | jq '.[] | {id, name, environment_id}' ``` ## Deploy from GitHub Actions This workflow runs the tests on every push to `main`, then deploys the commit that passed and waits until it's healthy. Save the token as a repository secret called `DEKKA_TOKEN` and the service ID as a variable called `DEKKA_SERVICE_ID`. ```yaml title=".github/workflows/deploy.yml" name: Deploy on: push: branches: [main] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: npm ci && npm test deploy: needs: test runs-on: ubuntu-latest timeout-minutes: 30 env: API: https://api.dekka.cloud/v1 DEKKA_TOKEN: ${{ secrets.DEKKA_TOKEN }} SERVICE_ID: ${{ vars.DEKKA_SERVICE_ID }} steps: - name: Deploy this commit run: | id=$(curl -sS --fail-with-body -X POST "$API/resources/$SERVICE_ID/deployments" \ -H "Authorization: Bearer $DEKKA_TOKEN" \ -H "Content-Type: application/json" \ -d "{\"commit_sha\": \"$GITHUB_SHA\"}" | jq -r .id) echo "Started deployment $id" while true; do status=$(curl -sS --fail-with-body "$API/deployments/$id" \ -H "Authorization: Bearer $DEKKA_TOKEN" | jq -r .status) case "$status" in healthy) echo "Deployment $id is healthy"; exit 0 ;; failed|cancelled|removed) echo "Deployment $id is $status"; exit 1 ;; esac sleep 10 done ``` `POST /v1/resources/{id}/deployments` takes an optional `branch` and `commit_sha`, and without them deploys the head of the service's branch. It returns the new deployment, whose `status` moves through the [deployment states](/docs/deployments#deployment-states) until it's `healthy` or `failed`. A newer deployment of the same service cancels this one, so the job fails with `cancelled` if someone deploys while it waits. > [!TIP] > Turn off **Deploy on push** in the service's settings when CI deploys it, or each push starts a deployment from GitHub as well as the one from your workflow. See [Deploying from GitHub](/docs/deploying-from-github#turn-off-deploys-on-push). ## Revoke a token Choose **Revoke** next to the token under **Project tokens**. It stops working straight away, and a request with it answers 401 `invalid_api_key`. --- title: Registry credentials description: Store a username and token for a private container registry so Dekka can pull your private images. section: Account order: 5 updated: 2026-11-04 --- A registry credential is a username and password or token that Dekka uses to pull [private images](/docs/docker-images#deploy-a-private-image) from one registry, such as GitHub Container Registry. Credentials belong to the organisation, so any project in it can use them. ## Add a credential Open **Settings**, then **Registries**, choose **Add credential**, and fill in a **Name**, the **Registry** host, your **Username** and a **Token or password**. Enter the host only, such as `ghcr.io`, `docker.io` or `registry.gitlab.com`. Use an access token with read-only access to packages where your registry offers one. ```bash tab="cURL" curl https://api.dekka.cloud/v1/orgs/$ORG_ID/registry-credentials \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "name": "GitHub packages", "registry": "ghcr.io", "username": "acme-bot", "password": "ghp_…" }' ``` Dekka encrypts the token and never shows it again. The list shows the last four characters so you can tell credentials apart, and the response's `id` is what a service's `registry_credential_id` takes. ## Delete a credential Delete it from the **Registries** page. While any service's image source still names it, Dekka refuses with 409 `registry_credential_in_use`, so point those services at another credential first. --- title: Plans, billing and usage description: Change plans, pay with a card or mobile money through Paystack, understand metered usage and invoices, and set spending alerts and a spend limit. section: Account order: 6 updated: 2026-12-03 --- Every organisation starts with a seven-day trial, with no card needed, and then needs Starter or Growth, paid monthly in Ghana cedis. The **Billing** page shows your plan, what this period will cost, how you pay and every invoice, and **Usage** shows how much of each limit you've used. > [!NOTE] > Dekka's prices are a pilot hypothesis that we're still testing against the cost of running it, and they may change before paid plans open more widely. If they change, a subscription keeps the version of its plan it started on. ## What do the plans cost? | Plan | Price | For | | --- | --- | --- | | Starter | GHS 199 a month | One product with its database, storage and a custom domain | | Growth | GHS 399 a month | Small teams running several services | [Plans and limits](/docs/limits) lists what each plan includes. If you need more than Growth includes, [talk to us](mailto:hello@dekka.cloud?subject=A%20plan%20for%20more%20than%20Growth). ## How does the trial work? A new organisation has the trial's limits, the smallest in [Plans and limits](/docs/limits), for seven days. Its owners and admins get an email two days before the trial ends. When the trial ends without a plan, the organisation is locked. Its services and servers stop, and Dekka refuses anything new with 402 `plan_required`. Its data is kept for seven more days, with another email two days before the end, and then every service, database, bucket and project in it is deleted. Your account and the organisation stay, so you can choose a plan and start again. Choosing a plan while the organisation is locked starts again everything the lock stopped. ## Upgrade your plan On **Billing**, choose **Change plan**, then **Upgrade to Starter** or **Upgrade to Growth**. Paystack's checkout opens, where you can pay with a card or a mobile money wallet. Once Paystack confirms the payment, the new limits apply straight away, a new monthly period starts that day, and the full monthly price is charged then. While card payments are switched off in the dashboard, **Choose a plan** asks us for an invoice instead. We send one in cedis, and once it's paid we set your plan, which ends the trial or the lock. Asking for a plan also keeps a locked organisation's data until then. A card you pay with is saved, and the default one is charged at each renewal. If you have more than one saved, choose the default under **How you pay**. Mobile money is approved on your phone each time, so a plan paid with it is paid for a month at a time. Dekka emails the owners and admins three days before the month ends, and **Pay for next month** on the **Billing** page takes the payment. Paying for the next month with a card makes the plan renew by itself from then on. Changes to the plan and to how you pay need you signed in to the dashboard, and an API key gets 403 `session_required`. ## Downgrade or cancel Choosing **Move to Starter** from Growth schedules the change for the end of the current period, so you keep what you paid for until then. **Cancel plan** ends the plan with the period, after which the organisation is locked as an ended trial is, and **Keep Starter** or **Keep Growth** undoes a cancellation before the period ends. Moving to a smaller plan never stops or deletes what you already run, but you can't create anything that would go past the smaller plan's limits. ## How does metered usage work? Dekka measures build minutes, Redis memory and volume size as they're used, and each plan includes an amount of each every period. On Starter and Growth, use beyond the included amount is billed on the next invoice, and on the trial the included amount is a limit. | Meter | Measured as | Price beyond what's included | | --- | --- | --- | | Redis | GB-hours of Redis memory | GHS 0.05 a GB-hour | | Volumes | GB-hours of volume size | GHS 0.002 a GB-hour | | Build minutes | Minutes spent building from GitHub | GHS 0.05 a minute | [Virtual servers](/docs/virtual-servers#how-is-a-server-billed) are paid for on their own, a month ahead at their size's price, so they don't count toward the estimate below. Servers billed by the hour, from before 3 December 2026, still do. Redis and volumes are measured every hour from what is allocated, and each plan includes its Redis memory and volume allowance for a 730-hour month, so staying within your allowance costs nothing extra. On the trial, Dekka refuses a new build once its build minutes are used. Object storage beyond the plan's allowance is metered at GHS 1.50 a GB-month and outbound traffic from your services at GHS 1.00 a GB, both from what the engine reports each hour. Traffic to and from a bucket is free, and so are requests to it. The **Billing** page shows this period's usage and an estimate of the next invoice, and [How pricing works](/docs/pricing) covers the prices the dashboard's estimates use. ## Set spending alerts and a limit Under **Spending alerts and limit** on the **Billing** page, add each amount you want an email at under **Email me when usage reaches**, set a **Hard limit** if you want one, and choose **Save**. Owners and admins can change these, and an organisation can have up to 10 alerts. To remove the limit, clear the field and save. Alerts and the limit are compared with this period's estimated usage charges, which is what server hours and metered use beyond your plan's allowances add to the next invoice, without the plan's own price. The page shows the current estimate, which uses the same pilot prices as the table above. Each alert emails the organisation's owners and admins once a period, the first time the estimate reaches it, and reaching the hard limit sends one more email. ## What happens at the spend limit? Once the estimate reaches the hard limit, Dekka refuses anything that would add to the bill with 403 `spend_limit_reached`. That covers creating a service, database, bucket or virtual server, every deployment including redeploys and rollbacks, starting a stopped service, giving a service more memory, vCPU or replicas, giving a database more storage or Redis more memory, adding volume space, and metered use. Services that are running keep running, so the Redis memory and volumes they already have go on being measured and the estimate can still pass the limit. Raising or removing the limit lets you carry on straight away, and otherwise the limit lifts when the next period starts. The error's `details` hold the `limit_minor` and `estimate_minor` in pesewas, the `currency` and the `period_end`. ## Choose which emails you get Dekka emails the owners and admins of an organisation when a usage alert or the spend limit is reached, and emails them and the person who started a deployment when it fails. Each person can turn either email off for every organisation they belong to under **Settings**, then **Account**, in **Email notifications**, where the switches are **Failed deploys** and **Usage alerts**. Both are on until you turn them off. ## Invoices Each paid month has two invoices. The plan's invoice is issued, already paid, when Paystack's renewal payment arrives, and usage beyond the plan, with any server hours, has its own invoice when the period closes, charged to your default card. With no card saved, the invoice stays **Due**, the owners and admins are emailed, and **Pay this invoice** under it takes the payment. Download any invoice from **Invoices**. Under **Invoice details**, set the billing email, company name, address and your Ghana TIN, and they appear on later invoices. Paystack treats everyone who pays with one email address as one customer, so each organisation needs its own billing email. If you pay for two organisations, give the second a different billing email before upgrading it, or the upgrade answers 409 `billing_email_in_use`. ## What if a payment fails? If a renewal isn't paid within three days of a new period starting, whether a card was declined or a month paid by hand wasn't paid for, the plan is marked **Payment overdue** and the owners and admins are emailed. **Pay now** on the **Billing** page clears it with a card or mobile money. If it's still unpaid seven days later, the organisation is locked as an ended trial is, and its data is deleted seven days after that. --- title: How pricing works description: What a plan includes, how PostgreSQL, Redis, object storage and virtual servers are priced, how the dashboard's estimates are worked out, and what goes on being charged while something is stopped. section: Account order: 7 updated: 2026-11-06 --- Every dialog that creates or resizes something, and every template, Compose and staged-changes review, shows an estimate of what it adds to your monthly bill. Estimates use the same pilot prices as the [pricing page](/pricing), in Ghana cedis before tax, and we give at least 7 days' notice before a price changes. > [!NOTE] > Invoices don't use the PostgreSQL, Redis and object storage prices on this page yet. Until they do, PostgreSQL is limited to the storage your plan includes, Redis memory beyond your plan is metered at GHS 0.05 a GB-hour, and buckets are metered at GHS 1.50 a GB-month with no charge for their traffic or requests, as [Plans, billing and usage](/docs/billing) describes. We'll give at least 7 days' notice before invoices move to these prices. ## What does a plan include? Applications, workers and scheduled jobs run on your plan, so their compute is included within the plan's memory, vCPU and replica limits for each service and isn't charged by the hour. Each plan also includes an amount of PostgreSQL storage, Redis memory, object storage, volume space, queues, build minutes and outbound traffic, which [Plans and limits](/docs/limits) lists. On Starter and Growth, build minutes and outbound traffic beyond the allowance are charged as used, at GHS 0.05 a minute and GHS 1.00 a GB. ## How are PostgreSQL and Redis priced? A database that fits in what your plan still has free costs nothing extra. One that doesn't is priced on its own at its tier, which you can choose when you create it. A database created with a size of your own is priced at the smallest tier that holds both its memory and its storage, and one larger than every tier is priced on request. | PostgreSQL | Memory | Storage | Monthly | | --- | --- | --- | --- | | Seed | 512 MiB | 5 GB | GHS 99 | | Core | 1 GiB | 10 GB | GHS 189 | | Forge | 2 GiB | 25 GB | GHS 369 | | Atlas | 4 GiB | 50 GB | GHS 679 | | Redis | Memory | Monthly | | --- | --- | --- | | Seed | 256 MiB | GHS 69 | | Core | 512 MiB | GHS 129 | | Forge | 1 GiB | GHS 229 | Through the API, create a database at a tier by sending its id as `spec.sku`, such as `postgres-core-v1`, and Dekka fills in the memory and storage. `GET /v1/catalog/prices` lists every tier id. A tier id never changes meaning, so a new price or size arrives as a new id such as `postgres-core-v2`. ## How is object storage priced? Storage within your plan's allowance is included. Beyond it, storage is charged by the GB-month at graduated rates, so each rate applies only to the gigabytes within its band: GHS 2.00 for the first 100 GB, GHS 1.75 for the next 400 GB and GHS 1.50 beyond 500 GB, with a GHS 49 monthly minimum. That makes 250 GB come to GHS 462.50 a month. Traffic to and from a bucket is free, and so are requests, so what a bucket stores is all it costs. ## How are virtual servers priced? A server is billed by the hour at its size's monthly price divided by 730, from when the host allocates it until it's deleted. [Virtual servers](/docs/virtual-servers) covers the sizes and the [pricing page](/pricing) lists their prices. ## What is charged while something is stopped? | Resource | Charged while stopped | Why | | --- | --- | --- | | Applications, workers and scheduled jobs | No | A stopped service runs no containers, so its compute isn't charged. | | Volumes | Yes | A volume keeps its data while its service is stopped. | | PostgreSQL | Yes | A stopped database keeps its storage and its place on the host. | | Redis | No | A stopped Redis releases its memory. | | Object storage | Yes | A bucket is never stopped, and what it stores is charged until it's deleted. | | Virtual servers | Yes | A stopped server keeps its disk and its reserved share of the host. | Deleting a resource is the only way to stop the charges that go on while it's stopped. ## How is an estimate worked out? An estimate gives the monthly equivalent of a 730-hour month, with a line for each part and whether your plan already covers it. A resize shows today's price beside the new one and the change between them, and a template, Compose file or set of staged changes is priced as a whole, in the order it would be deployed, so the second database in a plan is priced once the first has used your allowance. Charges that depend on how much you use, such as outbound traffic, requests and build minutes beyond the allowance, are listed with their prices and left out of the figure, because Dekka doesn't guess your traffic. Through the API, `POST /v1/estimates` takes a resource's kind and spec, a resource id and its proposed settings, or a changeset id, and returns the same estimate the dashboard shows. --- title: Security description: How Dekka protects your account, your secrets and your workloads, and how to report a problem. section: Trust order: 1 updated: 2026-11-04 --- ## Accounts - Dekka has no passwords to steal or reuse. You sign in with a single-use email link that expires after 15 minutes, with GitHub or Google, or with a passkey. - Your session lives in an HttpOnly cookie pinned to the dashboard's own origin, so code deployed on `apps.dekka.cloud` can't read it. A session ends after three days without use and after 30 days in any case, and you can sign out other sessions from **Settings**. - Someone outside your organisation gets 404 for anything in it, and members only get what their [role](/docs/organisations#what-can-each-role-do) allows. ## Secrets and keys - Variables, connection credentials, registry tokens and staged variable values are encrypted at rest with AES-256-GCM. - Secret values stay hidden in the dashboard and out of logs, each reveal is recorded, and sealed values are never shown again to anyone. - API keys are stored as hashes and shown once. Each has scopes, can expire and can be revoked, and can never do more than the person who created it. - Every change to services, connections, variables, domains, keys and billing is recorded in your organisation's **Activity**. ## Workloads and data - The dashboard and API never run infrastructure commands themselves. A separate engine does, through an authenticated, versioned interface, and its reports back to Dekka are signed. - Databases and buckets can't be reached from the internet unless you turn on a database's [TCP proxy](/docs/tcp-proxy), and every connected service gets its own credentials. - Each service runs with the memory and vCPU limits in its settings. - Webhooks from GitHub and Paystack are checked against their signatures before Dekka acts on them. - HTTP request logs keep a salted hash of each client's IP address, never the address itself, and database queries run from the dashboard are read-only and recorded without their text. [Where your data lives](/data-location) explains which parts of the platform run in Ghana and what has been independently verified. ## Report a problem Email [security@dekka.cloud](mailto:security@dekka.cloud), and we'll acknowledge it within two working days. --- title: Plans and limits description: What each plan includes, how Dekka counts usage against it, and what happens when you reach a limit. section: Trust order: 2 updated: 2026-11-23 --- Each organisation's plan sets how much it can create and use. **Usage** in the dashboard shows where you stand, and [Plans, billing and usage](/docs/billing) covers prices and changing plans. ## What does each plan include? | Limit | Trial | Starter | Growth | | --- | --- | --- | --- | | Projects | 1 | 3 | 10 | | Environments per project | 1 | 3 | 10 | | Active services | 1 | 3 | 8 | | Memory per service | 512 MiB | 1 GiB | 2 GiB | | vCPU per service | 0.5 | 1 | 2 | | Replicas per service | 1 | 2 | 4 | | PostgreSQL storage | 100 MiB | 1 GiB | 5 GiB | | Redis memory | 256 MiB | 1 GiB | 4 GiB | | Object storage | 250 MiB | 2 GiB | 10 GiB | | Queues | 1 | 5 | 20 | | Volumes | 1 GB | 20 GB | 100 GB | | Build minutes a month | 100 | 300 | 1,000 | | Outbound traffic a month | 5 GB | 50 GB | 200 GB | | Virtual servers | None | 1 | 3 | | Custom domains | No | Yes | Yes | | Team members | 1 | 1 | 3 | | Support | Documentation | Standard | Priority | ## How does Dekka count usage? Active services are web services, workers and cron jobs that aren't stopped, so stopping one frees its slot. Databases and buckets don't count as services and are limited by their storage and memory allowances instead, which add up across every environment and project. Every queue that isn't deleted counts towards the queue limit. Memory, vCPU and replicas are limits for each service, and each copy in a forked environment counts in full. ## What happens at a limit? Dekka refuses whatever would take you past the limit with 403 `entitlement_exceeded`, and the message names the limit, such as "The Trial plan includes 1 active service. Stop or delete one first." The error's `details` hold the `entitlement`, the `limit`, what you use now as `current`, what you asked for as `requested`, and the `plan`. Dekka never stops or deletes something you already run because of a limit, including after a downgrade. A limit also applies to staged changes and to settings in a [config file](/docs/config-as-code), where going over it fails the deployment and leaves the serving release in place. ## What happens when build minutes run out? On the trial, builds from GitHub are refused once its build minutes are used, while image deploys and rollbacks keep working because they don't build. On Starter and Growth, builds carry on and the minutes beyond the allowance are [billed](/docs/billing#how-does-metered-usage-work). --- title: Dekka Sentry description: An always-on watch over a project's services that tells you when something looks wrong, before you would have noticed. section: Trust order: 2.5 updated: 2026-12-03 --- Dekka Sentry watches a project's apps, services and virtual servers all the time and tells you when something looks wrong, such as a secret file served to a visitor, someone guessing passwords, an access key printed in your logs or a coin miner on a server. Most teams learn they are under attack long after it began, and Sentry is there so that you hear while it is happening. It reports what it finds and changes nothing. It never stops a service and never turns on [lockdown mode](/docs/lockdown-mode), because that decision is yours. ## What it does | Sentry watches | It tells you when | | --- | --- | | Every request to your apps | A file that should never be public, such as `.env`, is served to a visitor, one source fails to sign in again and again or gets in after failing, or one source works through paths or records one after another. | | Every line your services print | A secret such as an access key appears in the logs, or server errors surge with no deploy to explain them. | | Traffic, data sent out and CPU | Any of them is far from what is normal for that service at that hour. | | Your AI gateway keys | A key is used far more than is normal for it. | | Your virtual servers | A server sends far more to the internet than it usually does. With the agent installed, also a coin miner, a web server or database that starts a shell, a program run from a temporary folder, a new scheduled job or key for root, a new listening port, or root signing in a new way. | What it finds is listed on the project's **Sentry** page as a short note in plain words, like this one. > **A file that should never be public was served** > > web served /.env to a visitor. Treat every secret in that file as known to them, change those secrets now, and stop the file being served. Beside the note are the service, how often it was seen and when, and the address of the source so that you can block it. A serious finding also emails everyone in the organisation at once. ## What raises a finding Once you turn it on for a project, Sentry reads every request sent to the project's services and every line they print, as they run, for as long as they run. It looks for these: - A file that should never be public, such as `.env` or `.git/config`, being served to a visitor. This is serious, and it emails everyone at once. - Many failed sign-ins from one source in a few minutes, which is what guessing passwords looks like, and a sign-in that works after ten or more failures from the same source, which is what a guessed password looks like. - One source asking for dozens of paths that don't exist, or reading dozens of records of one kind one after another. - One source sending request after request that carries an attack string, such as a path that climbs out of its folder or a piece of SQL, and one source that keeps probing a service for hours, changing what it tries. Sentry is told which kinds of attack string a request carried and never the strings, since the query string of a request is not kept. - A script your app serves changing size with nothing deployed, which is what a card skimmer added to a real script looks like. An app's code only changes when you deploy, so Sentry learns what each script weighs after a deploy and tells you when one changes in between. - A server-side script, such as a `.php` file or a file in a hidden folder, answering where none answered before, which is what an uploaded web shell looks like. - A surge of server errors that no deploy explains. - A secret, such as an access key, printed in a service's own logs. After a week of a service's traffic, Sentry also knows what is normal for it at each hour of the day, and tells you about what isn't: - Far more traffic than usual that lasts a quarter of an hour. - A jump in how much a service sends out. - CPU held high for half an hour with no traffic to explain it. - A virtual server sending far more to the internet than it usually does. - An AI gateway key making far more requests than is usual for it, which is what a stolen key looks like. Sentry reads how many requests a key made and what they cost, and never a prompt or an answer. These compare with a service's own past, so a busy day can set them off, and none of them is serious by itself. ## What normal means Normal is never fixed, because a service that is a week old is not the service it will be in a year. - **It keeps learning.** What is normal for a service at an hour is mostly its last two weeks at that hour, so a service that grows is followed. - **It learns your week.** Once it has four weeks, each hour of each weekday has a normal of its own, so a market day that is busy every week stops being told. - **A level that holds becomes normal.** Traffic far above normal is told when it starts. If it is still there a day later it is what the service now does, and Sentry takes it up as the new normal. A launch is told once. - **A short burst doesn't.** An hour's flood is left out of what is learned, so the same flood tomorrow is as far from normal as it was today. - **A server's past fades.** A program or a port the agent hasn't seen for 45 days is forgotten, so something that ran once while you were setting the server up is new again if it comes back. A scheduled job or a key that is taken away and put back is told again. Turning Sentry on while a project is still being built is fine. What it learns in those first days is replaced as the project changes. ## Signs that point the same way One finding is often nothing: a source that failed to sign in, a new program on a server. Sentry also reads a project's open findings together. Each sits at a stage of a break-in, which are looking for a way in, getting in, running things, staying, and taking data. When findings at two or more stages are open at once and recent, Sentry raises one serious finding that names them, so that two warnings an hour apart on different services are read as one event. A finding counts for half as much twelve hours after it was last seen, so yesterday's doesn't carry today's. Scanners ask every public site for the same handful of paths all day. Sentry counts those requests and shows you the number, and it doesn't raise them as findings, so the findings you do get are worth reading. ## It reads no personal details Everything Sentry reads passes through [Veil](/docs/ai-veil) first, so phone numbers, email addresses, Ghana Card numbers and credentials are replaced before any rule sees them. If Veil can't be reached, Sentry reads nothing and waits, and its page says so. The few lines a finding keeps as evidence are also checked for people's names before they are stored. There is one exception, and it is for you. When a source trips a rule, the finding shows that source's address so that you can block it. Addresses are kept for a day, and no other visitor's address is ever shown. Dekka's own team sees that a finding was raised, on which project and service, and which rule raised it. They see none of what Sentry read: no path, no source address and no line of your logs. When a finding looks urgent they can email your owners and admins to ask you to look, and that email is sent to you, with what Sentry found, without anyone at Dekka reading it. ## Turn it on Open **Sentry** in the project's sidebar and choose **Turn on Dekka Sentry**. It needs an owner or an admin, and it comes with the Starter and Growth plans. ```bash tab="cURL" curl -X PUT https://api.dekka.cloud/v1/projects/$PROJECT_ID/sentry \ -H "Authorization: Bearer $DEKKA_API_KEY" \ -H "Content-Type: application/json" \ -d '{"enabled": true}' ``` An API key can turn Sentry on. Turning it off, closing a finding or marking one as expected needs a person signed in to the dashboard, so a key an intruder has taken can't silence it. ## Inside a virtual server Sentry sees a virtual server's traffic from outside and nothing of what runs inside it. To have that watched too, install the Sentry agent. On a new server, tick **Install the Dekka Sentry agent** when you create it, and the agent is installed when the server first starts and again whenever it is rebuilt. On a server you already have, choose **Install the agent** beside it on the project's Sentry page, and run the command it gives you on the server. The code in the command works once, for an hour. Once a minute the agent reports the programs that ran and which program started each, the ports that are listening, where programs connected out to, who signed in over SSH, and what is set to start by itself. The server's kernel tells the agent each time a program starts, so a command that lived for a millisecond is still reported. From that, Sentry tells you about: - A coin miner, which is serious at once. - A web server, a cache or a database that starts a shell or fetches a file, and an app that starts a shell it never started before. - A service account running `whoami`, `id` or the like, which is the first thing an attacker runs to see whether a command got through. - A service account starting many programs it never started before inside a minute, which is what an attack run by a program looks like. - A web server, a cache or a database connecting out to the internet, or a service account fetching from it, with the address it reached. - A program running from a temporary folder, or one whose file has been deleted. - A new or changed scheduled job, start-up script or service that starts with the server, a new key that can sign in as root, a new account, and a program newly given the setuid bit. - A program or a listening port the agent has not seen before, which is a warning when the program also holds the CPU. It also tells you when root signs in with a password or with a key not used before, when failed SSH sign-ins flood in, and when the agent itself goes quiet while the server runs, since stopping it is an intruder's first move. The agent sends a program's path and never its arguments, because arguments carry secrets. Of scheduled jobs, start-up scripts, services and accounts it sends names and a hash of the contents, never the contents, and of root's keys it sends fingerprints. It takes no commands from Dekka and opens no port. It runs as root with two privileges kept. One lets it see other users' programs, which is close to root's own view of what is running. The other lets the kernel tell it each time a program starts, and the agent uses it for nothing else. It cannot write to the disk. The install script is short and worth reading before you run it, and `sudo dekka-sentry show` prints exactly what the agent would send, without sending it. To take it off, run `sudo dekka-sentry uninstall` on the server and choose **Remove** on the Sentry page. ## How you're told A serious finding emails every member of the organisation at once, at most once an hour for a project. Everything else waits in the dashboard, where the **Sentry** button in the top bar shows how many findings are open, and goes out in one summary email a day. To send serious findings to your own systems, add `sentry.finding` to the events of a project webhook. The event names the rule and the service and carries none of what Sentry read. ## What to do with a finding Each finding says what was seen, on which service, how often and when. From there you can: - **Turn on lockdown mode**, offered on a serious finding, if you think someone is inside. It closes the project to everything outside while you fix it. - **Block this source**, offered on a finding that names one, refuses every request from that address to the project's web services. See [Block a source](/docs/traffic-controls#block-a-source). - **Close** the finding once you've dealt with it. If the same thing happens again, it's a new finding. - Choose **This is expected** for something you caused yourself, such as a load test. Sentry then stays quiet about that source or path for thirty days, and speaks again after that. A finding nothing has added to for a day closes by itself. --- title: Lockdown mode description: Close a project to the internet in one press when you think you're under attack, and show a maintenance page while you fix things. section: Trust order: 3 updated: 2026-11-30 --- Lockdown mode is for the moment you think someone is inside your systems. One press cuts everything outside off from a project, so an intruder is thrown out and can do nothing more, and your public addresses show a maintenance page while you work on the fix. ## What lockdown mode does When you turn it on for a project, Dekka does six things in every environment of that project: - Every public address shows your maintenance page, with the status 503 so that search engines and monitors read it as a temporary closure. - Nothing outside the environment reaches its services, and a database or cache with a [public TCP proxy](/docs/tcp-proxy) stops accepting connections through it. - Each service is restarted once. A connection that was already open would otherwise stay open, so the restart is what drops it. - The [firewall](/docs/virtual-servers) of your virtual servers closes to everything outside, except SSH from the addresses you list, and every connection that's open to or from a server ends at once. An SSH session from a listed address ends too, and you sign in again. The rules you had come back when you lift lockdown mode. - Each [object storage](/docs/object-storage) bucket and [queue](/docs/queues) gets new keys. They're reached with their own keys from anywhere, so a new key is what shuts out someone who took the old one. The apps connected to them restart with the new keys, and the old keys stop working for good. The keys you made for a bucket itself are revoked, and every link to a file that was made before stops working. - Every member of your organisation is emailed, and Dekka's own team is told, so we know you may need help. Everything keeps running inside. Your services still reach their databases, caches and object storage, so you can read logs, look at metrics and deploy a fix. A deploy during lockdown mode stays closed, and an address you add shows the maintenance page too. ## Turn it on Choose **Lockdown** in the top bar of the dashboard. Inside a project you can lock down that project or every project in your organisation, and anywhere else the button locks down every project. Under **SSH to your virtual servers**, list the addresses that may still open SSH, such as your office's address, or leave it empty to close SSH to everyone. The serial console in the dashboard works either way. Tick **Also reboot virtual servers** if you think someone left a program running on one. Their connection ends either way, and a reboot stops what they started, unless they set it to start with the server. Tick **Also block outbound traffic** if you think code that an intruder left behind is sending data out. Your services then stop reaching the internet, which also stops payment and SMS providers until you lift lockdown mode. Only an owner or an admin can turn lockdown mode on, and an API key with admin access can too, so you can script it. The button turns solid and a notice appears on every page of the project, with each environment listed as Dekka closes it. ```bash tab="cURL" curl -X POST https://api.dekka.cloud/v1/projects/$PROJECT_ID/lockdown \ -H "Authorization: Bearer $DEKKA_API_KEY" \ -H "Content-Type: application/json" \ -d '{"block_outbound": false, "ssh_allow": ["203.0.113.7"], "reboot_servers": true}' ``` To lock down every project at once, send the same body to `/v1/orgs/$ORG_ID/lockdown`. ## Lift it Choose **Lockdown on** in the top bar, then **Lift** beside the project. Its addresses reach its services again within seconds, and nothing is restarted. Lift it once you're sure the project is safe to open. Lifting needs a person signed in to the dashboard. An API key can't lift lockdown mode or loosen one that's on, so a key an intruder has taken can't open what you closed. ## When Dekka turns it on Dekka's team can put a project into lockdown mode themselves. They do it when a project is harming the platform or other customers, or when it is being broken into and nobody in the organisation can be reached. Everyone in the organisation is emailed at once that Dekka's team did this. A lockdown that Dekka's team holds can only be lifted by them, and its settings can't be loosened. The project's lockdown dialog says so. Open a request under **Support** in your dashboard, and once the cause is dealt with they lift it. ## Set your maintenance page Open the project's **Settings** and find **Maintenance page**. You can keep Dekka's page, put your own title, message and logo on it, or paste a page of your own HTML. The preview beside it is the page exactly as a visitor is sent it, and a project that is already in lockdown mode shows a new page at once. A page of your own is served with a policy that runs no script and loads nothing but images and inline styles, so set its styles inline and load images over HTTPS. ## While you're in lockdown mode - Make a new key for anything outside Dekka that used one of a bucket's own keys, under the bucket's **Settings**. - Give the new bucket and queue keys to anything of yours outside Dekka that used the old ones. They're in the variables of each connected service, and lifting lockdown mode doesn't bring the old keys back. - Rotate the other credentials an intruder may have seen: [database passwords](/docs/postgresql#rotate-credentials), [API keys](/docs/api-keys) and the secrets in your [environment variables](/docs/environment-variables). - Read the [logs](/docs/logs) from before you locked down to find how they got in. - Reboot a virtual server you think someone left a program running on, if you didn't tick the box when you locked down, and rebuild one you can no longer trust. - Deploy the fix. It runs behind the closed door until you lift lockdown mode. - Write to [security@dekka.cloud](mailto:security@dekka.cloud) if you want our help. --- title: Troubleshooting description: Fixes for failed builds, deploys stuck on Starting, reference and DNS errors, plan and spend limits, invitations and the other errors people hit most. section: Help order: 1 updated: 2026-11-04 --- Every error from the Dekka API has a `code`, a message and a `request_id`, and the dashboard shows the message. The sections below are named after what you'll see. ## My build failed Open the deployment and choose **Jump to first error**. A deployment that fails with `build_failed` usually has a missing lockfile, a build command that only works on your machine, or the wrong **Root directory** in a monorepo. Set the build and start commands yourself or switch the builder to **Dockerfile** in [build settings](/docs/build-configuration), and remember that a `dekka.toml` or `dekka.json` in the repository overrides the dashboard. A deployment that fails with `invalid_config` before it builds has a problem in its config file, and the message names the setting. [Config as code](/docs/config-as-code#what-if-the-file-is-wrong) lists the usual causes. ## My deploy is stuck on Starting or failed its health check Dekka is waiting for the health check, and `health_check_failed` means it gave up. Check that your service: - listens on `0.0.0.0` rather than `localhost`, - listens on the port in its settings, which it also receives as `PORT`, and - returns a 2xx on the health check path within the timeout, which is 30 seconds unless you changed it. The release that was serving before keeps serving while you fix it. ## "Some references do not match a service or variable in this environment" This is 422 `unknown_reference`. A value contains `${{name.KEY}}` where no service in the environment is called `name`, the service has no variable `KEY`, or the reference is malformed. The error's `details.references` lists each one with a `reason` of `unknown_service`, `unknown_variable` or `malformed`. References only reach services in the same environment, and shared variables are written `${{shared.KEY}}`. If a deploy or restart fails with `unknown_reference`, `reference_cycle` or `reference_too_deep`, a reference that used to work has broken, two values refer to each other, or references nest more than ten levels deep. The message names the chain. ## My custom domain says "DNS doesn't match" Dekka couldn't find the TXT record at `_dekka-challenge.` with the value it showed you. Many DNS providers add your domain to the end of the name you type, so enter `_dekka-challenge.shop` rather than `_dekka-challenge.shop.example.com` for `shop.example.com`, and check the record with `dig TXT _dekka-challenge.shop.example.com`. New records can take a few minutes to appear, and you can choose **Check DNS** again once they do. If the domain is verified but doesn't load, its CNAME doesn't point at the service's `apps.dekka.cloud` address yet, or its A record doesn't hold the address the dashboard shows. ## "entitlement_exceeded" You've reached a limit of your plan, and the message says which one. Stopping or deleting a service frees an active-service slot, and [Plans and limits](/docs/limits) lists every limit and how it's counted. To go further, change plan from **Billing**. ## "spend_limit_reached" This period's estimated usage charges have reached the organisation's hard spend limit, so Dekka refuses new services, deployments, scaling up and metered use until the next period starts. Services that are running keep running. An owner or admin can raise or remove the limit under **Spending alerts and limit** on the **Billing** page, and the error's `details` show the limit, the estimate and when the period ends. See [Plans, billing and usage](/docs/billing#what-happens-at-the-spend-limit). ## My invitation doesn't work `invitation_email_mismatch` means you're signed in with a different address from the one the invitation was sent to, so sign out and sign in with that address. `invalid_invitation` means the link expired, which happens after seven days, was revoked or was already used, and whoever invited you can send a new one from **Settings**, then **Organisation**. See [Organisations and members](/docs/organisations#accept-an-invitation). ## I can't sign in with GitHub `github_email_unverified` means your GitHub account has no verified primary email address, so Dekka can't match it to an account or create one. Sign in with an email link, then connect GitHub from **Settings**, then **Account**, and GitHub sign-in works from then on. `github_unavailable` means GitHub sign-in is turned off, so sign in with an email link, Google or a passkey. See [Signing in](/docs/sign-in). ## My service can't reach its database Check the line between them on the canvas. A dashed line means the connection is still being set up, and a red one means it failed, which you can select to retry. Then make sure your code reads `DATABASE_URL` or `REDIS_URL` rather than a hard-coded address. If connecting fails with `env_key_conflict`, the service already has a variable of its own with that name, so remove it and connect again. ## My private image won't pull `image_pull_unauthorized` means the registry turned the credential down, so check the token hasn't expired and can read the package. `registry_credential_mismatch` means the credential is for a different registry host from the image. See [Registry credentials](/docs/registry-credentials). ## The AI Gateway refused my request `model_not_found` means the model ID isn't in the catalogue or is no longer available, and `GET /v1/ai/models` lists the ones your key may use. `model_not_allowed` means the project's routing rules, or the AI Gateway node the service is connected to, don't allow that model. `spend_cap_reached` means the project has reached its monthly cap, which you can raise under **AI Gateway**, then **Routing**, or wait for the next calendar month. See [Routing rules](/docs/ai-routing). `provider_unavailable` means there is no key for the model's provider, so add your own under **AI Gateway**, then **Keys**. `provider_auth_failed` means the provider turned that key down, so check it hasn't been revoked at the provider and save it again. See [AI keys](/docs/ai-keys). `endpoint_unavailable` means you called a `private/` model in production, and the endpoint is on the waitlist until GPU capacity exists. Outside production the same request gets a simulated reply. See [GPU instances](/docs/gpu-instances#call-an-endpoint-through-the-ai-gateway). ## Other errors | Code | What to do | | --- | --- | | `branch_not_found` | The branch doesn't exist in the repository. Check its name in the service's settings. | | `confirmation_required` | Deleting a database or a queue, or restoring a backup, needs its name as `confirm`. | | `resource_has_connections` | Disconnect the services using a database, bucket or queue before deleting it. | | `kind_not_available` | That kind of resource can't be created yet. GPU instances are on the [waitlist](/docs/gpu-instances#join-the-waitlist). | | `volume_requires_single_replica` | Set **Replicas** to 1 before adding a volume. | | `project_not_empty` | Delete a project's services before deleting the project. | | `invalid_api_key` | The API key is wrong, expired or revoked. | | `last_owner` | An organisation needs at least one owner. Make someone else an owner before changing the role of the only owner or removing them. | | `already_member` | The address you invited already belongs to a member of the organisation. | | `server_not_stopped` | Stop a server before resizing it. | | `disk_shrink_not_supported` | A server's disk only grows, so choose a size with at least as much disk. | | `ssh_key_too_weak` | The RSA key has fewer than 2048 bits. Add an ed25519 key instead. | | `private_key_rejected` | Paste the public key from the `.pub` file, never the private key. | ## Still stuck? Email [support@dekka.cloud](mailto:support@dekka.cloud) with what you were doing and when, and the `request_id` if you have one from the API, which lets us find exactly what happened. # API reference Everything in the dashboard is available over HTTPS with JSON at `https://api.dekka.cloud/v1`. Create a key in Settings → API keys and send it as a bearer token. Keys start with `dk_`, are shown once, and are limited to the access you choose: read, write or admin. Every error has the same shape: a stable `code` you can branch on, a `message` you can show a person, and a `request_id` to quote if you contact us. ## Projects A project holds the services that make up one application, and it starts with a production environment. ### Get project `GET /v1/projects/{project_id}` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/projects/$PROJECT_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "organization_id": "ea0c329e-5e34-4b17-ae20-647660fd8b7c", "name": "api", "slug": "api", "description": null, "region_id": "f70c4715-5954-46e3-a5f6-94f25b2beb48", "service_count": 1, "status": "empty", "last_deployment": null, "environments": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "name": "api", "slug": "api", "is_default": false, "kind": "standard", "ephemeral": false, "status": "active", "forked_from_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ], "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ``` ### Update project `PATCH /v1/projects/{project_id}` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | | `name` | body | string | no | | | `description` | body | string | no | | ```bash curl -X PATCH https://api.dekka.cloud/v1/projects/$PROJECT_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "name": "api", "description": "string" }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "organization_id": "ea0c329e-5e34-4b17-ae20-647660fd8b7c", "name": "api", "slug": "api", "description": null, "region_id": "f70c4715-5954-46e3-a5f6-94f25b2beb48", "service_count": 1, "status": "empty", "last_deployment": null, "environments": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "name": "api", "slug": "api", "is_default": false, "kind": "standard", "ephemeral": false, "status": "active", "forked_from_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ], "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ``` ### Delete project `DELETE /v1/projects/{project_id}` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | ```bash curl -X DELETE https://api.dekka.cloud/v1/projects/$PROJECT_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```text 204 No Content ``` ### Create a project `POST /v1/orgs/{org_id}/projects` Creates a project with a production environment. The region defaults to the first one available. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | | `name` | body | string | yes | | | `description` | body | string | no | | | `region_id` | body | string | no | Defaults to the first available region | ```bash curl https://api.dekka.cloud/v1/orgs/$ORG/projects \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "name": "orders" }' ``` ```json { "id": "3f6c1d2e-8a4b-4f0e-9c71-5b2d8e4a6f10", "name": "orders", "slug": "orders", "service_count": 0, "environments": [{ "name": "production", "is_default": true }] } ``` ### List projects `GET /v1/orgs/{org_id}/projects` Returns every project in an organisation, newest first, with a summary of its services and last deployment. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/orgs/$ORG/projects \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "3f6c1d2e-8a4b-4f0e-9c71-5b2d8e4a6f10", "name": "orders", "service_count": 2, "status": "running" } ] ``` ## Environments Each environment is a separate copy of a project's services, with its own variables and deployments. ### Get environment `GET /v1/environments/{environment_id}` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `environment_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/environments/$ENVIRONMENT_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "name": "api", "slug": "api", "is_default": false, "kind": "standard", "ephemeral": false, "status": "active", "forked_from_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ``` ### Update environment `PATCH /v1/environments/{environment_id}` Renames the environment and its slug. DEKKA_ENVIRONMENT follows the new name from each service's next deploy. Private hostnames (`.internal..dekka.cloud`) carry no environment, so they stay. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `environment_id` | path | uuid | yes | | | `name` | body | string | yes | Lowercase letters, digits and dashes | ```bash curl -X PATCH https://api.dekka.cloud/v1/environments/$ENVIRONMENT_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "name": "api" }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "name": "api", "slug": "api", "is_default": false, "kind": "standard", "ephemeral": false, "status": "active", "forked_from_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ``` ### Delete environment `DELETE /v1/environments/{environment_id}` Starts deleting every resource in the environment, databases included, and marks it `deleting`. The environment disappears once the engine has deleted them all. The default environment cannot be deleted. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `environment_id` | path | uuid | yes | | ```bash curl -X DELETE https://api.dekka.cloud/v1/environments/$ENVIRONMENT_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "name": "api", "slug": "api", "is_default": false, "kind": "standard", "ephemeral": false, "status": "active", "forked_from_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ``` ### Create environment `POST /v1/projects/{project_id}/environments` Creates an empty environment, or forks one with `fork_from`. A fork queues the same provisioning, deployments and connection configuration a person would by hand, and each copy counts against the plan's limits. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | | `name` | body | string | yes | Lowercase letters, digits and dashes | | `fork_from` | body | uuid | no | Copy this environment's services, databases (empty, provisioned fresh), variables, shared variables and connections | ```bash curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/environments \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "name": "api" }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "name": "api", "slug": "api", "is_default": false, "kind": "standard", "ephemeral": false, "status": "active", "forked_from_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ``` ### Get environment firewall `GET /v1/environments/{environment_id}/firewall` The inbound rules on the environment's private network, which its KVM servers share. An environment gets the network with its first such server. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `environment_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/environments/$ENVIRONMENT_ID/firewall \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "has_network": false, "range": null, "rules": [ { "priority": 1, "action": "allow", "source": "string", "target": null, "protocol": null, "ports": null } ], "revision": 1 } ``` ### List environments `GET /v1/projects/{project_id}/environments` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/environments \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "name": "api", "slug": "api", "is_default": false, "kind": "standard", "ephemeral": false, "status": "active", "forked_from_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ] ``` ### Replace environment firewall `PUT /v1/environments/{environment_id}/firewall` Replaces every rule at once. The host takes the new rules within seconds. They judge new connections, and a connection that is already open is not cut. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `environment_id` | path | uuid | yes | | | `rules` | body | array of object | yes | | ```bash curl -X PUT https://api.dekka.cloud/v1/environments/$ENVIRONMENT_ID/firewall \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "rules": [ { "priority": 1, "action": "allow", "source": "string" } ] }' ``` ```json { "has_network": false, "range": null, "rules": [ { "priority": 1, "action": "allow", "source": "string", "target": null, "protocol": null, "ports": null } ], "revision": 1 } ``` ## Previews A preview is a temporary environment for one pull request, removed when the pull request closes. ### Get preview `GET /v1/previews/{preview_id}` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `preview_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/previews/$PREVIEW_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "environment_id": null, "repo_full_name": "acme/api", "pr_number": 1, "title": "string", "head_branch": "string", "head_sha": "string", "base_branch": "string", "status": "creating", "url": null, "error": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z", "closed_at": null } ``` ### Delete preview `DELETE /v1/previews/{preview_id}` Closes the preview and deletes its environment, as closing the pull request would. A later push to the pull request opens a new one. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `preview_id` | path | uuid | yes | | ```bash curl -X DELETE https://api.dekka.cloud/v1/previews/$PREVIEW_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "environment_id": null, "repo_full_name": "acme/api", "pr_number": 1, "title": "string", "head_branch": "string", "head_sha": "string", "base_branch": "string", "status": "creating", "url": null, "error": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z", "closed_at": null } ``` ### List previews `GET /v1/projects/{project_id}/previews` Pull request previews, newest first, closed ones included. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/previews \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "environment_id": null, "repo_full_name": "acme/api", "pr_number": 1, "title": "string", "head_branch": "string", "head_sha": "string", "base_branch": "string", "status": "creating", "url": null, "error": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z", "closed_at": null } ] ``` ## Services Applications, workers, databases, caches and buckets are all resources. Each one is created with a single request and configured through its spec. ### Retrieve a service `GET /v1/resources/{resource_id}` Returns a service with the state the engine last confirmed and any operation in progress. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/resources/8b0f3e52-6c1d-4f7a-9a8e-2d5b7c1e9f04 \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "8b0f3e52-6c1d-4f7a-9a8e-2d5b7c1e9f04", "status": "running", "hostname": "storefront-x2k4.apps.dekka.cloud", "active_operation": null } ``` ### Update a service `PATCH /v1/resources/{resource_id}` Renames, replaces the spec, changes an application's apps.dekka.cloud subdomain, or moves a service to another region. Spec changes apply on the next deploy; a subdomain change re-routes a running service at once. A schedule in the spec turns a service into a scheduled job and clearing it turns it back, which is audited as resource.kind_changed. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | | `name` | body | string | no | | | `subdomain` | body | string | no | Applications only. A new first part for the apps.dekka.cloud address, with the same rules as on creation. The service's slug restores the generated address. A running service is re-routed at once. | | `spec` | body | object | no | A full replacement spec. For services, setting runtime.cron_schedule makes it a scheduled_job and clearing it makes it an application (with a port) or a worker (without one). | | `region_id` | body | string | no | Services only. The service moves on its next deploy, and status_reason says so until then. | ```bash curl -X PATCH https://api.dekka.cloud/v1/resources/$RESOURCE_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "name": "api", "subdomain": "string", "spec": {} }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "environment_id": "e00c22e0-421a-471d-a890-ca4becee31f3", "kind": "application", "name": "api", "slug": "api", "region_id": "f70c4715-5954-46e3-a5f6-94f25b2beb48", "spec": { "source": { "provider": "github", "installation_id": null, "repo_id": null, "repo_full_name": "acme/api", "branch": "main", "root_dir": "/" }, "build": { "strategy": "railpack", "dockerfile_path": null, "dockerfile_context": ".", "dockerfile_target": null, "build_args": {}, "build_command": null, "start_command": null, "static_publish_dir": "dist", "spa_fallback": false, "buildpacks_builder": "heroku/builder:24", "watch_paths": [], "pre_deploy_command": null }, "runtime": { "port": null, "health_check_path": "/", "health_check_timeout_seconds": 30, "memory_mib": 256, "vcpu": 0.5, "replicas": 1, "restart_policy": "on_failure", "restart_max_retries": 10, "cron_schedule": null, "sleep_when_idle": false }, "networking": { "public_domain": true, "rate_limit": null }, "autodeploy": true, "previews": false }, "spec_version": 1, "generation": 1, "status": "pending", "status_reason": null, "observed": null, "active_operation": null, "hostname": null, "public_domain": null, "subdomain": null, "private_hostname": null, "next_runs": null, "tcp_proxy": null, "password_protection": null, "pending_settings": [ "string" ], "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ``` ### Delete a service `DELETE /v1/resources/{resource_id}` Starts deletion. Postgres needs `?confirm=`. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | | `confirm` | query | string | no | | ```bash curl -X DELETE https://api.dekka.cloud/v1/resources/$RESOURCE_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "environment_id": "e00c22e0-421a-471d-a890-ca4becee31f3", "kind": "application", "name": "api", "slug": "api", "region_id": "f70c4715-5954-46e3-a5f6-94f25b2beb48", "spec": { "source": { "provider": "github", "installation_id": null, "repo_id": null, "repo_full_name": "acme/api", "branch": "main", "root_dir": "/" }, "build": { "strategy": "railpack", "dockerfile_path": null, "dockerfile_context": ".", "dockerfile_target": null, "build_args": {}, "build_command": null, "start_command": null, "static_publish_dir": "dist", "spa_fallback": false, "buildpacks_builder": "heroku/builder:24", "watch_paths": [], "pre_deploy_command": null }, "runtime": { "port": null, "health_check_path": "/", "health_check_timeout_seconds": 30, "memory_mib": 256, "vcpu": 0.5, "replicas": 1, "restart_policy": "on_failure", "restart_max_retries": 10, "cron_schedule": null, "sleep_when_idle": false }, "networking": { "public_domain": true, "rate_limit": null }, "autodeploy": true, "previews": false }, "spec_version": 1, "generation": 1, "status": "pending", "status_reason": null, "observed": null, "active_operation": null, "hostname": null, "public_domain": null, "subdomain": null, "private_hostname": null, "next_runs": null, "tcp_proxy": null, "password_protection": null, "pending_settings": [ "string" ], "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ``` ### Create a service `POST /v1/projects/{project_id}/resources` Creates a service of any kind, in the project's default environment unless you name another. The spec depends on the kind, and the examples show an application built from GitHub and a PostgreSQL database. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | | `kind` | body | "application" \| "postgres" \| "redis" \| "queue" \| "object_storage" \| "worker" \| "scheduled_job" \| "virtual_machine" \| "ai_gateway_binding" \| "gpu_runtime" | yes | | | `name` | body | string | yes | Lowercase letters, digits and dashes | | `subdomain` | body | string | no | Applications only. The first part of the service's apps.dekka.cloud address, in place of the generated -. Lowercase letters, digits and hyphens, 3 to 40 characters, and free across the platform: GET /v1/domains/availability says whether it is. A label that is taken answers 409 subdomain_taken. | | `environment_id` | body | uuid | no | | | `region_id` | body | string | no | Defaults to the project's region | | `spec` | body | object | yes | | | `deploy` | body | boolean | no | For a service, start its first deployment straight away. Send false to set its variables first, then start it with POST /v1/resources/{id}/deployments, which records it as the first deploy. | ```bash curl https://api.dekka.cloud/v1/projects/3f6c1d2e-8a4b-4f0e-9c71-5b2d8e4a6f10/resources \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "kind": "application", "name": "storefront", "spec": { "source": { "repo_full_name": "acme/storefront", "branch": "main" } } }' ``` ```json { "id": "8b0f3e52-6c1d-4f7a-9a8e-2d5b7c1e9f04", "kind": "application", "name": "storefront", "status": "pending", "active_operation": { "type": "application.deploy", "state": "queued" } } ``` ```bash curl https://api.dekka.cloud/v1/projects/3f6c1d2e-8a4b-4f0e-9c71-5b2d8e4a6f10/resources \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "kind": "postgres", "name": "orders-db", "spec": { "version": "16" } }' ``` ```json { "id": "c41a7d09-3b2e-4e85-b7f1-6a0d9c2e5b31", "kind": "postgres", "name": "orders-db", "status": "pending" } ``` ### List services `GET /v1/projects/{project_id}/resources` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | | `environment_id` | query | uuid | no | | ```bash curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/resources \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "environment_id": "e00c22e0-421a-471d-a890-ca4becee31f3", "kind": "application", "name": "api", "slug": "api", "region_id": "f70c4715-5954-46e3-a5f6-94f25b2beb48", "spec": { "source": {}, "build": {}, "runtime": {}, "networking": {}, "autodeploy": true, "previews": false }, "spec_version": 1, "generation": 1, "status": "pending", "status_reason": null, "observed": null, "active_operation": null, "hostname": null, "public_domain": null, "subdomain": null, "private_hostname": null, "next_runs": null, "tcp_proxy": null, "password_protection": null, "pending_settings": [], "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ] ``` ### List where a service's data lives `GET /v1/resources/{resource_id}/data-locations` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/resources/$RESOURCE_ID/data-locations \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "category": "workload", "region_id": null, "region_name": null, "provider_id": null, "provider_name": null, "provider_ref": null, "verified": false, "source": "engine", "notes": null, "updated_at": "2026-11-04T09:30:00Z" } ] ``` ### Read HTTP request logs `GET /v1/resources/{resource_id}/http-logs` HTTP request logs for an application, read from the engine, oldest first after `after`. Poll with `after=next_after` for new requests. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | | `after` | query | integer | no | | | `limit` | query | integer | no | | | `status` | query | string | no | A code such as 404, or a class such as 5xx | | `path_prefix` | query | string | no | | ```bash curl https://api.dekka.cloud/v1/resources/$RESOURCE_ID/http-logs \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "lines": [ { "seq": 1, "ts": "2026-11-04T09:30:00Z", "method": "string", "path": "string", "status": 1, "duration_ms": 1, "bytes": 1, "client_ip_hash": "string" } ], "next_after": 1, "simulated": false, "engine_kind": "string" } ``` ### Read service logs `GET /v1/resources/{resource_id}/logs` Runtime logs, read from the engine. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | | `after` | query | integer | no | | | `limit` | query | integer | no | | ```bash curl https://api.dekka.cloud/v1/resources/$RESOURCE_ID/logs \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "lines": [ { "seq": 1, "ts": "2026-11-04T09:30:00Z", "stream": "string", "line": "string" } ], "next_after": 1 } ``` ### Read service metrics `GET /v1/resources/{resource_id}/metrics` Metrics from the engine over `window`. `simulated` is true when the engine is the mock. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | | `window` | query | "1h" \| "6h" \| "24h" \| "7d" | no | | ```bash curl https://api.dekka.cloud/v1/resources/$RESOURCE_ID/metrics \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "resource_id": "f70c4715-5954-46e3-a1f6-a7d6614a09ce", "simulated": false, "engine_kind": "string", "window": "1h", "step_seconds": null, "series": [ { "name": "api", "unit": "string", "points": [] } ] } ``` ### Set resource password `PUT /v1/resources/{resource_id}/password` Asks every visitor to an application's addresses for a password before the site loads, checked at the ingress before a request reaches the service. Setting it again replaces it. The password is stored hashed and never shown, and a running service gets it within a minute without a deploy. Only an application can have one (422 not_an_application). | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | | `username` | body | string | no | The name visitors give with the password | | `password` | body | string | yes | At least 8 characters. Stored hashed, shown never | ```bash curl -X PUT https://api.dekka.cloud/v1/resources/$RESOURCE_ID/password \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "password": "string" }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "environment_id": "e00c22e0-421a-471d-a890-ca4becee31f3", "kind": "application", "name": "api", "slug": "api", "region_id": "f70c4715-5954-46e3-a5f6-94f25b2beb48", "spec": { "source": { "provider": "github", "installation_id": null, "repo_id": null, "repo_full_name": "acme/api", "branch": "main", "root_dir": "/" }, "build": { "strategy": "railpack", "dockerfile_path": null, "dockerfile_context": ".", "dockerfile_target": null, "build_args": {}, "build_command": null, "start_command": null, "static_publish_dir": "dist", "spa_fallback": false, "buildpacks_builder": "heroku/builder:24", "watch_paths": [], "pre_deploy_command": null }, "runtime": { "port": null, "health_check_path": "/", "health_check_timeout_seconds": 30, "memory_mib": 256, "vcpu": 0.5, "replicas": 1, "restart_policy": "on_failure", "restart_max_retries": 10, "cron_schedule": null, "sleep_when_idle": false }, "networking": { "public_domain": true, "rate_limit": null }, "autodeploy": true, "previews": false }, "spec_version": 1, "generation": 1, "status": "pending", "status_reason": null, "observed": null, "active_operation": null, "hostname": null, "public_domain": null, "subdomain": null, "private_hostname": null, "next_runs": null, "tcp_proxy": null, "password_protection": null, "pending_settings": [ "string" ], "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ``` ### Remove resource password `DELETE /v1/resources/{resource_id}/password` Stops asking visitors for a password, so anyone can open the site again. Removing one that isn't set changes nothing. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | ```bash curl -X DELETE https://api.dekka.cloud/v1/resources/$RESOURCE_ID/password \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "environment_id": "e00c22e0-421a-471d-a890-ca4becee31f3", "kind": "application", "name": "api", "slug": "api", "region_id": "f70c4715-5954-46e3-a5f6-94f25b2beb48", "spec": { "source": { "provider": "github", "installation_id": null, "repo_id": null, "repo_full_name": "acme/api", "branch": "main", "root_dir": "/" }, "build": { "strategy": "railpack", "dockerfile_path": null, "dockerfile_context": ".", "dockerfile_target": null, "build_args": {}, "build_command": null, "start_command": null, "static_publish_dir": "dist", "spa_fallback": false, "buildpacks_builder": "heroku/builder:24", "watch_paths": [], "pre_deploy_command": null }, "runtime": { "port": null, "health_check_path": "/", "health_check_timeout_seconds": 30, "memory_mib": 256, "vcpu": 0.5, "replicas": 1, "restart_policy": "on_failure", "restart_max_retries": 10, "cron_schedule": null, "sleep_when_idle": false }, "networking": { "public_domain": true, "rate_limit": null }, "autodeploy": true, "previews": false }, "spec_version": 1, "generation": 1, "status": "pending", "status_reason": null, "observed": null, "active_operation": null, "hostname": null, "public_domain": null, "subdomain": null, "private_hostname": null, "next_runs": null, "tcp_proxy": null, "password_protection": null, "pending_settings": [ "string" ], "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ``` ### Restart, stop or start a service `POST /v1/resources/{resource_id}/actions/{action}` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | | `action` | path | "redeploy" \| "restart" \| "stop" \| "start" | yes | | ```bash curl -X POST https://api.dekka.cloud/v1/resources/$RESOURCE_ID/actions/$ACTION \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "environment_id": "e00c22e0-421a-471d-a890-ca4becee31f3", "kind": "application", "name": "api", "slug": "api", "region_id": "f70c4715-5954-46e3-a5f6-94f25b2beb48", "spec": { "source": { "provider": "github", "installation_id": null, "repo_id": null, "repo_full_name": "acme/api", "branch": "main", "root_dir": "/" }, "build": { "strategy": "railpack", "dockerfile_path": null, "dockerfile_context": ".", "dockerfile_target": null, "build_args": {}, "build_command": null, "start_command": null, "static_publish_dir": "dist", "spa_fallback": false, "buildpacks_builder": "heroku/builder:24", "watch_paths": [], "pre_deploy_command": null }, "runtime": { "port": null, "health_check_path": "/", "health_check_timeout_seconds": 30, "memory_mib": 256, "vcpu": 0.5, "replicas": 1, "restart_policy": "on_failure", "restart_max_retries": 10, "cron_schedule": null, "sleep_when_idle": false }, "networking": { "public_domain": true, "rate_limit": null }, "autodeploy": true, "previews": false }, "spec_version": 1, "generation": 1, "status": "pending", "status_reason": null, "observed": null, "active_operation": null, "hostname": null, "public_domain": null, "subdomain": null, "private_hostname": null, "next_runs": null, "tcp_proxy": null, "password_protection": null, "pending_settings": [ "string" ], "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ``` ## Deployments A deployment builds and releases one version of a service, and its logs stream while it runs. ### Get deployment `GET /v1/deployments/{deployment_id}` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `deployment_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/deployments/$DEPLOYMENT_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "resource_id": "f70c4715-5954-46e3-a1f6-a7d6614a09ce", "resource_name": "string", "status": "queued", "trigger": "initial", "branch": null, "commit_sha": null, "commit_message": null, "commit_author": null, "image_ref": null, "rollback_of_id": null, "keep_current_variables": false, "variables_recorded": false, "variables_changed": null, "config_sources": null, "effective_spec": null, "cancel_reason": null, "error": null, "build_seconds": null, "operation_id": null, "active_operation": null, "created_by_user_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z", "started_at": null, "finished_at": null } ``` ### Cancel deployment `POST /v1/deployments/{deployment_id}/cancel` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `deployment_id` | path | uuid | yes | | ```bash curl -X POST https://api.dekka.cloud/v1/deployments/$DEPLOYMENT_ID/cancel \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "resource_id": "f70c4715-5954-46e3-a1f6-a7d6614a09ce", "resource_name": "string", "status": "queued", "trigger": "initial", "branch": null, "commit_sha": null, "commit_message": null, "commit_author": null, "image_ref": null, "rollback_of_id": null, "keep_current_variables": false, "variables_recorded": false, "variables_changed": null, "config_sources": null, "effective_spec": null, "cancel_reason": null, "error": null, "build_seconds": null, "operation_id": null, "active_operation": null, "created_by_user_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z", "started_at": null, "finished_at": null } ``` ### Remove deployment `POST /v1/deployments/{deployment_id}/remove` Takes down the deployment that is serving by queueing application.stop. It becomes `removed` and the service `stopped` when the engine confirms. Any other deployment answers 409 not_active. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `deployment_id` | path | uuid | yes | | ```bash curl -X POST https://api.dekka.cloud/v1/deployments/$DEPLOYMENT_ID/remove \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "resource_id": "f70c4715-5954-46e3-a1f6-a7d6614a09ce", "resource_name": "string", "status": "queued", "trigger": "initial", "branch": null, "commit_sha": null, "commit_message": null, "commit_author": null, "image_ref": null, "rollback_of_id": null, "keep_current_variables": false, "variables_recorded": false, "variables_changed": null, "config_sources": null, "effective_spec": null, "cancel_reason": null, "error": null, "build_seconds": null, "operation_id": null, "active_operation": null, "created_by_user_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z", "started_at": null, "finished_at": null } ``` ### Rollback deployment `POST /v1/deployments/{deployment_id}/rollback` Deploys an earlier healthy deployment's image again, with the settings and the variables it ran with, or with the service's current variables when `keep_current_variables` is true. Databases, volumes and buckets are not changed, so their data and any migrations stay as they are. Returns the new deployment, whose trigger is `rollback`. A deployment without a recorded image answers 409 no_image, the one serving now 409 already_active, and one from before variables were recorded 409 variables_not_recorded unless the current variables are kept. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `deployment_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/deployments/$DEPLOYMENT_ID/rollback \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "keep_current_variables": false }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "resource_id": "f70c4715-5954-46e3-a1f6-a7d6614a09ce", "resource_name": "string", "status": "queued", "trigger": "initial", "branch": null, "commit_sha": null, "commit_message": null, "commit_author": null, "image_ref": null, "rollback_of_id": null, "keep_current_variables": false, "variables_recorded": false, "variables_changed": null, "config_sources": null, "effective_spec": null, "cancel_reason": null, "error": null, "build_seconds": null, "operation_id": null, "active_operation": null, "created_by_user_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z", "started_at": null, "finished_at": null } ``` ### Start a deployment `POST /v1/resources/{resource_id}/deployments` Deploys the head of a branch, or a specific commit. A newer deployment replaces any that are still running. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | | `branch` | body | string | no | Defaults to the app's configured branch | | `commit_sha` | body | string | no | Defaults to the branch head | ```bash curl https://api.dekka.cloud/v1/resources/8b0f3e52-6c1d-4f7a-9a8e-2d5b7c1e9f04/deployments \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{}' ``` ```json { "number": 4, "status": "queued", "branch": "main", "commit_sha": "a3f9c21e8d7b6c5a4f3e2d1c0b9a8f7e6d5c4b3a" } ``` ### Read deployment logs `GET /v1/deployments/{deployment_id}/logs` Build and deploy log lines after `after` (a sequence number). | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `deployment_id` | path | uuid | yes | | | `after` | query | integer | no | | | `limit` | query | integer | no | | ```bash curl "https://api.dekka.cloud/v1/deployments/$DEPLOYMENT/logs?after=0" \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "lines": [ { "seq": 1, "stream": "build", "line": "Cloning acme/storefront at a3f9c21" } ], "next_after": 1 } ``` ### List project deployments `GET /v1/projects/{project_id}/deployments` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | | `limit` | query | integer | no | | ```bash curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/deployments \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "resource_id": "f70c4715-5954-46e3-a1f6-a7d6614a09ce", "resource_name": "string", "status": "queued", "trigger": "initial", "branch": null, "commit_sha": null, "commit_message": null, "commit_author": null, "image_ref": null, "rollback_of_id": null, "keep_current_variables": false, "variables_recorded": false, "variables_changed": null, "config_sources": null, "effective_spec": null, "cancel_reason": null, "error": null, "build_seconds": null, "operation_id": null, "active_operation": null, "created_by_user_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z", "started_at": null, "finished_at": null } ] ``` ### List resource deployments `GET /v1/resources/{resource_id}/deployments` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | | `limit` | query | integer | no | | ```bash curl https://api.dekka.cloud/v1/resources/$RESOURCE_ID/deployments \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "resource_id": "f70c4715-5954-46e3-a1f6-a7d6614a09ce", "resource_name": "string", "status": "queued", "trigger": "initial", "branch": null, "commit_sha": null, "commit_message": null, "commit_author": null, "image_ref": null, "rollback_of_id": null, "keep_current_variables": false, "variables_recorded": false, "variables_changed": null, "config_sources": null, "effective_spec": null, "cancel_reason": null, "error": null, "build_seconds": null, "operation_id": null, "active_operation": null, "created_by_user_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z", "started_at": null, "finished_at": null } ] ``` ### Stream deployment logs `GET /v1/deployments/{deployment_id}/logs/stream` Streams log lines as `event: log` (with `id: ` so reconnects resume via Last-Event-ID), sends heartbeats, and ends with `event: end` once the deployment has finished. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `deployment_id` | path | uuid | yes | | | `after` | query | integer | no | | ```bash curl https://api.dekka.cloud/v1/deployments/$DEPLOYMENT_ID/logs/stream \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```text 200 with a text/event-stream body ``` ## Jobs A job runs a service's command to completion and keeps the logs of every run. ### Get job run `GET /v1/job-runs/{run_id}` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `run_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/job-runs/$RUN_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "resource_id": "f70c4715-5954-46e3-a1f6-a7d6614a09ce", "status": "queued", "trigger": "schedule", "command": "string", "scheduled_for": null, "started_at": null, "finished_at": null, "exit_code": null, "error": null, "operation_id": null, "active_operation": null, "created_by_user_id": null, "created_at": "2026-11-04T09:30:00Z" } ``` ### Run a job `POST /v1/resources/{resource_id}/runs` Runs a scheduled job now with its start command. A job that has not been deployed answers 409 job_not_deployed, and one whose last run is still going 409 run_in_progress. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | ```bash curl -X POST https://api.dekka.cloud/v1/resources/$RESOURCE_ID/runs \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "resource_id": "f70c4715-5954-46e3-a1f6-a7d6614a09ce", "status": "queued", "trigger": "schedule", "command": "string", "scheduled_for": null, "started_at": null, "finished_at": null, "exit_code": null, "error": null, "operation_id": null, "active_operation": null, "created_by_user_id": null, "created_at": "2026-11-04T09:30:00Z" } ``` ### Get job run logs `GET /v1/job-runs/{run_id}/logs` The run's output after `after` (a sequence number). | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `run_id` | path | uuid | yes | | | `after` | query | integer | no | | | `limit` | query | integer | no | | ```bash curl https://api.dekka.cloud/v1/job-runs/$RUN_ID/logs \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "lines": [ { "seq": 1, "ts": "2026-11-04T09:30:00Z", "stream": "string", "line": "string" } ], "next_after": 1, "complete": false } ``` ### List job runs `GET /v1/resources/{resource_id}/runs` Runs newest first, skipped scheduled runs included. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | | `limit` | query | integer | no | | ```bash curl https://api.dekka.cloud/v1/resources/$RESOURCE_ID/runs \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "resource_id": "f70c4715-5954-46e3-a1f6-a7d6614a09ce", "status": "queued", "trigger": "schedule", "command": "string", "scheduled_for": null, "started_at": null, "finished_at": null, "exit_code": null, "error": null, "operation_id": null, "active_operation": null, "created_by_user_id": null, "created_at": "2026-11-04T09:30:00Z" } ] ``` ## Variables Variables belong to one service, and shared variables belong to a whole environment. Secret values are returned only when you reveal them. ### List shared variables `GET /v1/environments/{environment_id}/variables` Variables shared by the environment's services. A service uses one through a `${{shared.KEY}}` reference; they are not added to every service. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `environment_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/environments/$ENVIRONMENT_ID/variables \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "key": "API_KEY", "value": null, "secret": false, "sealed": false, "updated_at": "2026-11-04T09:30:00Z" } ] ``` ### List variables `GET /v1/resources/{resource_id}/env` Stored variables, then the system variables Dekka sets (PORT, DEKKA_PRIVATE_DOMAIN, DEKKA_PUBLIC_DOMAIN, DEKKA_ENVIRONMENT) with `source: "system"`, unless a stored variable of the same name overrides one. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/resources/$RESOURCE_ID/env \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "key": "API_KEY", "value": null, "secret": false, "sealed": false, "source": "user", "connection_id": null, "read_only": false, "updated_at": null } ] ``` ### Set shared variables `PUT /v1/environments/{environment_id}/variables` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `environment_id` | path | uuid | yes | | | `vars` | body | array of object | yes | | ```bash curl -X PUT https://api.dekka.cloud/v1/environments/$ENVIRONMENT_ID/variables \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "vars": [ { "key": "API_KEY", "value": "…" } ] }' ``` ```json [ { "key": "API_KEY", "value": null, "secret": false, "sealed": false, "updated_at": "2026-11-04T09:30:00Z" } ] ``` ### Set variables `PUT /v1/resources/{resource_id}/env` Creates or updates the given variables. Others are left alone, and connection-managed keys are read-only. References are checked and refused with 422 unknown_reference when they do not resolve. A reference to a database, cache, bucket or queue the service is not connected to connects it, so `${{db.DATABASE_URL}}` reads the service's own credentials. Changes apply on the next restart or deploy. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | | `vars` | body | array of object | yes | | ```bash curl -X PUT https://api.dekka.cloud/v1/resources/8b0f3e52-6c1d-4f7a-9a8e-2d5b7c1e9f04/env \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "vars": [{ "key": "STRIPE_KEY", "value": "sk_live_…", "secret": true }] }' ``` ```json [ { "key": "DATABASE_URL", "value": null, "secret": true, "source": "connection" }, { "key": "STRIPE_KEY", "value": null, "secret": true, "source": "user" } ] ``` ### Read shared variables as a .env file `GET /v1/environments/{environment_id}/variables/raw` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `environment_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/environments/$ENVIRONMENT_ID/variables/raw \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "content": "…" } ``` ### Environment reference targets `GET /v1/environments/{environment_id}/variables/references` What shared variables can reference, for autocomplete. A database's connection variables are left out, since they belong to the service that connects. Names only; values are never returned. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `environment_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/environments/$ENVIRONMENT_ID/variables/references \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "services": [ { "name": "api", "kind": "string", "keys": [], "connected": null } ], "shared": [ "string" ] } ``` ### Read variables as a .env file `GET /v1/resources/{resource_id}/env/raw` The service's own variables as dotenv text. Secret, sealed and connection-managed values are left out, each with a comment line naming it. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/resources/$RESOURCE_ID/env/raw \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "content": "…" } ``` ### Resource reference targets `GET /v1/resources/{resource_id}/env/references` The services, databases and shared variables this service's variables can reference as ${{name.KEY}}, with the keys each offers, for autocomplete. Names only; values are never returned. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/resources/$RESOURCE_ID/env/references \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "services": [ { "name": "api", "kind": "string", "keys": [], "connected": null } ], "shared": [ "string" ] } ``` ### Replace shared variables from a .env file `PUT /v1/environments/{environment_id}/variables/raw` Saves dotenv text as shared variables, the same way as a service's raw editor. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `environment_id` | path | uuid | yes | | | `content` | body | string | yes | Dotenv text: comments, quotes and `export` are accepted | | `replace` | body | boolean | no | Also delete user variables missing from the text. Connection-managed and sealed ones are kept. | ```bash curl -X PUT https://api.dekka.cloud/v1/environments/$ENVIRONMENT_ID/variables/raw \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "content": "…" }' ``` ```json [ { "key": "API_KEY", "value": null, "secret": false, "sealed": false, "updated_at": "2026-11-04T09:30:00Z" } ] ``` ### Replace variables from a .env file `PUT /v1/resources/{resource_id}/env/raw` Saves dotenv text. Existing variables keep their secret flag and new ones are not secret. With `replace`, user variables missing from the text are deleted, except sealed ones; connection-managed keys cannot be set here. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | | `content` | body | string | yes | Dotenv text: comments, quotes and `export` are accepted | | `replace` | body | boolean | no | Also delete user variables missing from the text. Connection-managed and sealed ones are kept. | ```bash curl -X PUT https://api.dekka.cloud/v1/resources/$RESOURCE_ID/env/raw \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "content": "…" }' ``` ```json [ { "key": "API_KEY", "value": null, "secret": false, "sealed": false, "source": "user", "connection_id": null, "read_only": false, "updated_at": null } ] ``` ### Delete shared variable `DELETE /v1/environments/{environment_id}/variables/{key}` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `environment_id` | path | uuid | yes | | | `key` | path | string | yes | | ```bash curl -X DELETE https://api.dekka.cloud/v1/environments/$ENVIRONMENT_ID/variables/$KEY \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```text 204 No Content ``` ### Delete a variable `DELETE /v1/resources/{resource_id}/env/{key}` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | | `key` | path | string | yes | | ```bash curl -X DELETE https://api.dekka.cloud/v1/resources/$RESOURCE_ID/env/$KEY \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```text 204 No Content ``` ### Reveal shared variable `POST /v1/environments/{environment_id}/variables/{key}/reveal` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `environment_id` | path | uuid | yes | | | `key` | path | string | yes | | ```bash curl -X POST https://api.dekka.cloud/v1/environments/$ENVIRONMENT_ID/variables/$KEY/reveal \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "key": "API_KEY", "value": "…" } ``` ### Reveal a secret variable `POST /v1/resources/{resource_id}/env/{key}/reveal` Returns a secret value in plain text. Every reveal is audited, and a sealed variable answers 409 variable_sealed. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | | `key` | path | string | yes | | ```bash curl -X POST https://api.dekka.cloud/v1/resources/$RESOURCE_ID/env/$KEY/reveal \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "key": "API_KEY", "value": "…" } ``` ## Staged changes Changes are staged first and deployed together. Plans made from blueprints and templates arrive as staged changes too. ### Get changeset `GET /v1/changesets/{changeset_id}` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `changeset_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/changesets/$CHANGESET_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": null, "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "environment_id": "e00c22e0-421a-471d-a890-ca4becee31f3", "status": "draft", "source": "manual", "template_id": null, "prune": false, "pending_count": 1, "changes": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "position": 1, "target": "resource", "action": "create", "resource_id": null, "resource_name": null, "summary": "string", "destructive": false, "payload": {}, "has_value": false, "result": null, "created_at": "2026-11-04T09:30:00Z" } ], "operations": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": null, "resource_id": null, "connection_id": null, "deployment_id": null, "type": "string", "state": "string", "phase": null, "progress": 1, "attempts": 1, "error": null, "request_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z", "completed_at": null } ], "deployment_ids": [ "ec0c35c4-3838-4c73-a8d2-29c841d79e7d" ], "created_by_user_id": null, "applied_by_user_id": null, "applied_at": null, "created_at": null, "updated_at": null } ``` ### Remove a staged change `DELETE /v1/changeset-changes/{change_id}` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `change_id` | path | uuid | yes | | ```bash curl -X DELETE https://api.dekka.cloud/v1/changeset-changes/$CHANGE_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```text 204 No Content ``` ### Deploy a changeset `POST /v1/changesets/{changeset_id}/deploy` Applies every change in one transaction through the same services as the direct endpoints, then creates one deployment (trigger config_change) per existing service whose settings or variables changed. New services get their initial deployment. Returns the changeset with each change's result and every operation queued. A blueprint or template plan whose environment changed since it was computed is marked stale and answers 409 plan_stale; an error in any change answers that change's error, with its id in the details, and applies nothing. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `changeset_id` | path | uuid | yes | | | `confirm` | body | boolean | yes | Must be true. Deploying applies every change and cannot be undone as a whole. | ```bash curl https://api.dekka.cloud/v1/changesets/$CHANGESET_ID/deploy \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "confirm": false }' ``` ```json { "id": null, "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "environment_id": "e00c22e0-421a-471d-a890-ca4becee31f3", "status": "draft", "source": "manual", "template_id": null, "prune": false, "pending_count": 1, "changes": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "position": 1, "target": "resource", "action": "create", "resource_id": null, "resource_name": null, "summary": "string", "destructive": false, "payload": {}, "has_value": false, "result": null, "created_at": "2026-11-04T09:30:00Z" } ], "operations": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": null, "resource_id": null, "connection_id": null, "deployment_id": null, "type": "string", "state": "string", "phase": null, "progress": 1, "attempts": 1, "error": null, "request_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z", "completed_at": null } ], "deployment_ids": [ "ec0c35c4-3838-4c73-a8d2-29c841d79e7d" ], "created_by_user_id": null, "applied_by_user_id": null, "applied_at": null, "created_at": null, "updated_at": null } ``` ### Discard a changeset `POST /v1/changesets/{changeset_id}/discard` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `changeset_id` | path | uuid | yes | | ```bash curl -X POST https://api.dekka.cloud/v1/changesets/$CHANGESET_ID/discard \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": null, "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "environment_id": "e00c22e0-421a-471d-a890-ca4becee31f3", "status": "draft", "source": "manual", "template_id": null, "prune": false, "pending_count": 1, "changes": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "position": 1, "target": "resource", "action": "create", "resource_id": null, "resource_name": null, "summary": "string", "destructive": false, "payload": {}, "has_value": false, "result": null, "created_at": "2026-11-04T09:30:00Z" } ], "operations": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": null, "resource_id": null, "connection_id": null, "deployment_id": null, "type": "string", "state": "string", "phase": null, "progress": 1, "attempts": 1, "error": null, "request_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z", "completed_at": null } ], "deployment_ids": [ "ec0c35c4-3838-4c73-a8d2-29c841d79e7d" ], "created_by_user_id": null, "applied_by_user_id": null, "applied_at": null, "created_at": null, "updated_at": null } ``` ### Get the open changeset `GET /v1/environments/{environment_id}/changeset` The environment's manual draft: staged changes with a summary each and `pending_count` for the pending-changes bar. An environment with nothing staged returns an empty draft whose id is null. A `changeset` event on the project's SSE channel says when it changes. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `environment_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/environments/$ENVIRONMENT_ID/changeset \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": null, "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "environment_id": "e00c22e0-421a-471d-a890-ca4becee31f3", "status": "draft", "source": "manual", "template_id": null, "prune": false, "pending_count": 1, "changes": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "position": 1, "target": "resource", "action": "create", "resource_id": null, "resource_name": null, "summary": "string", "destructive": false, "payload": {}, "has_value": false, "result": null, "created_at": "2026-11-04T09:30:00Z" } ], "operations": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": null, "resource_id": null, "connection_id": null, "deployment_id": null, "type": "string", "state": "string", "phase": null, "progress": 1, "attempts": 1, "error": null, "request_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z", "completed_at": null } ], "deployment_ids": [ "ec0c35c4-3838-4c73-a8d2-29c841d79e7d" ], "created_by_user_id": null, "applied_by_user_id": null, "applied_at": null, "created_at": null, "updated_at": null } ``` ### List environment changesets `GET /v1/environments/{environment_id}/changesets` Changesets of every source (manual drafts, blueprint and template plans), newest first, optionally filtered by status. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `environment_id` | path | uuid | yes | | | `status` | query | "draft" \| "applied" \| "discarded" \| "stale" | no | | | `limit` | query | integer | no | | ```bash curl https://api.dekka.cloud/v1/environments/$ENVIRONMENT_ID/changesets \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": null, "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "environment_id": "e00c22e0-421a-471d-a890-ca4becee31f3", "status": "draft", "source": "manual", "template_id": null, "prune": false, "pending_count": 1, "changes": [], "operations": [], "deployment_ids": [], "created_by_user_id": null, "applied_by_user_id": null, "applied_at": null, "created_at": null, "updated_at": null } ] ``` ### Stage a change `POST /v1/environments/{environment_id}/changeset/changes` Stages one change in the environment's manual draft, validated as the direct endpoint would validate it (references included) against the environment plus what is already staged. Nothing changes until the changeset is deployed. A staged variable's value is encrypted and never returned. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `environment_id` | path | uuid | yes | | | `target` | body | "resource" \| "variable" \| "shared_variable" \| "connection" \| "volume" | yes | | | `action` | body | "create" \| "update" \| "delete" | yes | | | `resource_id` | body | uuid | no | | | `resource_name` | body | string | no | | | `name` | body | string | no | | | `kind` | body | "application" \| "postgres" \| "redis" \| "queue" \| "object_storage" \| "worker" \| "scheduled_job" \| "virtual_machine" \| "ai_gateway_binding" \| "gpu_runtime" | no | | | `spec` | body | object | no | | | `region_id` | body | string | no | | | `confirm` | body | string | no | | | `key` | body | string | no | | | `value` | body | string | no | May contain references: ${{.}} for another service in this environment, or ${{shared.}} for a shared variable | | `secret` | body | boolean | no | | | `sealed` | body | boolean | no | | | `from_resource` | body | string | no | | | `to_resource` | body | string | no | | | `connection_id` | body | uuid | no | | ```bash curl https://api.dekka.cloud/v1/environments/$ENVIRONMENT_ID/changeset/changes \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "target": "resource", "action": "create" }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "position": 1, "target": "resource", "action": "create", "resource_id": null, "resource_name": null, "summary": "string", "destructive": false, "payload": {}, "has_value": false, "result": null, "created_at": "2026-11-04T09:30:00Z" } ``` ## Blueprints and templates A blueprint describes a set of services in one file. You can validate it, plan it into staged changes, or start from a template in the catalogue. ### Validate a blueprint `POST /v1/blueprints/validate` Checks a blueprint without an environment. Every problem is listed with its path, and a valid blueprint comes back with every spec normalised (defaults filled in, kinds derived from cron schedules). | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `content` | body | string | yes | The blueprint text, usually a dekka.yaml | | `format` | body | "yaml" \| "json" \| "toml" | no | | ```bash curl https://api.dekka.cloud/v1/blueprints/validate \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "content": "…" }' ``` ```json { "valid": false, "errors": [ { "path": "string", "message": "…" } ], "blueprint": null } ``` ### Translate compose `POST /v1/compose/translate` Translates a Docker Compose file into a dekka.yaml without an environment, with a report of what carried over (applied), what changed shape (adjusted, such as a postgres container becoming a managed database with a connection) and what was left out (unsupported). Nothing is created. A file that can't be read answers 422 invalid_compose. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `content` | body | string | yes | The docker-compose.yml text | | `repository` | body | object | no | The GitHub repository that services with a build section are built from | | `repository.full_name` | body | string | yes | owner/name on GitHub | | `repository.branch` | body | string | no | | ```bash curl https://api.dekka.cloud/v1/compose/translate \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "content": "…" }' ``` ```json { "blueprint": "string", "report": [ { "service": null, "level": "applied", "message": "…" } ], "resources": [ { "name": "api", "kind": "string" } ], "inputs": [ { "key": "API_KEY", "label": "string", "description": null, "secret": false, "required": false, "default": null, "placeholder": null } ], "needs_repository": false } ``` ### List templates `GET /v1/catalog/templates` Templates that can be planned into an environment, featured ones first. Public. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `category` | query | string | no | | ```bash curl https://api.dekka.cloud/v1/catalog/templates \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "name": "api", "description": null, "metadata": null, "inputs": [], "generated_secrets": [], "resources": [] } ] ``` ### Get a template `GET /v1/catalog/templates/{template_id}` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `template_id` | path | string | yes | | ```bash curl https://api.dekka.cloud/v1/catalog/templates/$TEMPLATE_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "name": "api", "description": null, "metadata": null, "inputs": [ { "key": "API_KEY", "label": "string", "description": null, "secret": false, "required": false, "default": null, "placeholder": null } ], "generated_secrets": [ "string" ], "resources": [ { "name": "api", "kind": "string", "image": null, "volume": null, "memory_mib": null } ], "blueprint": { "name": null, "description": null, "metadata": null, "inputs": [], "variables": [], "resources": [], "connections": [] }, "content": "…" } ``` ### Plan a blueprint `POST /v1/environments/{environment_id}/blueprint/plan` Compares a blueprint with the environment and returns the plan as a changeset (source blueprint) of creates, updates and, with `prune`, deletes. Nothing changes until it is deployed with POST /v1/changesets/{id}/deploy, which answers 409 plan_stale if the environment changed in between. An invalid blueprint answers 422 invalid_blueprint with every error. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `environment_id` | path | uuid | yes | | | `content` | body | string | yes | The blueprint text, usually a dekka.yaml | | `format` | body | "yaml" \| "json" \| "toml" | no | | | `prune` | body | boolean | no | Also delete resources, variables, shared variables and connections the blueprint does not list | | `inputs` | body | object | no | Values for the blueprint's inputs, by key | ```bash curl https://api.dekka.cloud/v1/environments/$ENVIRONMENT_ID/blueprint/plan \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "content": "…" }' ``` ```json { "id": null, "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "environment_id": "e00c22e0-421a-471d-a890-ca4becee31f3", "status": "draft", "source": "manual", "template_id": null, "prune": false, "pending_count": 1, "changes": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "position": 1, "target": "resource", "action": "create", "resource_id": null, "resource_name": null, "summary": "string", "destructive": false, "payload": {}, "has_value": false, "result": null, "created_at": "2026-11-04T09:30:00Z" } ], "operations": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": null, "resource_id": null, "connection_id": null, "deployment_id": null, "type": "string", "state": "string", "phase": null, "progress": 1, "attempts": 1, "error": null, "request_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z", "completed_at": null } ], "deployment_ids": [ "ec0c35c4-3838-4c73-a8d2-29c841d79e7d" ], "created_by_user_id": null, "applied_by_user_id": null, "applied_at": null, "created_at": null, "updated_at": null } ``` ### Plan compose `POST /v1/environments/{environment_id}/compose/plan` Translates a Docker Compose file and plans it into the environment as a changeset (source blueprint), to confirm with POST /v1/changesets/{id}/deploy. The file is `content`, or with `path` it is read from `repository` as POST .../compose/read does. Services with a build section are built from `repository`; leaving it out answers 422 repository_required. A translation that doesn't validate answers 422 invalid_blueprint. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `environment_id` | path | uuid | yes | | | `content` | body | string | no | The docker-compose.yml text. Leave it out to read `path` from `repository` instead. | | `repository` | body | object | no | The GitHub repository that services with a build section are built from | | `repository.full_name` | body | string | yes | owner/name on GitHub | | `repository.branch` | body | string | no | | | `path` | body | string | no | The Compose file's path in `repository`, read through the GitHub App in place of `content` | | `inputs` | body | object | no | Values for the translation's inputs, by key | ```bash curl https://api.dekka.cloud/v1/environments/$ENVIRONMENT_ID/compose/plan \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "content": "…", "repository": { "full_name": "string" }, "path": "string" }' ``` ```json { "id": null, "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "environment_id": "e00c22e0-421a-471d-a890-ca4becee31f3", "status": "draft", "source": "manual", "template_id": null, "prune": false, "pending_count": 1, "changes": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "position": 1, "target": "resource", "action": "create", "resource_id": null, "resource_name": null, "summary": "string", "destructive": false, "payload": {}, "has_value": false, "result": null, "created_at": "2026-11-04T09:30:00Z" } ], "operations": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": null, "resource_id": null, "connection_id": null, "deployment_id": null, "type": "string", "state": "string", "phase": null, "progress": 1, "attempts": 1, "error": null, "request_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z", "completed_at": null } ], "deployment_ids": [ "ec0c35c4-3838-4c73-a8d2-29c841d79e7d" ], "created_by_user_id": null, "applied_by_user_id": null, "applied_at": null, "created_at": null, "updated_at": null } ``` ### Read compose `POST /v1/environments/{environment_id}/compose/read` Reads a Compose file from a GitHub repository the organization has connected and translates it as POST /v1/compose/translate does, with `path` saying which file was found. Services with a build section build from that repository and branch, with their context resolved against the file's directory. Nothing is created. A repository the GitHub App can't see answers 422 repo_not_found (or github_not_installed when the App isn't installed), and a branch without the file answers 422 compose_file_missing with the paths tried. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `environment_id` | path | uuid | yes | | | `repository` | body | object | yes | A GitHub repository the organization's GitHub App can see | | `repository.full_name` | body | string | yes | owner/name on GitHub | | `repository.branch` | body | string | no | | | `path` | body | string | no | The Compose file's path in the repository. When docker-compose.yml is absent, compose.yml, docker-compose.yaml and compose.yaml in the same directory are tried in turn. | ```bash curl https://api.dekka.cloud/v1/environments/$ENVIRONMENT_ID/compose/read \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "repository": { "full_name": "string" } }' ``` ```json { "blueprint": "string", "report": [ { "service": null, "level": "applied", "message": "…" } ], "resources": [ { "name": "api", "kind": "string" } ], "inputs": [ { "key": "API_KEY", "label": "string", "description": null, "secret": false, "required": false, "default": null, "placeholder": null } ], "needs_repository": false, "path": "string" } ``` ### Plan declared services `POST /v1/resources/{resource_id}/config/plan` Plans what the service's dekka.toml declares and the environment lacks: the missing databases, caches, buckets and queues, and a connection from the service to each declared one. Nothing changes until the changeset is deployed with POST /v1/changesets/{id}/deploy. Answers 409 nothing_to_plan when everything is already here and connected. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | ```bash curl -X POST https://api.dekka.cloud/v1/resources/$RESOURCE_ID/config/plan \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": null, "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "environment_id": "e00c22e0-421a-471d-a890-ca4becee31f3", "status": "draft", "source": "manual", "template_id": null, "prune": false, "pending_count": 1, "changes": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "position": 1, "target": "resource", "action": "create", "resource_id": null, "resource_name": null, "summary": "string", "destructive": false, "payload": {}, "has_value": false, "result": null, "created_at": "2026-11-04T09:30:00Z" } ], "operations": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": null, "resource_id": null, "connection_id": null, "deployment_id": null, "type": "string", "state": "string", "phase": null, "progress": 1, "attempts": 1, "error": null, "request_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z", "completed_at": null } ], "deployment_ids": [ "ec0c35c4-3838-4c73-a8d2-29c841d79e7d" ], "created_by_user_id": null, "applied_by_user_id": null, "applied_at": null, "created_at": null, "updated_at": null } ``` ### Declared services `GET /v1/resources/{resource_id}/config/services` The databases, caches, buckets and queues the service's dekka.toml (or dekka.json) declares under [services.], read at its latest deployed commit, and whether each exists in the environment and is connected. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/resources/$RESOURCE_ID/config/services \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "file": null, "commit_sha": null, "services": [ { "name": "api", "kind": "string", "tier": null, "exists": false, "connected": false } ], "plan_needed": false } ``` ### Plan a template `POST /v1/environments/{environment_id}/templates/{template_id}/plan` Plans a template into the environment as a changeset (source template) to confirm with POST /v1/changesets/{id}/deploy. Supply the template's inputs by key; a required one left out answers 422 missing_input. Secrets the template generates are created now, stored as secrets and never shown in the plan. Templates only add, so a resource name already in use answers 409 name_taken. Plan limits are checked when it is deployed. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `environment_id` | path | uuid | yes | | | `template_id` | path | string | yes | | ```bash curl https://api.dekka.cloud/v1/environments/$ENVIRONMENT_ID/templates/$TEMPLATE_ID/plan \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "inputs": { "KEY": "…" } }' ``` ```json { "id": null, "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "environment_id": "e00c22e0-421a-471d-a890-ca4becee31f3", "status": "draft", "source": "manual", "template_id": null, "prune": false, "pending_count": 1, "changes": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "position": 1, "target": "resource", "action": "create", "resource_id": null, "resource_name": null, "summary": "string", "destructive": false, "payload": {}, "has_value": false, "result": null, "created_at": "2026-11-04T09:30:00Z" } ], "operations": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": null, "resource_id": null, "connection_id": null, "deployment_id": null, "type": "string", "state": "string", "phase": null, "progress": 1, "attempts": 1, "error": null, "request_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z", "completed_at": null } ], "deployment_ids": [ "ec0c35c4-3838-4c73-a8d2-29c841d79e7d" ], "created_by_user_id": null, "applied_by_user_id": null, "applied_at": null, "created_at": null, "updated_at": null } ``` ## Connections A connection gives a service its own credentials for a database, cache or bucket, delivered as environment variables. ### Delete connection `DELETE /v1/connections/{connection_id}` Starts disconnecting. The variables are removed once the engine confirms. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `connection_id` | path | uuid | yes | | ```bash curl -X DELETE https://api.dekka.cloud/v1/connections/$CONNECTION_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "environment_id": "e00c22e0-421a-471d-a890-ca4becee31f3", "source_id": "f60c4582-4152-4284-a733-d4898e984268", "target_id": "f10c3da3-3945-49f9-a0f9-92ab67e21bdd", "status": "pending", "bindings": [ { "key": "API_KEY", "secret": false, "optional": false } ], "error": null, "active_operation": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ``` ### Retry connection `POST /v1/connections/{connection_id}/retry` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `connection_id` | path | uuid | yes | | ```bash curl -X POST https://api.dekka.cloud/v1/connections/$CONNECTION_ID/retry \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "environment_id": "e00c22e0-421a-471d-a890-ca4becee31f3", "source_id": "f60c4582-4152-4284-a733-d4898e984268", "target_id": "f10c3da3-3945-49f9-a0f9-92ab67e21bdd", "status": "pending", "bindings": [ { "key": "API_KEY", "secret": false, "optional": false } ], "error": null, "active_operation": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ``` ### Connect a service `POST /v1/projects/{project_id}/connections` Connects an application to a database or bucket. The status becomes active once credentials exist, the private path is open and the app has restarted with the new variables. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | | `source_id` | body | uuid | yes | | | `target_id` | body | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/projects/3f6c1d2e-8a4b-4f0e-9c71-5b2d8e4a6f10/connections \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "source_id": "8b0f3e52-6c1d-4f7a-9a8e-2d5b7c1e9f04", "target_id": "c41a7d09-3b2e-4e85-b7f1-6a0d9c2e5b31" }' ``` ```json { "id": "5e9d2b7a-0f4c-4a1e-8d63-b2c7e1f09a48", "status": "pending", "bindings": [] } ``` ### List connections `GET /v1/projects/{project_id}/connections` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/connections \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "environment_id": "e00c22e0-421a-471d-a890-ca4becee31f3", "source_id": "f60c4582-4152-4284-a733-d4898e984268", "target_id": "f10c3da3-3945-49f9-a0f9-92ab67e21bdd", "status": "pending", "bindings": [], "error": null, "active_operation": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ] ``` ## Databases Read connection strings, browse tables and keys, run a query and rotate credentials. ### Rotate database credentials `POST /v1/resources/{resource_id}/rotate-credentials` Issues new credentials for every active connection to this database, cache, bucket or queue. Each connection goes active, pending, active: the engine rotates (connection.configure with rotate: true) and revokes the old credential, and Dekka rebinds the app's variables and restarts it. With no active connection it answers 409 no_connections. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | ```bash curl -X POST https://api.dekka.cloud/v1/resources/$RESOURCE_ID/rotate-credentials \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "connections": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "environment_id": "e00c22e0-421a-471d-a890-ca4becee31f3", "source_id": "f60c4582-4152-4284-a733-d4898e984268", "target_id": "f10c3da3-3945-49f9-a0f9-92ab67e21bdd", "status": "pending", "bindings": [], "error": null, "active_operation": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ], "operation_ids": [ "ec0c35c4-3838-4c73-a8d2-29c841d79e7d" ] } ``` ### List connection strings `GET /v1/resources/{resource_id}/connection-strings` One row per app connected to this database, with the variable it was given and the URL with its password masked. The full value comes from POST /v1/resources/{app_id}/env/{env_key}/reveal, which is audited. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/resources/$RESOURCE_ID/connection-strings \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "connection_id": "e60c2c52-6129-4274-ac8a-2bc86282b4bf", "app_id": "e40c292c-5c25-4d67-a36c-c80f173f5aa9", "app_name": "string", "env_key": "string", "masked_url": null, "status": "string" } ] ``` ### Run database query `POST /v1/resources/{resource_id}/database/query` Runs one read-only statement. Anything else is refused here with 422 (empty_query, multiple_statements or query_not_read_only) before it reaches the engine, which also runs it in a READ ONLY transaction. Rows are capped at 500 and the timeout at 10 seconds. Every query is audited with its length and SHA-256, never its text or result. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | | `sql` | body | string | yes | One read-only statement | | `max_rows` | body | integer | no | | | `timeout_ms` | body | integer | no | | ```bash curl https://api.dekka.cloud/v1/resources/$RESOURCE_ID/database/query \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "sql": "string" }' ``` ```json { "columns": [ { "name": "api", "type": "string" } ], "rows": [ [] ], "row_count": 1, "truncated": false, "elapsed_ms": 1, "simulated": false, "engine_kind": "string" } ``` ### List database tables `GET /v1/resources/{resource_id}/database/tables` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/resources/$RESOURCE_ID/database/tables \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "tables": [ { "schema_name": "string", "name": "api", "row_estimate": 1, "size_bytes": 1 } ], "simulated": false, "engine_kind": "string" } ``` ### List redis keys `GET /v1/resources/{resource_id}/redis/keys` A page of keys matching `pattern` (glob syntax), read with SCAN. Each key comes with the start of its value, which can be a session or a code, so this needs the role the SQL console needs and is audited as it is. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | | `pattern` | query | string | no | | | `cursor` | query | string | no | | | `count` | query | integer | no | | ```bash curl https://api.dekka.cloud/v1/resources/$RESOURCE_ID/redis/keys \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "keys": [ { "key": "API_KEY", "type": "string", "ttl_seconds": null, "size_bytes": 1, "preview": "string" } ], "cursor": "string", "simulated": false, "engine_kind": "string" } ``` ## Object storage List what a bucket holds, make a link to one object that expires, delete objects, set CORS rules and manage the bucket's own keys. ### Create bucket key `POST /v1/resources/{resource_id}/bucket/keys` Makes a key for the bucket itself, for something outside Dekka's connections such as a laptop, a backup job or an app that runs somewhere else. The secret is in this answer and cannot be read again. Only a signed-in member can make one, never an API key. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | | `name` | body | string | yes | | | `access` | body | "read" \| "read_write" | no | | ```bash curl https://api.dekka.cloud/v1/resources/$RESOURCE_ID/bucket/keys \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "name": "api" }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "name": "api", "access": "read", "access_key_id": "e40c292c-4d25-45ca-ac47-ec31dc390cf5", "created_by": null, "created_at": "2026-11-04T09:30:00Z", "secret_access_key": "string", "endpoint": "string", "bucket": "string", "region": "string" } ``` ### Create bucket link `POST /v1/resources/{resource_id}/bucket/links` A link that reads (`GET`) or writes (`PUT`) one object until it expires, with no other credential. Anyone who has the link can use it, so give it the shortest life that does the job. A link to read an object that is not there is still made, and answers 404 when opened. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | | `key` | body | string | yes | | | `method` | body | "GET" \| "PUT" | no | | | `expires_seconds` | body | integer | no | | | `content_type` | body | string | no | For PUT, the Content-Type to upload. | | `download_name` | body | string | no | For GET, a file name the browser saves the object under. | ```bash curl https://api.dekka.cloud/v1/resources/$RESOURCE_ID/bucket/links \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "key": "API_KEY" }' ``` ```json { "url": "https://example.com/hooks/dekka", "method": "GET", "headers": { "KEY": "…" }, "expires_at": "2026-11-04T09:30:00Z" } ``` ### Get bucket cors `GET /v1/resources/{resource_id}/bucket/cors` The sites that may read from the bucket or upload to it from a browser, as CORS rules in the order they are tried. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/resources/$RESOURCE_ID/bucket/cors \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "rules": [ { "allowed_origins": [], "allowed_methods": [], "allowed_headers": [], "expose_headers": [], "max_age_seconds": null } ] } ``` ### List bucket keys `GET /v1/resources/{resource_id}/bucket/keys` The keys people made for the bucket itself, oldest first. The keys of connected services are not here; they are in each service's variables. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/resources/$RESOURCE_ID/bucket/keys \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "name": "api", "access": "read", "access_key_id": "e40c292c-4d25-45ca-ac47-ec31dc390cf5", "created_by": null, "created_at": "2026-11-04T09:30:00Z" } ] ``` ### List bucket objects `GET /v1/resources/{resource_id}/bucket/objects` One page of what a bucket holds under `prefix`, read as folders: the folders one level down, then the objects beside them, in key order. Pass a folder back as `prefix` to open it. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | | `prefix` | query | string | no | | | `cursor` | query | string | no | | | `limit` | query | integer | no | | ```bash curl https://api.dekka.cloud/v1/resources/$RESOURCE_ID/bucket/objects \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "prefix": "string", "folders": [ "string" ], "objects": [ { "key": "API_KEY", "size_bytes": 1, "modified_at": "2026-11-04T09:30:00Z" } ], "cursor": null, "simulated": false, "engine_kind": "string" } ``` ### Put bucket cors `PUT /v1/resources/{resource_id}/bucket/cors` Replaces the bucket's CORS rules with the ones sent. An empty list removes them all, and then no browser on another site can call the bucket. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | | `rules` | body | array of object | yes | | ```bash curl -X PUT https://api.dekka.cloud/v1/resources/$RESOURCE_ID/bucket/cors \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "rules": [ { "allowed_origins": [], "allowed_methods": [] } ] }' ``` ```json { "rules": [ { "allowed_origins": [], "allowed_methods": [], "allowed_headers": [], "expose_headers": [], "max_age_seconds": null } ] } ``` ### Delete bucket objects `POST /v1/resources/{resource_id}/bucket/objects/delete` Deletes the objects named in `keys` and everything under each folder in `prefixes`. Nothing deleted can be brought back. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | | `keys` | body | array of string | no | | | `prefixes` | body | array of string | no | Folders to delete whole, each ending in "/". | ```bash curl https://api.dekka.cloud/v1/resources/$RESOURCE_ID/bucket/objects/delete \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "keys": [ "string" ], "prefixes": [ "string" ] }' ``` ```json { "deleted": 1 } ``` ### Revoke bucket key `DELETE /v1/resources/{resource_id}/bucket/keys/{key_id}` Revokes one of the bucket's own keys at once. Whatever used it is refused from then on, and the key cannot be brought back. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | | `key_id` | path | uuid | yes | | ```bash curl -X DELETE https://api.dekka.cloud/v1/resources/$RESOURCE_ID/bucket/keys/$KEY_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```text 204 No Content ``` ## Volumes A volume is persistent disk attached to one service at a mount path. ### Delete volume `DELETE /v1/volumes/{volume_id}` Starts deleting the volume and its data. It disappears once the engine confirms. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `volume_id` | path | uuid | yes | | ```bash curl -X DELETE https://api.dekka.cloud/v1/volumes/$VOLUME_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "resource_id": "f70c4715-5954-46e3-a1f6-a7d6614a09ce", "name": "api", "mount_path": "string", "size_gb": 1, "pending_size_gb": null, "used_gb": null, "status": "pending", "status_reason": null, "active_operation": null, "backups": false, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ``` ### Attach a volume `POST /v1/resources/{resource_id}/volume` Attaches a new volume to a service and queues volume.create. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | | `name` | body | string | no | | | `mount_path` | body | string | no | | | `size_gb` | body | integer | no | Counted against the plan's volume_gb, or volume_gb_max on plans with overage | ```bash curl https://api.dekka.cloud/v1/resources/$RESOURCE_ID/volume \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "name": "data", "mount_path": "/data", "size_gb": 1 }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "resource_id": "f70c4715-5954-46e3-a1f6-a7d6614a09ce", "name": "api", "mount_path": "string", "size_gb": 1, "pending_size_gb": null, "used_gb": null, "status": "pending", "status_reason": null, "active_operation": null, "backups": false, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ``` ### Resize volume `POST /v1/volumes/{volume_id}/resize` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `volume_id` | path | uuid | yes | | | `size_gb` | body | integer | yes | Larger than the current size; volumes only grow | ```bash curl https://api.dekka.cloud/v1/volumes/$VOLUME_ID/resize \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "size_gb": 1 }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "resource_id": "f70c4715-5954-46e3-a1f6-a7d6614a09ce", "name": "api", "mount_path": "string", "size_gb": 1, "pending_size_gb": null, "used_gb": null, "status": "pending", "status_reason": null, "active_operation": null, "backups": false, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ``` ### Get a service's volume `GET /v1/resources/{resource_id}/volume` The service's volume, or null when it has none. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/resources/$RESOURCE_ID/volume \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "resource_id": "f70c4715-5954-46e3-a1f6-a7d6614a09ce", "name": "api", "mount_path": "string", "size_gb": 1, "pending_size_gb": null, "used_gb": null, "status": "pending", "status_reason": null, "active_operation": null, "backups": false, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ``` ## Backups Back up a database or a volume when you choose, and restore from any backup or to a point in time. ### Get backup `GET /v1/backups/{backup_id}` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `backup_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/backups/$BACKUP_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "resource_id": "f70c4715-5954-46e3-a1f6-a7d6614a09ce", "volume_id": null, "target": "resource", "kind": "scheduled", "status": "pending", "size_bytes": null, "error": null, "location": { "same_host_as_source": false, "region_id": null, "provider_ref": null, "verified": false, "note": "string" }, "operation_id": null, "active_operation": null, "started_at": null, "completed_at": null, "expires_at": null, "created_at": "2026-11-04T09:30:00Z" } ``` ### Restore backup `POST /v1/backups/{backup_id}/restore` Restores a completed backup over the current data (backup.restore). `confirm` must be the database's or the cache's name, or the volume's service's name; otherwise it answers 422 confirmation_required. A cache or a volume's service is stopped while its backup is put back. For a Postgres database, `target_time` restores to that moment instead of to the backup as taken. Returns the operation. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `backup_id` | path | uuid | yes | | | `confirm` | body | string | yes | The database's (or the volume's service's) name | | `target_time` | body | datetime | no | For a database, the moment to recover to. It must fall within the days the database's backups.retention_days keeps, and after the backup being restored was taken. Left out, the backup is restored as it was taken. | ```bash curl https://api.dekka.cloud/v1/backups/$BACKUP_ID/restore \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "confirm": "string" }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": null, "resource_id": null, "connection_id": null, "deployment_id": null, "type": "string", "state": "string", "phase": null, "progress": 1, "attempts": 1, "error": null, "request_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z", "completed_at": null } ``` ### Create database backup `POST /v1/resources/{resource_id}/backups` Takes a manual backup of a database or a cache now (backup.create). It is kept for 30 days. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | ```bash curl -X POST https://api.dekka.cloud/v1/resources/$RESOURCE_ID/backups \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "resource_id": "f70c4715-5954-46e3-a1f6-a7d6614a09ce", "volume_id": null, "target": "resource", "kind": "scheduled", "status": "pending", "size_bytes": null, "error": null, "location": { "same_host_as_source": false, "region_id": null, "provider_ref": null, "verified": false, "note": "string" }, "operation_id": null, "active_operation": null, "started_at": null, "completed_at": null, "expires_at": null, "created_at": "2026-11-04T09:30:00Z" } ``` ### Restore database `POST /v1/resources/{resource_id}/restore` Restores a Postgres database to `target_time`, or to its latest backup when `target_time` is left out (backup.restore). The time must fall within the days the database's `backups.retention_days` keeps, and `confirm` must be the database's name. Returns the operation. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | | `confirm` | body | string | yes | The database's (or the volume's service's) name | | `target_time` | body | datetime | no | For a database, the moment to recover to. It must fall within the days the database's backups.retention_days keeps, and after the backup being restored was taken. Left out, the backup is restored as it was taken. | ```bash curl https://api.dekka.cloud/v1/resources/$RESOURCE_ID/restore \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "confirm": "string" }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": null, "resource_id": null, "connection_id": null, "deployment_id": null, "type": "string", "state": "string", "phase": null, "progress": 1, "attempts": 1, "error": null, "request_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z", "completed_at": null } ``` ### Create volume backup `POST /v1/volumes/{volume_id}/backups` Backs the volume up now (backup.create). It is kept for 30 days. The engine also backs up every attached volume each night. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `volume_id` | path | uuid | yes | | ```bash curl -X POST https://api.dekka.cloud/v1/volumes/$VOLUME_ID/backups \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "resource_id": "f70c4715-5954-46e3-a1f6-a7d6614a09ce", "volume_id": null, "target": "resource", "kind": "scheduled", "status": "pending", "size_bytes": null, "error": null, "location": { "same_host_as_source": false, "region_id": null, "provider_ref": null, "verified": false, "note": "string" }, "operation_id": null, "active_operation": null, "started_at": null, "completed_at": null, "expires_at": null, "created_at": "2026-11-04T09:30:00Z" } ``` ### List database backups `GET /v1/resources/{resource_id}/backups` A Postgres database's or a Redis cache's backups, newest first: the ones taken on request and the ones taken every night, read from the engine. Each says where it is kept. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | | `limit` | query | integer | no | | ```bash curl https://api.dekka.cloud/v1/resources/$RESOURCE_ID/backups \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "resource_id": "f70c4715-5954-46e3-a1f6-a7d6614a09ce", "volume_id": null, "target": "resource", "kind": "scheduled", "status": "pending", "size_bytes": null, "error": null, "location": { "same_host_as_source": false, "region_id": null, "provider_ref": null, "verified": false, "note": "string" }, "operation_id": null, "active_operation": null, "started_at": null, "completed_at": null, "expires_at": null, "created_at": "2026-11-04T09:30:00Z" } ] ``` ### List volume backups `GET /v1/volumes/{volume_id}/backups` A volume's backups, newest first: the ones taken on request and the ones taken every night, read from the engine. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `volume_id` | path | uuid | yes | | | `limit` | query | integer | no | | ```bash curl https://api.dekka.cloud/v1/volumes/$VOLUME_ID/backups \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "resource_id": "f70c4715-5954-46e3-a1f6-a7d6614a09ce", "volume_id": null, "target": "resource", "kind": "scheduled", "status": "pending", "size_bytes": null, "error": null, "location": { "same_host_as_source": false, "region_id": null, "provider_ref": null, "verified": false, "note": "string" }, "operation_id": null, "active_operation": null, "started_at": null, "completed_at": null, "expires_at": null, "created_at": "2026-11-04T09:30:00Z" } ] ``` ## Domains Attach your own domain to a service and verify that you control it. ### Subdomain availability `GET /v1/domains/availability` Says whether a web service can take `subdomain`.apps.dekka.cloud. A label is lowercase letters, digits and hyphens, 3 to 40 characters, not one of Dekka's own names, and free across every organisation. The answer is a snapshot: creating the service with `subdomain` set is what claims it, and a label taken in between answers 409 subdomain_taken there. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `subdomain` | query | string | yes | The first part of an apps.dekka.cloud address | ```bash curl "https://api.dekka.cloud/v1/domains/availability?subdomain=$SUBDOMAIN" \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "subdomain": "string", "hostname": "app.example.com", "available": false, "reason": null, "message": "…" } ``` ### Delete domain `DELETE /v1/domains/{domain_id}` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `domain_id` | path | uuid | yes | | ```bash curl -X DELETE https://api.dekka.cloud/v1/domains/$DOMAIN_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```text 204 No Content ``` ### Verify domain `POST /v1/domains/{domain_id}/verify` Looks up the TXT record now. Success makes the domain active and starts certificate issuance; otherwise the domain is failed with the reason, and verifying again after fixing DNS is fine. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `domain_id` | path | uuid | yes | | ```bash curl -X POST https://api.dekka.cloud/v1/domains/$DOMAIN_ID/verify \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "resource_id": "f70c4715-5954-46e3-a1f6-a7d6614a09ce", "hostname": "app.example.com", "status": "pending", "certificate_status": "pending", "cname": { "type": "A", "name": "api", "value": "…" }, "a": null, "txt": { "type": "A", "name": "api", "value": "…" }, "cname_configured": null, "error": null, "verified_at": null, "last_checked_at": null, "created_at": "2026-11-04T09:30:00Z" } ``` ### Block source `POST /v1/projects/{project_id}/blocked-sources` Refuses every request from an address or range to the project's web services, with 403 at the ingress, within seconds. Many people can share one mobile network address, so a block may refuse others behind it. Blocking a source that is already blocked gives it the new end. Needs an admin signed in to the dashboard; an API key gets 403 session_required. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | | `source` | body | string | yes | An address such as 41.66.1.9, or a range such as 41.66.1.0/24 | | `finding_id` | body | uuid | no | The Dekka Sentry finding that named the source | | `duration` | body | "day" \| "week" \| "permanent" | no | How long the block holds. permanent lasts until someone unblocks it | ```bash curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/blocked-sources \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "source": "string" }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "source": "string", "finding_id": null, "blocked_by_user_id": null, "blocked_by": null, "created_at": "2026-11-04T09:30:00Z", "expires_at": null } ``` ### Create domain `POST /v1/resources/{resource_id}/domains` Adds a custom domain to an application. The response names the CNAME and TXT records to create before verifying. Needs a plan with custom_domains. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | | `hostname` | body | string | yes | For example shop.example.com | ```bash curl https://api.dekka.cloud/v1/resources/$RESOURCE_ID/domains \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "hostname": "app.example.com" }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "resource_id": "f70c4715-5954-46e3-a1f6-a7d6614a09ce", "hostname": "app.example.com", "status": "pending", "certificate_status": "pending", "cname": { "type": "A", "name": "api", "value": "…" }, "a": null, "txt": { "type": "A", "name": "api", "value": "…" }, "cname_configured": null, "error": null, "verified_at": null, "last_checked_at": null, "created_at": "2026-11-04T09:30:00Z" } ``` ### List blocked `GET /v1/projects/{project_id}/blocked-sources` The addresses and ranges the project refuses at the ingress, the newest first. Ended blocks are left out. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/blocked-sources \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "source": "string", "finding_id": null, "blocked_by_user_id": null, "blocked_by": null, "created_at": "2026-11-04T09:30:00Z", "expires_at": null } ] ``` ### List domains `GET /v1/resources/{resource_id}/domains` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `resource_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/resources/$RESOURCE_ID/domains \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "resource_id": "f70c4715-5954-46e3-a1f6-a7d6614a09ce", "hostname": "app.example.com", "status": "pending", "certificate_status": "pending", "cname": { "type": "A", "name": "api", "value": "…" }, "a": null, "txt": { "type": "A", "name": "api", "value": "…" }, "cname_configured": null, "error": null, "verified_at": null, "last_checked_at": null, "created_at": "2026-11-04T09:30:00Z" } ] ``` ### Unblock source `DELETE /v1/projects/{project_id}/blocked-sources/{block_id}` Serves the source again, within seconds. Needs an admin signed in to the dashboard. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `block_id` | path | uuid | yes | | | `project_id` | path | uuid | yes | | ```bash curl -X DELETE https://api.dekka.cloud/v1/projects/$PROJECT_ID/blocked-sources/$BLOCK_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```text 204 No Content ``` ## Logs Search the logs of every service in a project at once. ### Search logs `GET /v1/projects/{project_id}/logs/search` Deployment and job run log lines in the project, newest first, paged with a keyset cursor. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | | `q` | query | string | no | Case-insensitive substring | | `resource_id` | query | uuid | no | | | `environment_id` | query | uuid | no | | | `stream` | query | "build" \| "deploy" \| "runtime" | no | | | `since` | query | datetime | no | | | `until` | query | datetime | no | | | `limit` | query | integer | no | | | `cursor` | query | string | no | | ```bash curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/logs/search \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "lines": [ { "source": "deployment", "source_id": "f60c4582-4152-4284-a733-d4898e984268", "resource_id": "f70c4715-5954-46e3-a1f6-a7d6614a09ce", "resource_name": "string", "environment_id": "e00c22e0-421a-471d-a890-ca4becee31f3", "stream": "string", "seq": 1, "ts": "2026-11-04T09:30:00Z", "line": "string" } ], "next_cursor": null } ``` ## Operations Work that takes a while, such as creating a database, is tracked as an operation you can poll. ### Get operation `GET /v1/operations/{operation_id}` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `operation_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/operations/$OPERATION_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": null, "resource_id": null, "connection_id": null, "deployment_id": null, "type": "string", "state": "string", "phase": null, "progress": 1, "attempts": 1, "error": null, "request_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z", "completed_at": null } ``` ### List project operations `GET /v1/projects/{project_id}/operations` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | | `active` | query | boolean | no | | | `limit` | query | integer | no | | ```bash curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/operations \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": null, "resource_id": null, "connection_id": null, "deployment_id": null, "type": "string", "state": "string", "phase": null, "progress": 1, "attempts": 1, "error": null, "request_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z", "completed_at": null } ] ``` ## Webhooks A webhook sends a signed request to your endpoint when deployments and other events happen in a project. ### Update webhook `PATCH /v1/webhooks/{webhook_id}` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `webhook_id` | path | uuid | yes | | | `url` | body | string | no | | | `events` | body | array of "deployment.started" \| "deployment.succeeded" \| "deployment.failed" \| "deployment.crashed" \| "sentry.finding" | no | | | `description` | body | string | no | | | `enabled` | body | boolean | no | | ```bash curl -X PATCH https://api.dekka.cloud/v1/webhooks/$WEBHOOK_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "url": "https://example.com/hooks/dekka", "events": [ "deployment.started" ], "description": "string" }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "url": "https://example.com/hooks/dekka", "events": [ "string" ], "description": null, "enabled": false, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ``` ### Delete webhook `DELETE /v1/webhooks/{webhook_id}` Deletes the webhook and its delivery history. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `webhook_id` | path | uuid | yes | | ```bash curl -X DELETE https://api.dekka.cloud/v1/webhooks/$WEBHOOK_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```text 204 No Content ``` ### Create project webhook `POST /v1/projects/{project_id}/webhooks` Posts signed deploy events to `url`. The signing secret is in `secret`, and only in this response. Refused with 422 invalid_webhook_url for a URL that is not http(s), or in production not https or not public. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | | `url` | body | string | yes | Where events are posted. Production accepts https URLs only. | | `events` | body | array of "deployment.started" \| "deployment.succeeded" \| "deployment.failed" \| "deployment.crashed" \| "sentry.finding" | no | | | `description` | body | string | no | | | `enabled` | body | boolean | no | | ```bash curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/webhooks \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "url": "https://example.com/hooks/dekka" }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "url": "https://example.com/hooks/dekka", "events": [ "string" ], "description": null, "enabled": false, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z", "secret": "string" } ``` ### Redeliver webhook delivery `POST /v1/webhook-deliveries/{delivery_id}/redeliver` Queues a delivered or failed delivery again, with the same id and body and a fresh set of attempts. 409 delivery_pending while it is still being sent. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `delivery_id` | path | uuid | yes | | ```bash curl -X POST https://api.dekka.cloud/v1/webhook-deliveries/$DELIVERY_ID/redeliver \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "webhook_id": "f20c3f36-5b47-4e16-a7d7-a3c26176a30b", "event": "string", "status": "pending", "attempts": 1, "next_attempt_at": null, "response_status": null, "response_excerpt": null, "error": null, "delivered_at": null, "created_at": "2026-11-04T09:30:00Z", "payload": {} } ``` ### Rotate webhook secret `POST /v1/webhooks/{webhook_id}/rotate-secret` Replaces the signing secret at once. The new one is in `secret`, and only in this response. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `webhook_id` | path | uuid | yes | | ```bash curl -X POST https://api.dekka.cloud/v1/webhooks/$WEBHOOK_ID/rotate-secret \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "url": "https://example.com/hooks/dekka", "events": [ "string" ], "description": null, "enabled": false, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z", "secret": "string" } ``` ### Test webhook `POST /v1/webhooks/{webhook_id}/test` Sends a `webhook.test` event now, even when the webhook is turned off, and returns the delivery with the endpoint's answer. A failed test is not retried. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `webhook_id` | path | uuid | yes | | ```bash curl -X POST https://api.dekka.cloud/v1/webhooks/$WEBHOOK_ID/test \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "webhook_id": "f20c3f36-5b47-4e16-a7d7-a3c26176a30b", "event": "string", "status": "pending", "attempts": 1, "next_attempt_at": null, "response_status": null, "response_excerpt": null, "error": null, "delivered_at": null, "created_at": "2026-11-04T09:30:00Z", "payload": {} } ``` ### List project webhooks `GET /v1/projects/{project_id}/webhooks` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/webhooks \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "url": "https://example.com/hooks/dekka", "events": [], "description": null, "enabled": false, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ] ``` ### List webhook deliveries `GET /v1/webhooks/{webhook_id}/deliveries` Newest first. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `webhook_id` | path | uuid | yes | | | `limit` | query | integer | no | | ```bash curl https://api.dekka.cloud/v1/webhooks/$WEBHOOK_ID/deliveries \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "webhook_id": "f20c3f36-5b47-4e16-a7d7-a3c26176a30b", "event": "string", "status": "pending", "attempts": 1, "next_attempt_at": null, "response_status": null, "response_excerpt": null, "error": null, "delivered_at": null, "created_at": "2026-11-04T09:30:00Z", "payload": {} } ] ``` ## Registry credentials Credentials that let Dekka pull private images from a container registry. ### Create registry credential `POST /v1/orgs/{org_id}/registry-credentials` Stores a username and password or token for a private registry. The password is encrypted and only its last four characters are returned. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | | `name` | body | string | yes | A label, such as 'GitHub packages' | | `registry` | body | string | yes | The registry host, such as ghcr.io or docker.io | | `username` | body | string | yes | | | `password` | body | string | yes | A password or access token. Never returned. | ```bash curl https://api.dekka.cloud/v1/orgs/$ORG_ID/registry-credentials \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "name": "api", "registry": "string", "username": "string", "password": "string" }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "name": "api", "registry": "string", "username": "string", "last4": "string", "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ``` ### List registry credentials `GET /v1/orgs/{org_id}/registry-credentials` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/orgs/$ORG_ID/registry-credentials \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "name": "api", "registry": "string", "username": "string", "last4": "string", "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ] ``` ### Delete registry credential `DELETE /v1/orgs/{org_id}/registry-credentials/{credential_id}` Refused with 409 registry_credential_in_use while a service's image source names it. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `credential_id` | path | uuid | yes | | | `org_id` | path | uuid | yes | | ```bash curl -X DELETE https://api.dekka.cloud/v1/orgs/$ORG_ID/registry-credentials/$CREDENTIAL_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```text 204 No Content ``` ## Virtual servers Create, resize and rebuild virtual servers, and manage the SSH keys they accept. ### List server sizes `GET /v1/catalog/servers` Runtime profiles, sizes and images for virtual servers. Prices are a hypothesis in GHS, and a server is billed at the hourly price for every hour it exists. A profile is `offered` when the engine advertises it right now, and a size is `available` when a ready host has room for it; when the engine cannot be reached nothing is offered or available, and `capacity_known` says so. ```bash curl https://api.dekka.cloud/v1/catalog/servers \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "runtime_profiles": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "isolation": "string", "product_name": "string", "nested_virtualization": false, "offered": false } ], "sizes": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "name": "api", "tier": null, "runtime_profile": "string", "vcpu": 1, "memory_mib": 1, "disk_gb": 1, "monthly_price": "string", "hourly_price": "string", "currency": "string", "offered": false, "available": false } ], "images": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "runtime_profile": "string", "name": "api", "family": "string", "version": "string", "available": false } ], "currency": "string", "is_hypothesis": false, "capacity_known": false } ``` ### Get server `GET /v1/servers/{server_id}` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `server_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/servers/$SERVER_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "name": "api", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "environment_id": "e00c22e0-421a-471d-a890-ca4becee31f3", "region_id": "f70c4715-5954-46e3-a5f6-94f25b2beb48", "runtime_profile": "string", "isolation": "string", "state": "provisioning", "size_id": "f60c4582-3f52-4f5e-a42d-d8d2b82c235c", "pending_size_id": null, "image_id": "ec0c35c4-3f38-4778-a0e3-7f812b22557f", "ipv4": null, "ipv6": null, "private_ipv4": null, "hostname": "app.example.com", "booted_at": null, "hourly_price_minor": 1, "ssh_key_fingerprints": [ "string" ], "shell": false, "sentry_agent": false, "status_reason": null, "active_operation": null, "created_at": "2026-11-04T09:30:00Z", "billing": null, "checkout_url": null } ``` ### Delete server `DELETE /v1/servers/{server_id}` Starts deleting the server and its disk; `?confirm=` is required. Billing stops at the end of the hour the engine confirms the delete in. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `server_id` | path | uuid | yes | | | `confirm` | query | string | no | | ```bash curl -X DELETE https://api.dekka.cloud/v1/servers/$SERVER_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "name": "api", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "environment_id": "e00c22e0-421a-471d-a890-ca4becee31f3", "region_id": "f70c4715-5954-46e3-a5f6-94f25b2beb48", "runtime_profile": "string", "isolation": "string", "state": "provisioning", "size_id": "f60c4582-3f52-4f5e-a42d-d8d2b82c235c", "pending_size_id": null, "image_id": "ec0c35c4-3f38-4778-a0e3-7f812b22557f", "ipv4": null, "ipv6": null, "private_ipv4": null, "hostname": "app.example.com", "booted_at": null, "hourly_price_minor": 1, "ssh_key_fingerprints": [ "string" ], "shell": false, "sentry_agent": false, "status_reason": null, "active_operation": null, "created_at": "2026-11-04T09:30:00Z", "billing": null, "checkout_url": null } ``` ### Delete SSH key `DELETE /v1/ssh-keys/{key_id}` Servers created with this key keep it. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `key_id` | path | uuid | yes | | ```bash curl -X DELETE https://api.dekka.cloud/v1/ssh-keys/$KEY_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```text 204 No Content ``` ### Create SSH key `POST /v1/orgs/{org_id}/ssh-keys` Saves a public key for new servers. Private keys are refused with 422 private_key_rejected, and the same key twice with 409 ssh_key_exists. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | | `name` | body | string | yes | | | `public_key` | body | string | yes | One OpenSSH public key: ssh-ed25519, ecdsa-sha2-nistp256/384/521, or ssh-rsa of 2048 bits or more | ```bash curl https://api.dekka.cloud/v1/orgs/$ORG_ID/ssh-keys \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "name": "api", "public_key": "string" }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "name": "api", "fingerprint": "string", "public_key": "string", "key_type": "string", "comment": null, "created_at": "2026-11-04T09:30:00Z" } ``` ### Create server `POST /v1/projects/{project_id}/servers` Creates a virtual_machine resource and queues vm.provision. The same as POST /v1/projects/{project_id}/resources with kind virtual_machine. The runtime profile is fixed from here on, and the size and image must belong to it. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | | `name` | body | string | yes | Lowercase letters, digits and dashes | | `runtime_profile` | body | "firecracker-linux-v1" \| "gvisor-system-linux-v1" \| "kvm-linux-v1" | no | The runtime profile the server runs under, fixed after creation. Left out, it is the size's own profile. GET /v1/catalog/servers lists the profiles on offer, and the size and image must belong to it. | | `size_id` | body | string | yes | | | `image_id` | body | string | yes | | | `ssh_key_ids` | body | array of uuid | yes | Installed for root | | `hostname` | body | string | no | Defaults to the name | | `user_data` | body | string | no | First-boot user data, up to 32 KiB. Stored encrypted and never returned. | | `shell` | body | boolean | no | Whether the server opens as a terminal from its page, signed in as root. Only a kvm-linux-v1 server has one, and it can be switched on and off afterwards. | | `skip_payment` | body | boolean | no | Dekka's team only: make the server at once without paying for its first month, billed by the hour as before. Anyone else gets 403 staff_only. | | `sentry_agent` | body | boolean | no | Whether the Dekka Sentry agent is installed when the server first starts, and again when it is rebuilt. The project has to have Dekka Sentry on. | | `environment_id` | body | uuid | no | Defaults to the project's default environment | | `region_id` | body | string | no | Defaults to the project's region | ```bash curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/servers \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "name": "api", "size_id": "f60c4582-3f52-4f5e-a42d-d8d2b82c235c", "image_id": "ec0c35c4-3f38-4778-a0e3-7f812b22557f", "ssh_key_ids": [ "ec0c35c4-3838-4c73-a8d2-29c841d79e7d" ] }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "name": "api", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "environment_id": "e00c22e0-421a-471d-a890-ca4becee31f3", "region_id": "f70c4715-5954-46e3-a5f6-94f25b2beb48", "runtime_profile": "string", "isolation": "string", "state": "provisioning", "size_id": "f60c4582-3f52-4f5e-a42d-d8d2b82c235c", "pending_size_id": null, "image_id": "ec0c35c4-3f38-4778-a0e3-7f812b22557f", "ipv4": null, "ipv6": null, "private_ipv4": null, "hostname": "app.example.com", "booted_at": null, "hourly_price_minor": 1, "ssh_key_fingerprints": [ "string" ], "shell": false, "sentry_agent": false, "status_reason": null, "active_operation": null, "created_at": "2026-11-04T09:30:00Z", "billing": null, "checkout_url": null } ``` ### Pay for server `POST /v1/servers/{server_id}/checkout` Starts a checkout for what a server paid for a month ahead owes: its first month while it waits to be made, or its next month when it is paid by hand or its month has ended unpaid. Send the browser to `checkout_url`. A server stopped for an unpaid month starts again once it is paid for. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `server_id` | path | uuid | yes | | ```bash curl -X POST https://api.dekka.cloud/v1/servers/$SERVER_ID/checkout \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "name": "api", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "environment_id": "e00c22e0-421a-471d-a890-ca4becee31f3", "region_id": "f70c4715-5954-46e3-a5f6-94f25b2beb48", "runtime_profile": "string", "isolation": "string", "state": "provisioning", "size_id": "f60c4582-3f52-4f5e-a42d-d8d2b82c235c", "pending_size_id": null, "image_id": "ec0c35c4-3f38-4778-a0e3-7f812b22557f", "ipv4": null, "ipv6": null, "private_ipv4": null, "hostname": "app.example.com", "booted_at": null, "hourly_price_minor": 1, "ssh_key_fingerprints": [ "string" ], "shell": false, "sentry_agent": false, "status_reason": null, "active_operation": null, "created_at": "2026-11-04T09:30:00Z", "billing": null, "checkout_url": null } ``` ### Rebuild server `POST /v1/servers/{server_id}/rebuild` Wipes the disk and installs the image, keeping the address, size, SSH keys and user data. `confirm` must be the server's name. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `server_id` | path | uuid | yes | | | `image_id` | body | string | yes | | | `confirm` | body | string | yes | The server's name. Rebuilding wipes the disk. | ```bash curl https://api.dekka.cloud/v1/servers/$SERVER_ID/rebuild \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "image_id": "ec0c35c4-3f38-4778-a0e3-7f812b22557f", "confirm": "string" }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "name": "api", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "environment_id": "e00c22e0-421a-471d-a890-ca4becee31f3", "region_id": "f70c4715-5954-46e3-a5f6-94f25b2beb48", "runtime_profile": "string", "isolation": "string", "state": "provisioning", "size_id": "f60c4582-3f52-4f5e-a42d-d8d2b82c235c", "pending_size_id": null, "image_id": "ec0c35c4-3f38-4778-a0e3-7f812b22557f", "ipv4": null, "ipv6": null, "private_ipv4": null, "hostname": "app.example.com", "booted_at": null, "hourly_price_minor": 1, "ssh_key_fingerprints": [ "string" ], "shell": false, "sentry_agent": false, "status_reason": null, "active_operation": null, "created_at": "2026-11-04T09:30:00Z", "billing": null, "checkout_url": null } ``` ### Resize server `POST /v1/servers/{server_id}/resize` Needs a stopped server, and a size from the same runtime profile whose disk is at least as large, because disks never shrink. The server stays stopped afterwards. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `server_id` | path | uuid | yes | | | `size_id` | body | string | yes | A size whose disk is at least as large | ```bash curl https://api.dekka.cloud/v1/servers/$SERVER_ID/resize \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "size_id": "f60c4582-3f52-4f5e-a42d-d8d2b82c235c" }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "name": "api", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "environment_id": "e00c22e0-421a-471d-a890-ca4becee31f3", "region_id": "f70c4715-5954-46e3-a5f6-94f25b2beb48", "runtime_profile": "string", "isolation": "string", "state": "provisioning", "size_id": "f60c4582-3f52-4f5e-a42d-d8d2b82c235c", "pending_size_id": null, "image_id": "ec0c35c4-3f38-4778-a0e3-7f812b22557f", "ipv4": null, "ipv6": null, "private_ipv4": null, "hostname": "app.example.com", "booted_at": null, "hourly_price_minor": 1, "ssh_key_fingerprints": [ "string" ], "shell": false, "sentry_agent": false, "status_reason": null, "active_operation": null, "created_at": "2026-11-04T09:30:00Z", "billing": null, "checkout_url": null } ``` ### Create server snapshot `POST /v1/servers/{server_id}/snapshots` Takes a snapshot of the disk, with the server running or stopped. A server holds at most ten. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `server_id` | path | uuid | yes | | | `name` | body | string | yes | One line, without quotes, backslashes or dollar signs | ```bash curl https://api.dekka.cloud/v1/servers/$SERVER_ID/snapshots \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "name": "api" }' ``` ```json { "snapshots": [ { "id": 1, "name": "api", "created_at": "2026-11-04T09:30:00Z", "size_mib": 1, "current": false, "nightly": false } ], "nightly": false, "keep": 1, "busy": false } ``` ### List SSH keys `GET /v1/orgs/{org_id}/ssh-keys` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/orgs/$ORG_ID/ssh-keys \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "name": "api", "fingerprint": "string", "public_key": "string", "key_type": "string", "comment": null, "created_at": "2026-11-04T09:30:00Z" } ] ``` ### List servers `GET /v1/projects/{project_id}/servers` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/servers \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "name": "api", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "environment_id": "e00c22e0-421a-471d-a890-ca4becee31f3", "region_id": "f70c4715-5954-46e3-a5f6-94f25b2beb48", "runtime_profile": "string", "isolation": "string", "state": "provisioning", "size_id": "f60c4582-3f52-4f5e-a42d-d8d2b82c235c", "pending_size_id": null, "image_id": "ec0c35c4-3f38-4778-a0e3-7f812b22557f", "ipv4": null, "ipv6": null, "private_ipv4": null, "hostname": "app.example.com", "booted_at": null, "hourly_price_minor": 1, "ssh_key_fingerprints": [], "shell": false, "sentry_agent": false, "status_reason": null, "active_operation": null, "created_at": "2026-11-04T09:30:00Z", "billing": null, "checkout_url": null } ] ``` ### List server snapshots `GET /v1/servers/{server_id}/snapshots` A KVM server's disk snapshots and whether one is taken each night. A snapshot lives on the same host as the disk: it undoes a change in seconds and is not a backup. A server that takes none answers with an empty list. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `server_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/servers/$SERVER_ID/snapshots \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "snapshots": [ { "id": 1, "name": "api", "created_at": "2026-11-04T09:30:00Z", "size_mib": 1, "current": false, "nightly": false } ], "nightly": false, "keep": 1, "busy": false } ``` ### Set server root password `PUT /v1/servers/{server_id}/root-password` Sets root's password on a KVM server. It takes effect the next time the server is started after being stopped, and is asked for on the server's console and nowhere else, since SSH takes keys only. The password is hashed here and is never stored or logged. Like the console it opens, this takes a signed-in person and not an API key. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `server_id` | path | uuid | yes | | | `password` | body | string | yes | Root's new password. It is hashed before it leaves the API and is never stored. | ```bash curl -X PUT https://api.dekka.cloud/v1/servers/$SERVER_ID/root-password \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "password": "string" }' ``` ```text 204 No Content ``` ### Switch server shell on `PUT /v1/servers/{server_id}/shell` Switches the shell on for a KVM server: a terminal from its page, signed in as root with a certificate that is signed for the one session and lasts two minutes, so no key or password of the customer's is used. A server created with the shell on trusts it already. One that was not is given a command here to run once as root. Asking again answers the same command and changes nothing. Like the shell it opens, this takes a signed-in person and not an API key. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `server_id` | path | uuid | yes | | ```bash curl -X PUT https://api.dekka.cloud/v1/servers/$SERVER_ID/shell \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "command": "string" } ``` ### Switch server shell off `DELETE /v1/servers/{server_id}/shell` Switches the shell off. The key that signs for the server is deleted and any shell open on it ends, so nothing can sign in that way until it is switched on again, which makes a new key. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `server_id` | path | uuid | yes | | ```bash curl -X DELETE https://api.dekka.cloud/v1/servers/$SERVER_ID/shell \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```text 204 No Content ``` ### Run server action `POST /v1/servers/{server_id}/actions/{action}` start needs a stopped or failed server; stop and reboot a running one. Another vm operation in progress answers 409 operation_in_progress. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `server_id` | path | uuid | yes | | | `action` | path | "start" \| "stop" \| "reboot" | yes | | ```bash curl -X POST https://api.dekka.cloud/v1/servers/$SERVER_ID/actions/$ACTION \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "name": "api", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "environment_id": "e00c22e0-421a-471d-a890-ca4becee31f3", "region_id": "f70c4715-5954-46e3-a5f6-94f25b2beb48", "runtime_profile": "string", "isolation": "string", "state": "provisioning", "size_id": "f60c4582-3f52-4f5e-a42d-d8d2b82c235c", "pending_size_id": null, "image_id": "ec0c35c4-3f38-4778-a0e3-7f812b22557f", "ipv4": null, "ipv6": null, "private_ipv4": null, "hostname": "app.example.com", "booted_at": null, "hourly_price_minor": 1, "ssh_key_fingerprints": [ "string" ], "shell": false, "sentry_agent": false, "status_reason": null, "active_operation": null, "created_at": "2026-11-04T09:30:00Z", "billing": null, "checkout_url": null } ``` ### Set server snapshot schedule `PUT /v1/servers/{server_id}/snapshots/schedule` Turns the nightly snapshot on or off. The newest `keep` nightly snapshots are kept, and the ones people took are left alone. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `server_id` | path | uuid | yes | | | `nightly` | body | boolean | yes | | | `keep` | body | integer | no | | ```bash curl -X PUT https://api.dekka.cloud/v1/servers/$SERVER_ID/snapshots/schedule \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "nightly": false }' ``` ```json { "snapshots": [ { "id": 1, "name": "api", "created_at": "2026-11-04T09:30:00Z", "size_mib": 1, "current": false, "nightly": false } ], "nightly": false, "keep": 1, "busy": false } ``` ### Delete server snapshot `DELETE /v1/servers/{server_id}/snapshots/{snapshot_id}` Deletes one snapshot. The disk as it is now is not touched. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `server_id` | path | uuid | yes | | | `snapshot_id` | path | integer | yes | | ```bash curl -X DELETE https://api.dekka.cloud/v1/servers/$SERVER_ID/snapshots/$SNAPSHOT_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "snapshots": [ { "id": 1, "name": "api", "created_at": "2026-11-04T09:30:00Z", "size_mib": 1, "current": false, "nightly": false } ], "nightly": false, "keep": 1, "busy": false } ``` ### Revert server snapshot `POST /v1/servers/{server_id}/snapshots/{snapshot_id}/revert` Puts the disk back as the snapshot holds it. The server has to be stopped, what was written since is lost, and `confirm` must be the server's name. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `server_id` | path | uuid | yes | | | `snapshot_id` | path | integer | yes | | | `confirm` | body | string | yes | The server's name, since what was written after the snapshot is lost | ```bash curl https://api.dekka.cloud/v1/servers/$SERVER_ID/snapshots/$SNAPSHOT_ID/revert \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "confirm": "string" }' ``` ```json { "snapshots": [ { "id": 1, "name": "api", "created_at": "2026-11-04T09:30:00Z", "size_mib": 1, "current": false, "nightly": false } ], "nightly": false, "keep": 1, "busy": false } ``` ## GPU instances Request GPU instances, which have a waitlist, and manage inference endpoints. ### List GPU instance types `GET /v1/catalog/gpu-instances` GPU instances Dekka plans to offer. None can be provisioned yet, so every entry is on the waitlist and has no price until a host quotes. ```bash curl https://api.dekka.cloud/v1/catalog/gpu-instances \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "name": "api", "gpu_class": "string", "gpu_count": 1, "gpu_memory_gb": 1, "vcpu": 1, "memory_gib": 1, "disk_gb": 1, "indicative_monthly_price": null, "currency": "string", "is_hypothesis": false, "notes": null, "available": false, "availability": "waitlist", "description": "GPU instances cannot be provisioned yet, because no GPU capacity is available in any region. Join the waitlist and Dekka will contact you when it is." } ] ``` ### Get inference endpoint `GET /v1/inference-endpoints/{endpoint_id}` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `endpoint_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/inference-endpoints/$ENDPOINT_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": null, "name": "api", "slug": "api", "gateway_model": "string", "model_id": "e80c2f78-612e-4fa2-af9c-018c8c97035e", "gpu_class": "string", "min_replicas": 1, "max_replicas": 1, "state": "requested", "availability": "waitlist", "status_reason": null, "description": "string", "created_by_user_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ``` ### Update inference endpoint `PATCH /v1/inference-endpoints/{endpoint_id}` Change the model, GPU class or replica range. The name, and so the gateway model id, stays fixed. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `endpoint_id` | path | uuid | yes | | | `model_id` | body | string | no | | | `gpu_class` | body | string | no | | | `min_replicas` | body | integer | no | | | `max_replicas` | body | integer | no | | ```bash curl -X PATCH https://api.dekka.cloud/v1/inference-endpoints/$ENDPOINT_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "model_id": "e80c2f78-612e-4fa2-af9c-018c8c97035e", "gpu_class": "string", "min_replicas": 0 }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": null, "name": "api", "slug": "api", "gateway_model": "string", "model_id": "e80c2f78-612e-4fa2-af9c-018c8c97035e", "gpu_class": "string", "min_replicas": 1, "max_replicas": 1, "state": "requested", "availability": "waitlist", "status_reason": null, "description": "string", "created_by_user_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ``` ### Withdraw GPU request `DELETE /v1/gpu-requests/{request_id}` Withdraw a request. It is closed and no longer listed. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `request_id` | path | uuid | yes | | ```bash curl -X DELETE https://api.dekka.cloud/v1/gpu-requests/$REQUEST_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```text 204 No Content ``` ### Delete inference endpoint `DELETE /v1/inference-endpoints/{endpoint_id}` Delete the endpoint. The gateway stops answering its model at once. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `endpoint_id` | path | uuid | yes | | ```bash curl -X DELETE https://api.dekka.cloud/v1/inference-endpoints/$ENDPOINT_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```text 204 No Content ``` ### Create inference endpoint `POST /v1/orgs/{org_id}/inference-endpoints` Create a private inference endpoint for an open-weights model. It is waitlisted at once, because no GPU capacity is available yet. Outside production the AI gateway answers `private/` with a simulated reply, so an app can be built against it now. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | | `name` | body | string | yes | Lowercase letters, digits and dashes. The gateway model is private/. | | `model_id` | body | string | yes | An open-weights model by its Hugging Face id, such as meta-llama/Llama-3.1-8B-Instruct | | `gpu_class` | body | string | yes | A gpu_class from GET /v1/catalog/gpu-instances | | `min_replicas` | body | integer | no | Zero lets the endpoint scale to zero when idle | | `max_replicas` | body | integer | no | | | `project_id` | body | uuid | no | Limit the endpoint to one project's keys | ```bash curl https://api.dekka.cloud/v1/orgs/$ORG_ID/inference-endpoints \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "name": "api", "model_id": "e80c2f78-612e-4fa2-af9c-018c8c97035e", "gpu_class": "string" }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": null, "name": "api", "slug": "api", "gateway_model": "string", "model_id": "e80c2f78-612e-4fa2-af9c-018c8c97035e", "gpu_class": "string", "min_replicas": 1, "max_replicas": 1, "state": "requested", "availability": "waitlist", "status_reason": null, "description": "string", "created_by_user_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ``` ### List inference endpoints `GET /v1/orgs/{org_id}/inference-endpoints` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/orgs/$ORG_ID/inference-endpoints \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": null, "name": "api", "slug": "api", "gateway_model": "string", "model_id": "e80c2f78-612e-4fa2-af9c-018c8c97035e", "gpu_class": "string", "min_replicas": 1, "max_replicas": 1, "state": "requested", "availability": "waitlist", "status_reason": null, "description": "string", "created_by_user_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ] ``` ### Create GPU request `POST /v1/orgs/{org_id}/gpu/requests` Join the waitlist for a GPU instance, or ask to reserve some. The request is received, Dekka contacts the organization when capacity is available, and then closes it. Nothing is provisioned or billed. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | | `offering_id` | body | string | yes | An id from GET /v1/catalog/gpu-instances | | `kind` | body | "waitlist" \| "reservation" | no | | | `quantity` | body | integer | no | How many instances | | `region_id` | body | string | no | A preferred region, or null for any | | `use_case` | body | string | yes | What the GPUs are for | | `desired_start` | body | string | no | | ```bash curl https://api.dekka.cloud/v1/orgs/$ORG_ID/gpu/requests \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "offering_id": "ea0c329e-6a34-4dfb-af3d-014d6808d6b1", "use_case": "string" }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "offering_id": "ea0c329e-6a34-4dfb-af3d-014d6808d6b1", "kind": "waitlist", "quantity": 1, "region_id": null, "use_case": "string", "desired_start": null, "status": "received", "availability": "waitlist", "created_by_user_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ``` ### List GPU requests `GET /v1/orgs/{org_id}/gpu/requests` The organization's waitlist and reservation requests, newest first, without withdrawn ones. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/orgs/$ORG_ID/gpu/requests \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "offering_id": "ea0c329e-6a34-4dfb-af3d-014d6808d6b1", "kind": "waitlist", "quantity": 1, "region_id": null, "use_case": "string", "desired_start": null, "status": "received", "availability": "waitlist", "created_by_user_id": null, "created_at": "2026-11-04T09:30:00Z", "updated_at": "2026-11-04T09:30:00Z" } ] ``` ## AI Provider keys, routing policies, request history and metrics for the AI Gateway. ### List AI models `GET /v1/catalog/ai-models` Every model in the catalogue at the providers' list prices in US dollars, which are a snapshot to check before launch. Both providers process requests in the United States, outside Ghana. ```bash curl https://api.dekka.cloud/v1/catalog/ai-models \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "provider": "openai", "provider_model": "string", "display_name": "string", "kind": "chat", "input_modalities": [], "output_modalities": [], "context_window": 1, "pricing_unit": "tokens", "input_price_per_mtok": "string", "output_price_per_mtok": "string", "currency": "string", "processing_region": "string", "processing_outside_ghana": false, "available": false, "notes": null } ] ``` ### Revoke provider key `DELETE /v1/ai/provider-keys/{key_id}` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `key_id` | path | uuid | yes | | ```bash curl -X DELETE https://api.dekka.cloud/v1/ai/provider-keys/$KEY_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```text 204 No Content ``` ### Create provider key `POST /v1/orgs/{org_id}/ai/provider-keys` Stores the key encrypted and replaces the provider's current key, if any. OpenAI keys start with sk- and Anthropic keys with sk-ant-. Only the last four characters are shown again. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | | `provider` | body | "openai" \| "anthropic" \| "google" \| "deepseek" \| "moonshot" \| "zai" | yes | | | `name` | body | string | yes | | | `key` | body | string | yes | Shown only to the provider. Dekka keeps the last 4. | ```bash curl https://api.dekka.cloud/v1/orgs/$ORG_ID/ai/provider-keys \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "provider": "openai", "name": "api", "key": "API_KEY" }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "organization_id": "ea0c329e-5e34-4b17-ae20-647660fd8b7c", "provider": "openai", "name": "api", "last4": "string", "created_by_user_id": null, "created_at": "2026-11-04T09:30:00Z", "revoked_at": null } ``` ### Get AI metrics `GET /v1/orgs/{org_id}/ai/metrics` Requests, tokens, spend at list price and errors per UTC day (every day in the range, zeros included) and per model, with totals. `end` is inclusive and the range defaults to the last 14 days. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | | `start` | query | string | no | | | `end` | query | string | no | | | `project_id` | query | uuid | no | | ```bash curl https://api.dekka.cloud/v1/orgs/$ORG_ID/ai/metrics \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "start": "2026-11-04", "end": "2026-11-04", "project_id": null, "totals": { "requests": 0, "input_tokens": 0, "output_tokens": 0, "cost_usd": "0", "errors": 0 }, "by_day": [ { "requests": 0, "input_tokens": 0, "output_tokens": 0, "cost_usd": "0", "errors": 0, "day": "2026-11-04" } ], "by_model": [ { "requests": 0, "input_tokens": 0, "output_tokens": 0, "cost_usd": "0", "errors": 0, "model": "auto" } ] } ``` ### List provider keys `GET /v1/orgs/{org_id}/ai/provider-keys` The org's own OpenAI and Anthropic keys, newest first, revoked ones included. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/orgs/$ORG_ID/ai/provider-keys \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "organization_id": "ea0c329e-5e34-4b17-ae20-647660fd8b7c", "provider": "openai", "name": "api", "last4": "string", "created_by_user_id": null, "created_at": "2026-11-04T09:30:00Z", "revoked_at": null } ] ``` ### List AI requests `GET /v1/orgs/{org_id}/ai/requests` Gateway requests, newest first. `model` matches the requested or the serving model. Prompts and replies are never stored. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | | `project_id` | query | uuid | no | | | `model` | query | string | no | | | `status` | query | "succeeded" \| "failed" \| "rejected" | no | | | `cursor` | query | string | no | | | `limit` | query | integer | no | | ```bash curl https://api.dekka.cloud/v1/orgs/$ORG_ID/ai/requests \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "items": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": null, "api_key_id": null, "requested_model": "string", "kind": "chat", "served_model": null, "provider": null, "route": null, "status": "succeeded", "http_status": 1, "error_code": null, "input_tokens": 1, "output_tokens": 1, "latency_ms": 1, "time_to_first_token_ms": null, "cost_usd": "string", "stream": false, "fallback_from": null, "veil_mode": null, "veil_policy": null, "veil_findings": null, "veil_by_entity": null, "veil_by_action": null, "veil_blocked": null, "veil_latency_ms": null, "veil_response_findings": null, "created_at": "2026-11-04T09:30:00Z" } ], "next_cursor": null } ``` ### Get AI policy `GET /v1/projects/{project_id}/ai/policy` The project's routing rules. A project that never saved any allows every available model from both providers, with no fallback and no cap. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/ai/policy \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "allowed_providers": [ "string" ], "allowed_models": [ "string" ], "fallback_order": [ "string" ], "monthly_spend_cap_usd": null, "month_to_date_usd": "string", "updated_at": null, "privacy": { "mode": "off", "preset": null, "custom_yaml": null, "enforcement": "closed", "restore_in_responses": false, "inspect_responses": false, "media_rule": "block", "provider_overrides": { "KEY": {} }, "updated_at": null } } ``` ### Get AI privacy `GET /v1/projects/{project_id}/ai/privacy` The project's Veil settings for the gateway. Off until someone turns it on. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/ai/privacy \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "mode": "off", "preset": null, "custom_yaml": null, "enforcement": "closed", "restore_in_responses": false, "inspect_responses": false, "media_rule": "block", "provider_overrides": { "KEY": { "preset": null, "custom_yaml": null, "enforcement": null } }, "updated_at": null } ``` ### Put AI policy `PUT /v1/projects/{project_id}/ai/policy` Replaces the rules. Every model named must be in the catalogue and come from an allowed provider, and with allowed_models set, each fallback must be among them. The cap is in US dollars at list price per calendar month. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | | `allowed_providers` | body | array of "openai" \| "anthropic" \| "google" \| "deepseek" \| "moonshot" \| "zai" | yes | | | `allowed_models` | body | array of string | no | Empty allows every model from the allowed providers. | | `fallback_order` | body | array of string | no | | | `monthly_spend_cap_usd` | body | number \| string | no | | | `privacy` | body | object | no | Veil settings. Leave out to keep the current ones. | | `privacy.mode` | body | "off" \| "detect" \| "protect" | no | off leaves text alone; detect reports what Veil finds; protect applies the policy before the text leaves. | | `privacy.preset` | body | string | no | A built-in Veil policy. | | `privacy.custom_yaml` | body | string | no | A Veil policy in YAML. Takes the place of the preset. | | `privacy.enforcement` | body | "closed" \| "open" | no | closed refuses requests Veil can't scan; open sends them unscanned with a warning. | | `privacy.restore_in_responses` | body | boolean | no | Put tokenised values back into the model's reply, in memory for that request only. | | `privacy.inspect_responses` | body | boolean | no | Scan replies too, reporting findings in the log. | | `privacy.media_rule` | body | "block" \| "allow_with_warning" | no | Veil reads text only: refuse images and audio, or allow them with a warning. | | `privacy.provider_overrides` | body | object | no | | ```bash curl -X PUT https://api.dekka.cloud/v1/projects/$PROJECT_ID/ai/policy \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "allowed_providers": [ "openai" ] }' ``` ```json { "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "allowed_providers": [ "string" ], "allowed_models": [ "string" ], "fallback_order": [ "string" ], "monthly_spend_cap_usd": null, "month_to_date_usd": "string", "updated_at": null, "privacy": { "mode": "off", "preset": null, "custom_yaml": null, "enforcement": "closed", "restore_in_responses": false, "inspect_responses": false, "media_rule": "block", "provider_overrides": { "KEY": {} }, "updated_at": null } } ``` ### Put AI privacy `PUT /v1/projects/{project_id}/ai/privacy` Replaces the Veil settings. Custom policies are checked by Veil first, and every error comes back with its path in 422 invalid_privacy_policy. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | | `mode` | body | "off" \| "detect" \| "protect" | no | off leaves text alone; detect reports what Veil finds; protect applies the policy before the text leaves. | | `preset` | body | string | no | A built-in Veil policy. | | `custom_yaml` | body | string | no | A Veil policy in YAML. Takes the place of the preset. | | `enforcement` | body | "closed" \| "open" | no | closed refuses requests Veil can't scan; open sends them unscanned with a warning. | | `restore_in_responses` | body | boolean | no | Put tokenised values back into the model's reply, in memory for that request only. | | `inspect_responses` | body | boolean | no | Scan replies too, reporting findings in the log. | | `media_rule` | body | "block" \| "allow_with_warning" | no | Veil reads text only: refuse images and audio, or allow them with a warning. | | `provider_overrides` | body | object | no | | ```bash curl -X PUT https://api.dekka.cloud/v1/projects/$PROJECT_ID/ai/privacy \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "mode": "off", "preset": "string", "custom_yaml": "string" }' ``` ```json { "mode": "off", "preset": null, "custom_yaml": null, "enforcement": "closed", "restore_in_responses": false, "inspect_responses": false, "media_rule": "block", "provider_overrides": { "KEY": { "preset": null, "custom_yaml": null, "enforcement": null } }, "updated_at": null } ``` ### Preview AI privacy `POST /v1/projects/{project_id}/ai/privacy/preview` Shows what Veil would do to sample text with the saved settings, or with unsaved ones in `policy`. With Veil off it previews protect mode. Nothing is stored. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | | `text` | body | string | yes | | | `provider` | body | "openai" \| "anthropic" \| "google" \| "deepseek" \| "moonshot" \| "zai" | no | The destination to apply per-provider rules for. | | `policy` | body | object | no | Unsaved settings to try. Defaults to the saved ones. | | `policy.mode` | body | "off" \| "detect" \| "protect" | no | off leaves text alone; detect reports what Veil finds; protect applies the policy before the text leaves. | | `policy.preset` | body | string | no | A built-in Veil policy. | | `policy.custom_yaml` | body | string | no | A Veil policy in YAML. Takes the place of the preset. | | `policy.enforcement` | body | "closed" \| "open" | no | closed refuses requests Veil can't scan; open sends them unscanned with a warning. | | `policy.restore_in_responses` | body | boolean | no | Put tokenised values back into the model's reply, in memory for that request only. | | `policy.inspect_responses` | body | boolean | no | Scan replies too, reporting findings in the log. | | `policy.media_rule` | body | "block" \| "allow_with_warning" | no | Veil reads text only: refuse images and audio, or allow them with a warning. | | `policy.provider_overrides` | body | object | no | | ```bash curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/ai/privacy/preview \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "text": "string" }' ``` ```json { "mode": "off", "blocked": false, "output": null, "findings": 1, "by_entity": { "KEY": 1 }, "by_action": { "KEY": 1 }, "policy": "string", "decisions": [ { "entity_type": "string", "start": 1, "end": 1, "offset_unit": "utf8_byte", "action": "string" } ], "warnings": [ "string" ] } ``` ## AI Gateway An OpenAI-compatible endpoint that sends chat completions to a model under your project's policy. ### List gateway models `GET /v1/ai/models` OpenAI's model list: the available models this key's project may use, then the organization's private inference endpoints as private/, owned by `private`. Those are waitlisted and get a simulated reply outside production. ```bash curl https://api.dekka.cloud/v1/ai/models \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "object": "list", "data": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "object": "model", "owned_by": "string", "created": 1 } ] } ``` ### Create speech `POST /v1/ai/audio/speech` OpenAI-compatible text to speech with a speech model such as openai/gpt-4o-mini-tts. The reply body is the audio itself, and the X-Dekka-Provider and X-Dekka-Model headers say what answered. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `model` | body | string | yes | | | `input` | body | string | yes | | | `voice` | body | string | yes | | | `instructions` | body | string | no | | | `response_format` | body | "mp3" \| "opus" \| "aac" \| "flac" \| "wav" \| "pcm" | no | | | `speed` | body | number | no | | ```bash curl https://api.dekka.cloud/v1/ai/audio/speech \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "model": "auto", "input": "string", "voice": "string" }' ``` ```text null ``` ### Create transcription `POST /v1/ai/audio/transcriptions` OpenAI-compatible transcription, sent as multipart form data with a transcription model such as openai/gpt-4o-mini-transcribe. The audio is passed to the provider and never stored. ```bash curl -X POST https://api.dekka.cloud/v1/ai/audio/transcriptions \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```text null ``` ### Create a chat completion `POST /v1/ai/chat/completions` OpenAI-compatible chat completions. Set `model` to a catalogue id such as openai/gpt-4.1-mini. With `stream: true` the reply is server-sent events ending in `data: [DONE]`, and the last chunk before it carries usage. The response headers X-Dekka-Provider and X-Dekka-Model say what answered. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `model` | body | string | yes | | | `messages` | body | array of object | yes | | | `stream` | body | boolean | no | | | `stream_options` | body | object | no | | | `stream_options.include_usage` | body | boolean | no | | | `temperature` | body | number | no | | | `top_p` | body | number | no | | | `max_tokens` | body | integer | no | | | `max_completion_tokens` | body | integer | no | | | `stop` | body | string \| array of string | no | | | `user` | body | string | no | | ```bash curl https://api.dekka.cloud/v1/ai/chat/completions \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "model": "auto", "messages": [ { "role": "system" } ] }' ``` ```text null ``` ### Create image `POST /v1/ai/images/generations` OpenAI-compatible image generation with an image model such as openai/gpt-image-2. Images come back as base64 in `b64_json` and are never stored, so `response_format: url` answers 422. Usage counts the prompt's text tokens and the image tokens the provider reports. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `model` | body | string | yes | | | `prompt` | body | string | yes | | | `n` | body | integer | no | | | `size` | body | "auto" \| "1024x1024" \| "1536x1024" \| "1024x1536" | no | | | `quality` | body | "auto" \| "low" \| "medium" \| "high" | no | | | `background` | body | "auto" \| "transparent" \| "opaque" | no | | | `output_format` | body | "png" \| "jpeg" \| "webp" | no | | | `response_format` | body | "b64_json" \| "url" | no | | | `user` | body | string | no | | ```bash curl https://api.dekka.cloud/v1/ai/images/generations \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "model": "auto", "prompt": "string" }' ``` ```text null ``` ## Organisations An organisation owns projects and members, and its activity shows who changed what. ### Get organisation `GET /v1/orgs/{org_id}` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/orgs/$ORG_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "slug": "api", "name": "api", "personal": false, "role": "owner", "created_at": "2026-11-04T09:30:00Z", "deletion": null } ``` ### Update organisation `PATCH /v1/orgs/{org_id}` Rename an organization or change its address (the part of the dashboard URL after /app/). | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | | `name` | body | string | no | | | `slug` | body | string | no | | ```bash curl -X PATCH https://api.dekka.cloud/v1/orgs/$ORG_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "name": "api", "slug": "api" }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "slug": "api", "name": "api", "personal": false, "role": "owner", "created_at": "2026-11-04T09:30:00Z", "deletion": null } ``` ### Delete organisation `POST /v1/orgs/{org_id}/deletion` Asks for the organization to be deleted. Its services and servers stop at once, and everything in it is deleted seven days later unless an owner or admin keeps it first. Only a person who is signed in can ask. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | | `confirm` | body | string | yes | The organization's name, typed to confirm. | ```bash curl https://api.dekka.cloud/v1/orgs/$ORG_ID/deletion \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "confirm": "string" }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "slug": "api", "name": "api", "personal": false, "role": "owner", "created_at": "2026-11-04T09:30:00Z", "deletion": null } ``` ### List organisation activity `GET /v1/orgs/{org_id}/activity` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | | `cursor` | query | string | no | | | `limit` | query | integer | no | | ```bash curl https://api.dekka.cloud/v1/orgs/$ORG_ID/activity \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "items": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "action": "string", "actor": null, "actor_api_key_id": null, "target_type": null, "target_id": null, "data": {}, "request_id": null, "created_at": "2026-11-04T09:30:00Z" } ], "next_cursor": null } ``` ### List members `GET /v1/orgs/{org_id}/members` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/orgs/$ORG_ID/members \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "user_id": "f00c3c10-4543-4e46-a98f-3df3ee7dd3a6", "name": "api", "email": "ama@example.com", "avatar_url": null, "role": "owner", "joined_at": "2026-11-04T09:30:00Z" } ] ``` ### Get organisation overview `GET /v1/orgs/{org_id}/overview` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/orgs/$ORG_ID/overview \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "counts": { "projects": 0, "resources": 0, "applications": 0, "databases": 0, "buckets": 0, "running": 0, "failed": 0 }, "recent_deployments": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "project_name": "string", "resource_id": "f70c4715-5954-46e3-a1f6-a7d6614a09ce", "resource_name": "string", "status": "string", "branch": null, "commit_sha": null, "commit_message": null, "created_at": "2026-11-04T09:30:00Z" } ], "failed_operations": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": null, "resource_id": null, "resource_name": null, "type": "string", "state": "string", "error": null, "created_at": "2026-11-04T09:30:00Z" } ], "subscription": { "status": "trialing", "started_at": "2026-11-04T09:30:00Z", "plan": { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "name": "api", "plan_version_id": "f50c43ef-444e-45a6-ac37-d51f6de50276", "version": 1, "currency": "string", "monthly_price": "string", "description": null, "is_hypothesis": false, "entitlements": {} }, "usage": { "projects": 0, "active_services": 0, "memory_per_app_mib": 0, "postgres_mib": 0, "storage_mib": 0, "build_minutes": 0, "servers": 0, "redis_mib": 0, "volume_gb": 0, "queues": 0 }, "current_period_start": "2026-11-04T09:30:00Z", "current_period_end": "2026-11-04T09:30:00Z", "cancel_at_period_end": false, "pending_plan": null, "trial_ends_at": null, "past_due_since": null, "provider": null, "billing_enabled": false, "billing_exempt": false, "limits_waived": false, "locked_at": null, "delete_after": null, "data_deleted_at": null, "upgrade_requested_plan": null, "upgrade_requested_at": null, "pays_manually": false, "payment_due_at": null, "payment_due_minor": null } } ``` ### Get organisation subscription `GET /v1/orgs/{org_id}/subscription` The plan, its period, any scheduled change, and current usage. An ended period is rolled forward here as well as by the reconciler. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/orgs/$ORG_ID/subscription \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "status": "trialing", "started_at": "2026-11-04T09:30:00Z", "plan": { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "name": "api", "plan_version_id": "f50c43ef-444e-45a6-ac37-d51f6de50276", "version": 1, "currency": "string", "monthly_price": "string", "description": null, "is_hypothesis": false, "entitlements": { "projects": 1, "active_services": 1, "memory_per_app_mib": 1, "postgres_mib": 1, "storage_mib": 1, "build_minutes": 1, "servers": 0, "egress_gb": 0, "ai_tokens": 0, "overage": false, "redis_mib": 64, "environments_per_project": 1, "replicas_per_service": 1, "vcpu_per_service": 0.5, "volume_gb": 1, "redis_mib_max": null, "volume_gb_max": null, "queues": 1, "custom_domains": null, "sentry": null, "team_members": null, "support": null } }, "usage": { "projects": 0, "active_services": 0, "memory_per_app_mib": 0, "postgres_mib": 0, "storage_mib": 0, "build_minutes": 0, "servers": 0, "redis_mib": 0, "volume_gb": 0, "queues": 0 }, "current_period_start": "2026-11-04T09:30:00Z", "current_period_end": "2026-11-04T09:30:00Z", "cancel_at_period_end": false, "pending_plan": null, "trial_ends_at": null, "past_due_since": null, "provider": null, "billing_enabled": false, "billing_exempt": false, "limits_waived": false, "locked_at": null, "delete_after": null, "data_deleted_at": null, "upgrade_requested_plan": null, "upgrade_requested_at": null, "pays_manually": false, "payment_due_at": null, "payment_due_minor": null } ``` ### Keep organisation `DELETE /v1/orgs/{org_id}/deletion` Keeps an organization that was set to be deleted, and starts again what the request stopped. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | ```bash curl -X DELETE https://api.dekka.cloud/v1/orgs/$ORG_ID/deletion \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "slug": "api", "name": "api", "personal": false, "role": "owner", "created_at": "2026-11-04T09:30:00Z", "deletion": null } ``` ## Members and invitations Invite people to an organisation and change their roles. ### Revoke invitation `DELETE /v1/invitations/{invitation_id}` Revoking twice is harmless. 409 invitation_accepted once it was used. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `invitation_id` | path | uuid | yes | | ```bash curl -X DELETE https://api.dekka.cloud/v1/invitations/$INVITATION_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```text 204 No Content ``` ### Create organisation invitation `POST /v1/orgs/{org_id}/invitations` Emails an invitation link that works once for seven days. Only owners may invite owners (403 `owner_required`). It's refused with 409 `already_member` or `invitation_exists`, and with 403 `entitlement_exceeded` when members plus open invitations would pass the plan. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | | `email` | body | string | yes | | | `role` | body | "owner" \| "admin" \| "developer" \| "viewer" | no | Only owners may invite owners. | ```bash curl https://api.dekka.cloud/v1/orgs/$ORG_ID/invitations \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "email": "ama@example.com" }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "email": "ama@example.com", "role": "owner", "status": "pending", "invited_by_user_id": null, "invited_by_name": null, "expires_at": "2026-11-04T09:30:00Z", "created_at": "2026-11-04T09:30:00Z" } ``` ### List organisation invitations `GET /v1/orgs/{org_id}/invitations` Open invitations, newest first. Expired ones stay listed with status expired until they are revoked or the address is invited again. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/orgs/$ORG_ID/invitations \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "email": "ama@example.com", "role": "owner", "status": "pending", "invited_by_user_id": null, "invited_by_name": null, "expires_at": "2026-11-04T09:30:00Z", "created_at": "2026-11-04T09:30:00Z" } ] ``` ### Update organisation member `PATCH /v1/orgs/{org_id}/members/{user_id}` Only owners can make someone an owner or change an owner's role (403 owner_required). 409 last_owner when it would leave no owner. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `user_id` | path | uuid | yes | | | `org_id` | path | uuid | yes | | | `role` | body | "owner" \| "admin" \| "developer" \| "viewer" | yes | | ```bash curl -X PATCH https://api.dekka.cloud/v1/orgs/$ORG_ID/members/$USER_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "role": "owner" }' ``` ```json { "user_id": "f00c3c10-4543-4e46-a98f-3df3ee7dd3a6", "name": "api", "email": "ama@example.com", "avatar_url": null, "role": "owner", "joined_at": "2026-11-04T09:30:00Z" } ``` ### Remove organisation member `DELETE /v1/orgs/{org_id}/members/{user_id}` Admins and owners remove others (only owners remove owners), and any member can remove themself to leave. 409 last_owner when it would leave no owner. The member's API keys for this organization are revoked. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `user_id` | path | uuid | yes | | | `org_id` | path | uuid | yes | | ```bash curl -X DELETE https://api.dekka.cloud/v1/orgs/$ORG_ID/members/$USER_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```text 204 No Content ``` ## API keys and project tokens An API key acts for an organisation, and a project token reaches a single project. ### Revoke API key `DELETE /v1/api-keys/{api_key_id}` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `api_key_id` | path | uuid | yes | | ```bash curl -X DELETE https://api.dekka.cloud/v1/api-keys/$API_KEY_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```text 204 No Content ``` ### Revoke project token `DELETE /v1/project-tokens/{token_id}` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `token_id` | path | uuid | yes | | ```bash curl -X DELETE https://api.dekka.cloud/v1/project-tokens/$TOKEN_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```text 204 No Content ``` ### Create API key `POST /v1/orgs/{org_id}/api-keys` `project_id` is only for gateway keys, whose scopes are exactly ["ai"]: their requests are logged against that project and follow its routing policy. The key is in `key`, and only in this response. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | | `name` | body | string | yes | | | `scopes` | body | array of "read" \| "write" \| "admin" \| "ai" | no | | | `expires_in_days` | body | integer | no | | | `project_id` | body | uuid | no | For a gateway key (scopes exactly ['ai']): log its requests against this project and apply the project's routing policy. Other keys reach a single project through project tokens instead. | ```bash curl https://api.dekka.cloud/v1/orgs/$ORG_ID/api-keys \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "name": "api" }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "organization_id": "ea0c329e-5e34-4b17-ae20-647660fd8b7c", "project_id": null, "name": "api", "prefix": "string", "scopes": [ "string" ], "created_by_user_id": null, "created_at": "2026-11-04T09:30:00Z", "expires_at": null, "last_used_at": null, "revoked_at": null, "key": "API_KEY" } ``` ### Create project token `POST /v1/projects/{project_id}/tokens` A token for CI that reaches only this project: its resources, deployments, environments and variables. Every org-level route and every other project answer 404 to it. `read` acts as a viewer and `write` as a developer, never above the creator's own role. The token is in `key`, and only in this response. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | | `name` | body | string | yes | | | `scopes` | body | array of "read" \| "write" \| "ai" | no | read reaches the project as a viewer, write as a developer, and ai reaches the AI gateway with requests logged against this project. | | `expires_in_days` | body | integer | no | | ```bash curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/tokens \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "name": "api" }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "organization_id": "ea0c329e-5e34-4b17-ae20-647660fd8b7c", "project_id": null, "name": "api", "prefix": "string", "scopes": [ "string" ], "created_by_user_id": null, "created_at": "2026-11-04T09:30:00Z", "expires_at": null, "last_used_at": null, "revoked_at": null, "key": "API_KEY" } ``` ### List API keys `GET /v1/orgs/{org_id}/api-keys` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/orgs/$ORG_ID/api-keys \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "organization_id": "ea0c329e-5e34-4b17-ae20-647660fd8b7c", "project_id": null, "name": "api", "prefix": "string", "scopes": [], "created_by_user_id": null, "created_at": "2026-11-04T09:30:00Z", "expires_at": null, "last_used_at": null, "revoked_at": null } ] ``` ### List project tokens `GET /v1/projects/{project_id}/tokens` Tokens that reach only this project, newest first, revoked ones included. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/tokens \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "organization_id": "ea0c329e-5e34-4b17-ae20-647660fd8b7c", "project_id": null, "name": "api", "prefix": "string", "scopes": [], "created_by_user_id": null, "created_at": "2026-11-04T09:30:00Z", "expires_at": null, "last_used_at": null, "revoked_at": null } ] ``` ## GitHub The GitHub installations an organisation has connected, and the repositories and branches they can deploy. ### List GitHub repos `GET /v1/github/installations/{installation_id}/repos` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `installation_id` | path | integer | yes | | ```bash curl https://api.dekka.cloud/v1/github/installations/$INSTALLATION_ID/repos \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": 1, "full_name": "string", "name": "api", "private": false, "default_branch": "string", "language": null, "description": null, "html_url": "https://example.com" } ] ``` ### Get the GitHub App install link `GET /v1/orgs/{org_id}/github/install-url` Where to send the browser to install the GitHub App for this org. It comes back to /v1/github/setup, which links the installation. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | | `next` | query | string | no | | ```bash curl https://api.dekka.cloud/v1/orgs/$ORG_ID/github/install-url \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "url": "https://example.com/hooks/dekka", "provider": "string" } ``` ### List GitHub installations `GET /v1/orgs/{org_id}/github/installations` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/orgs/$ORG_ID/github/installations \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "installation_id": 1, "account_login": "string", "account_type": "string", "provider": "string", "suspended": false, "created_at": "2026-11-04T09:30:00Z" } ] ``` ### Unlink GitHub installation `DELETE /v1/orgs/{org_id}/github/installations/{installation_id}` Ends this organization's use of a GitHub account's installation. The App stays installed on GitHub, and other organizations that linked it keep it. Services here that build from its repositories stop building until an installation that can see them is linked again. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `installation_id` | path | integer | yes | | | `org_id` | path | uuid | yes | | ```bash curl -X DELETE https://api.dekka.cloud/v1/orgs/$ORG_ID/github/installations/$INSTALLATION_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```text 204 No Content ``` ### List GitHub branches `GET /v1/github/installations/{installation_id}/repos/{repo_id}/branches` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `installation_id` | path | integer | yes | | | `repo_id` | path | integer | yes | | ```bash curl https://api.dekka.cloud/v1/github/installations/$INSTALLATION_ID/repos/$REPO_ID/branches \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "name": "api", "commit_sha": "string", "protected": false } ] ``` ### Detect GitHub settings `GET /v1/github/installations/{installation_id}/repos/{repo_id}/detect` How Dekka would build and run this branch, from the files at its root: the framework, build strategy, port, start command and health path, plus any Compose file or dekka.toml found. Nothing is run; the files are only read. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `installation_id` | path | integer | yes | | | `repo_id` | path | integer | yes | | | `branch` | query | string | yes | | | `root_dir` | query | string | no | | ```bash curl "https://api.dekka.cloud/v1/github/installations/$INSTALLATION_ID/repos/$REPO_ID/detect?branch=$BRANCH" \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "framework": null, "strategy": null, "port": null, "build_command": null, "start_command": null, "health_check_path": null, "static_publish_dir": null, "dockerfile_path": null, "compose_file": null, "config_file": null, "found": [ "string" ] } ``` ## Your account The person a key belongs to. ### Get the current user `GET /v1/me` ```bash curl https://api.dekka.cloud/v1/me \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "user": { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "email": "ama@example.com", "name": "api", "email_verified": false, "avatar_url": null, "github_login": null, "is_staff": false }, "organizations": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "slug": "api", "name": "api", "role": "owner", "delete_after": null } ], "features": { "vps": true, "ai_gateway": true, "gpu": false, "gpu_waitlist": true }, "engine": { "kind": "string" }, "terms": { "version": "string", "accepted_at": null, "enforced": false }, "has_passkey": false, "sign_in_methods": [ "email" ], "staff": false } ``` ### Update the current user `PATCH /v1/me` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `name` | body | string | no | | | `avatar_url` | body | string | no | | ```bash curl -X PATCH https://api.dekka.cloud/v1/me \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "name": "api", "avatar_url": "https://example.com" }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "email": "ama@example.com", "name": "api", "email_verified": false, "avatar_url": null, "github_login": null, "is_staff": false } ``` ### Accept terms `POST /v1/me/terms` Accept the current terms of use. A person does this in the dashboard, so an API key can't. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `version` | body | string | yes | The version the person was shown | ```bash curl https://api.dekka.cloud/v1/me/terms \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "version": "string" }' ``` ```json { "version": "string", "accepted_at": null, "enforced": false } ``` ### Get notification preferences `GET /v1/me/notifications` Both are on until the user turns them off. ```bash curl https://api.dekka.cloud/v1/me/notifications \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "deploy_failed": false, "usage_alerts": false } ``` ### Put notification preferences `PUT /v1/me/notifications` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `deploy_failed` | body | boolean | yes | Email when a deployment you started fails, or any deployment fails in an organization where you are an owner or admin | | `usage_alerts` | body | boolean | yes | Email when an organization where you are an owner or admin passes a usage alert or reaches its spend limit | ```bash curl -X PUT https://api.dekka.cloud/v1/me/notifications \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "deploy_failed": false, "usage_alerts": false }' ``` ```json { "deploy_failed": false, "usage_alerts": false } ``` ## Support Open a support ticket and follow the conversation. ### Open support ticket `POST /v1/support/tickets` Opens a request with its first message. Dekka staff are emailed straight away. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `subject` | body | string | yes | | | `body` | body | string | yes | | | `organization_id` | body | uuid | no | | ```bash curl https://api.dekka.cloud/v1/support/tickets \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "subject": "…", "body": "string" }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "number": 1, "subject": "…", "status": "open", "created_at": "2026-11-04T09:30:00Z", "last_message_at": "2026-11-04T09:30:00Z", "last_from_staff": false, "thread": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "body": "string", "from_staff": false, "created_at": "2026-11-04T09:30:00Z" } ] } ``` ### List support tickets `GET /v1/support/tickets` ```bash curl https://api.dekka.cloud/v1/support/tickets \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "number": 1, "subject": "…", "status": "open", "created_at": "2026-11-04T09:30:00Z", "last_message_at": "2026-11-04T09:30:00Z", "last_from_staff": false } ] ``` ### Get support ticket `GET /v1/support/tickets/{ticket_id}` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `ticket_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/support/tickets/$TICKET_ID \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "number": 1, "subject": "…", "status": "open", "created_at": "2026-11-04T09:30:00Z", "last_message_at": "2026-11-04T09:30:00Z", "last_from_staff": false, "thread": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "body": "string", "from_staff": false, "created_at": "2026-11-04T09:30:00Z" } ] } ``` ### Close support ticket `POST /v1/support/tickets/{ticket_id}/close` | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `ticket_id` | path | uuid | yes | | ```bash curl -X POST https://api.dekka.cloud/v1/support/tickets/$TICKET_ID/close \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "number": 1, "subject": "…", "status": "open", "created_at": "2026-11-04T09:30:00Z", "last_message_at": "2026-11-04T09:30:00Z", "last_from_staff": false, "thread": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "body": "string", "from_staff": false, "created_at": "2026-11-04T09:30:00Z" } ] } ``` ### Reply support ticket `POST /v1/support/tickets/{ticket_id}/messages` Adds to the conversation and reopens it if it was closed. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `ticket_id` | path | uuid | yes | | | `body` | body | string | yes | | ```bash curl https://api.dekka.cloud/v1/support/tickets/$TICKET_ID/messages \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "body": "string" }' ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "number": 1, "subject": "…", "status": "open", "created_at": "2026-11-04T09:30:00Z", "last_message_at": "2026-11-04T09:30:00Z", "last_from_staff": false, "thread": [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "body": "string", "from_staff": false, "created_at": "2026-11-04T09:30:00Z" } ] } ``` ## Cli ### Start cli login `POST /v1/cli/logins` Start signing the CLI in. Needs no credentials. Show the person `user_code` and `verification_url`, then ask `POST /cli/logins/token` every `interval` seconds until it answers with the key. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `device_name` | body | string | no | What to call this machine on the approval page and in the key's name, usually its hostname | ```bash curl https://api.dekka.cloud/v1/cli/logins \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "device_name": "" }' ``` ```json { "device_code": "string", "user_code": "string", "verification_url": "https://example.com", "expires_in": 1, "interval": 1 } ``` ### Collect cli login `POST /v1/cli/logins/token` Collect the key once the person has approved. Until then this answers 400 with the code `authorization_pending`, and the CLI asks again. It answers `access_denied` if they refused and `expired_token` once the attempt is over or the key has been collected. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `device_code` | body | string | yes | | ```bash curl https://api.dekka.cloud/v1/cli/logins/token \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "device_code": "string" }' ``` ```json { "key": "API_KEY", "organization": { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "name": "api", "slug": "api" } } ``` ### Get cli login `GET /v1/cli/logins/{user_code}` What the dashboard shows before a sign-in is approved: the machine that asked, when, and whether the attempt is still open. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `user_code` | path | string | yes | | ```bash curl https://api.dekka.cloud/v1/cli/logins/$USER_CODE \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "user_code": "string", "device_name": "string", "requested_at": "2026-11-04T09:30:00Z", "expires_at": "2026-11-04T09:30:00Z", "state": "pending", "same_network": false } ``` ### Approve cli login `POST /v1/cli/logins/{user_code}/approve` Approve a sign-in for one organisation, which needs the admin role there, as creating a key does. It mints a key with the read and write scopes, named after the machine. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `user_code` | path | string | yes | | | `organization_id` | body | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/cli/logins/$USER_CODE/approve \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "organization_id": "ea0c329e-5e34-4b17-ae20-647660fd8b7c" }' ``` ```json { "user_code": "string", "device_name": "string", "requested_at": "2026-11-04T09:30:00Z", "expires_at": "2026-11-04T09:30:00Z", "state": "pending", "same_network": false } ``` ### Deny cli login `POST /v1/cli/logins/{user_code}/deny` Refuse a sign-in, so the CLI that asked stops waiting. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `user_code` | path | string | yes | | ```bash curl -X POST https://api.dekka.cloud/v1/cli/logins/$USER_CODE/deny \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "user_code": "string", "device_name": "string", "requested_at": "2026-11-04T09:30:00Z", "expires_at": "2026-11-04T09:30:00Z", "state": "pending", "same_network": false } ``` ## Estimates ### Estimate `POST /v1/estimates` What a proposed resource, a resize or a changeset costs, as a monthly equivalent in the catalogue's currency with a line for each part, what goes on being charged while stopped, and the usage metered on top. It reads app/catalog/plans.yaml, servers.yaml and prices.yaml and counts the organization's plan allowances when it is known. It changes nothing. ```bash curl https://api.dekka.cloud/v1/estimates \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "type": "resource", "kind": "application" }' ``` ```json { "currency": "string", "hypothesis": false, "plan": null, "monthly": "string", "current_monthly": null, "change": null, "while_stopped": "string", "lines": [ { "kind": "string", "resource": null, "action": "create", "label": "string", "detail": "string", "sku": null, "monthly": null, "current_monthly": null, "included": false, "bills_while_stopped": false } ], "metered": [ { "key": "API_KEY", "label": "string", "unit": "string", "unit_price": "string", "per": 1, "description": "string" } ], "while_stopped_notes": [ "string" ], "included": [ "string" ], "warnings": [ "string" ] } ``` ## Lockdown ### Start organisation lockdown `POST /v1/orgs/{org_id}/lockdown` Puts every project of the organization into lockdown mode. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | | `block_outbound` | body | boolean | no | Also stops the project's services from reaching the internet, so code an intruder left behind cannot send anything out. They still reach their own databases, caches and object storage. | | `ssh_allow` | body | array of string | no | IPv4 addresses or prefixes that may still open SSH to the project's virtual servers, such as 203.0.113.7 or 198.51.100.0/24. Empty closes SSH to everyone. | | `reboot_servers` | body | boolean | no | Also reboots each running virtual server as lockdown mode begins. Connections that are open end either way, and a reboot also stops a program someone left running on a server. | ```bash curl https://api.dekka.cloud/v1/orgs/$ORG_ID/lockdown \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "block_outbound": false, "ssh_allow": [ "string" ], "reboot_servers": false }' ``` ```json [ { "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "in_force": false, "lockdown": null } ] ``` ### Start lockdown `POST /v1/projects/{project_id}/lockdown` Puts the project into lockdown mode. Nothing outside reaches its services, databases or caches, its public addresses show the maintenance page, and each service is restarted once to drop open connections. Everything keeps running inside. Sending it again changes the lockdown in force and restarts nothing. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | | `block_outbound` | body | boolean | no | Also stops the project's services from reaching the internet, so code an intruder left behind cannot send anything out. They still reach their own databases, caches and object storage. | | `ssh_allow` | body | array of string | no | IPv4 addresses or prefixes that may still open SSH to the project's virtual servers, such as 203.0.113.7 or 198.51.100.0/24. Empty closes SSH to everyone. | | `reboot_servers` | body | boolean | no | Also reboots each running virtual server as lockdown mode begins. Connections that are open end either way, and a reboot also stops a program someone left running on a server. | ```bash curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/lockdown \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "block_outbound": false, "ssh_allow": [ "string" ], "reboot_servers": false }' ``` ```json { "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "in_force": false, "lockdown": null } ``` ### List lockdowns `GET /v1/orgs/{org_id}/lockdowns` The organization's projects that are in lockdown mode. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/orgs/$ORG_ID/lockdowns \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "in_force": false, "lockdown": null } ] ``` ### Read lockdown `GET /v1/projects/{project_id}/lockdown` Whether the project is in lockdown mode, and what each environment's seal covers. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/lockdown \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "in_force": false, "lockdown": null } ``` ### Read maintenance page `GET /v1/projects/{project_id}/maintenance-page` The page the project's public addresses show in lockdown mode. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/maintenance-page \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "mode": "default", "title": null, "message": null, "logo_url": null, "html": null, "rendered_html": "string", "updated_at": null } ``` ### Save maintenance page `PUT /v1/projects/{project_id}/maintenance-page` Saves the page: Dekka's default, the project's own title, message and logo, or its own HTML. It is served with a policy that runs no script. A project in lockdown mode shows the new page at once. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | | `mode` | body | "default" \| "custom" \| "html" | no | | | `title` | body | string | no | | | `message` | body | string | no | | | `logo_url` | body | string | no | | | `html` | body | string | no | | ```bash curl -X PUT https://api.dekka.cloud/v1/projects/$PROJECT_ID/maintenance-page \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "mode": "default", "title": "string", "message": "…" }' ``` ```json { "mode": "default", "title": null, "message": null, "logo_url": null, "html": null, "rendered_html": "string", "updated_at": null } ``` ### Lift organisation lockdown `DELETE /v1/orgs/{org_id}/lockdown` Lifts lockdown mode on every project of the organization that is in it. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | ```bash curl -X DELETE https://api.dekka.cloud/v1/orgs/$ORG_ID/lockdown \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```text 204 No Content ``` ### Lift lockdown `DELETE /v1/projects/{project_id}/lockdown` Lifts lockdown mode. The project's addresses reach its services again within seconds, and nothing is restarted. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | ```bash curl -X DELETE https://api.dekka.cloud/v1/projects/$PROJECT_ID/lockdown \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```text 204 No Content ``` ### Preview maintenance page `POST /v1/projects/{project_id}/maintenance-page/preview` The page as it would be sent, without saving it. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | | `mode` | body | "default" \| "custom" \| "html" | no | | | `title` | body | string | no | | | `message` | body | string | no | | | `logo_url` | body | string | no | | | `html` | body | string | no | | ```bash curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/maintenance-page/preview \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "mode": "default", "title": "string", "message": "…" }' ``` ```json { "rendered_html": "string" } ``` ## Sentry ### Enrol agent `POST /v1/agent/v1/enrol` Called by the agent itself, once, to swap its one-time code for the token it reports with. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `code` | body | string | yes | | | `version` | body | string | no | | ```bash curl https://api.dekka.cloud/v1/agent/v1/enrol \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "code": "string" }' ``` ```json { "token": "string", "report_url": "https://example.com", "interval_seconds": 1 } ``` ### Agent report `POST /v1/agent/v1/report` Called by the agent once a minute with what the server is running. Which server it is about comes from the token and never from the report. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `version` | body | string | yes | | | `processes` | body | array of object | yes | | | `listeners` | body | array of integer | no | TCP ports open to other machines. | | `failed_sign_ins` | body | integer | no | Failed SSH sign-ins since the last report. | | `sign_ins` | body | array of object | no | | | `connections` | body | array of object | no | Connections from the server out to the internet since the last report, by program and port. | | `persistence` | body | array of object | no | What starts by itself on the server and who may sign in as root: names and hashes, never contents. | ```bash curl https://api.dekka.cloud/v1/agent/v1/report \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "version": "string", "processes": [ { "exe": "string" } ] }' ``` ```text 204 No Content ``` ### Issue agent code `POST /v1/servers/{server_id}/sentry-agent` Makes a one-time code for installing the Sentry agent on a virtual server, with the command to run there. The agent reports the programs running on the server, its listening ports and its sign-ins once a minute. It sends no command-line arguments, takes no commands and opens no port. Running the command again on a server replaces its token. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `server_id` | path | uuid | yes | | ```bash curl -X POST https://api.dekka.cloud/v1/servers/$SERVER_ID/sentry-agent \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "code": "string", "expires_at": "2026-11-04T09:30:00Z", "command": "string" } ``` ### Read organisation sentry `GET /v1/orgs/{org_id}/sentry` Dekka Sentry's state for every project in the organization that has it on. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `org_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/orgs/$ORG_ID/sentry \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "projects": [ { "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "enabled": false, "enabled_at": null, "included": false, "plan": "string", "shadow": false, "behind": null, "open": { "KEY": 1 }, "checked_at": null, "watching": [], "learning_until": null, "probes_this_week": 1 } ] } ``` ### Read sentry `GET /v1/projects/{project_id}/sentry` Whether Dekka Sentry is watching the project, and how many findings are open. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/sentry \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "enabled": false, "enabled_at": null, "included": false, "plan": "string", "shadow": false, "behind": null, "open": { "KEY": 1 }, "checked_at": null, "watching": [ { "resource_id": "f70c4715-5954-46e3-a1f6-a7d6614a09ce", "name": "api", "kind": "app", "reads": [], "checked_at": null, "requests_today": 1, "lines_today": 1 } ], "learning_until": null, "probes_this_week": 1 } ``` ### Set sentry `PUT /v1/projects/{project_id}/sentry` Turns Dekka Sentry on or off for the project. On, it watches every app and service in the project for as long as they run, and reports what looks wrong. It never stops a service and never turns on lockdown mode. It needs a paid plan, and turning it off needs a person signed in to the dashboard, so a stolen API key cannot silence it. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | | `enabled` | body | boolean | yes | | ```bash curl -X PUT https://api.dekka.cloud/v1/projects/$PROJECT_ID/sentry \ -H "Authorization: Bearer $DEKKA_API_KEY" \ --json '{ "enabled": false }' ``` ```json { "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "enabled": false, "enabled_at": null, "included": false, "plan": "string", "shadow": false, "behind": null, "open": { "KEY": 1 }, "checked_at": null, "watching": [ { "resource_id": "f70c4715-5954-46e3-a1f6-a7d6614a09ce", "name": "api", "kind": "app", "reads": [], "checked_at": null, "requests_today": 1, "lines_today": 1 } ], "learning_until": null, "probes_this_week": 1 } ``` ### Remove agent `DELETE /v1/servers/{server_id}/sentry-agent` Forgets a server's agent, so that its token stops working. It needs a person signed in to the dashboard. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `server_id` | path | uuid | yes | | ```bash curl -X DELETE https://api.dekka.cloud/v1/servers/$SERVER_ID/sentry-agent \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```text 204 No Content ``` ### List agents `GET /v1/projects/{project_id}/sentry/agents` Each virtual server of the project, and whether the Sentry agent is installed on it and reporting. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | ```bash curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/sentry/agents \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "resource_id": "f70c4715-5954-46e3-a1f6-a7d6614a09ce", "server": "string", "enrolled": false, "last_report_at": null, "version": null, "silent": false, "learning_until": null } ] ``` ### List findings `GET /v1/projects/{project_id}/sentry/findings` What Dekka Sentry has found in the project, the most recent first. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `project_id` | path | uuid | yes | | | `status` | query | "open" \| "expected" \| "closed" | no | | ```bash curl https://api.dekka.cloud/v1/projects/$PROJECT_ID/sentry/findings \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json [ { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "resource_id": null, "resource_name": "string", "rule": "string", "severity": "notice", "status": "open", "title": "string", "detail": "string", "count": 1, "first_seen": "2026-11-04T09:30:00Z", "last_seen": "2026-11-04T09:30:00Z", "address": null, "evidence": {}, "explanation": null, "shadow": false } ] ``` ### Close finding `POST /v1/projects/{project_id}/sentry/findings/{finding_id}/close` Closes a finding that has been dealt with. If the same thing happens again it is a new finding. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `finding_id` | path | uuid | yes | | | `project_id` | path | uuid | yes | | ```bash curl -X POST https://api.dekka.cloud/v1/projects/$PROJECT_ID/sentry/findings/$FINDING_ID/close \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "resource_id": null, "resource_name": "string", "rule": "string", "severity": "notice", "status": "open", "title": "string", "detail": "string", "count": 1, "first_seen": "2026-11-04T09:30:00Z", "last_seen": "2026-11-04T09:30:00Z", "address": null, "evidence": {}, "explanation": null, "shadow": false } ``` ### Mark expected `POST /v1/projects/{project_id}/sentry/findings/{finding_id}/expected` Says a finding is expected. Its rule stays quiet about the same subject for thirty days and then speaks again, so an old answer cannot hide a new attack. | Name | In | Type | Required | Description | | --- | --- | --- | --- | --- | | `finding_id` | path | uuid | yes | | | `project_id` | path | uuid | yes | | ```bash curl -X POST https://api.dekka.cloud/v1/projects/$PROJECT_ID/sentry/findings/$FINDING_ID/expected \ -H "Authorization: Bearer $DEKKA_API_KEY" ``` ```json { "id": "ec0c35c4-3838-4c73-a8d2-29c841d79e7d", "project_id": "f50c43ef-5e4e-4e94-ae78-b1fb79ff88d6", "resource_id": null, "resource_name": "string", "rule": "string", "severity": "notice", "status": "open", "title": "string", "detail": "string", "count": 1, "first_seen": "2026-11-04T09:30:00Z", "last_seen": "2026-11-04T09:30:00Z", "address": null, "evidence": {}, "explanation": null, "shadow": false } ``` # Products - [Managed apps](https://dekka.cloud/platform): Deploy from GitHub and run your apps, databases and storage on one canvas. Live. - [Virtual servers](https://dekka.cloud/servers): Linux machines with root over SSH, for teams that want full control. Live. - [Templates](https://dekka.cloud/templates): n8n, OpenClaw, Hermes Agent and more, deployed with their databases and keys. Live. - [Data](https://dekka.cloud/data): PostgreSQL, Redis and S3-compatible object storage. Live. - [Object storage](https://dekka.cloud/storage): S3-compatible buckets in Accra, used from an app or by themselves. Live. - [AI Gateway](https://dekka.cloud/ai-gateway): One OpenAI-compatible endpoint with rules about where prompts go. Live. - [Veil](https://dekka.cloud/veil): Ghana-aware detection and redaction of personal information, run locally. Live. - [Dekka Sentry](https://dekka.cloud/sentry): An always-on watch that tells you when an app or a server looks under attack. Live. # Research - [What personal data looks like in Ghana](https://dekka.cloud/research/personal-data-in-ghana): A field guide to Ghana's identifiers, names, addresses and languages and where general-purpose privacy tools fall short with them, then what we built into Veil in response and how it performs on synthetic and real Ghanaian text. - [The round trip from Accra](https://dekka.cloud/research/round-trip-from-accra): We measured the same service in Accra, Johannesburg, Frankfurt and Northern Virginia from Accra and nearby West African cities for 22 hours. A server in Accra answered in under 2 ms, while an app making 20 calls in a row waited seconds for servers abroad, and traffic to Johannesburg went by way of London.