---
title: "Change an app"
method: PATCH
path: "/api/computers/{id}/services/{serviceId}"
tags: ["apps"]
---

# Change an app

`PATCH /api/computers/{id}/services/{serviceId}`

## Request

- Base URL: `https://www.orgo.ai`
- URL: `https://www.orgo.ai/api/computers/{id}/services/{serviceId}`
- Auth: HTTP bearer

Any of the create fields. env replaces the app’s variables; secret_env changes single secrets: a value sets one, null removes one, and secrets left out are kept. Applied like a create. An app that belongs to a deploy is changed from its deploy (409 MANAGED_BY_DEPLOY).

## Path parameters

- `id` string, required
- `serviceId` string, uuid, required

## Request body

- UpdateComputerApp
  - `name` string
  - `command` string
  - `cwd` string, nullable
  - `port` integer, nullable
  - `restart` 'always' | 'on-failure' | 'no'
  - `run_as` string
  - `enabled` boolean
  - `env` object: Replaces every plain variable.
  - `secret_env` object: A value sets that secret, null removes it; others are kept.

## Response `200`

Changed.

- ComputerAppWrite
  - `id` string, uuid, required
  - `name` string, required
  - `kind` 'command' | 'deploy', required: deploy: the app of a deploy, changed from the deploy.
  - `deploy_project_id` string, uuid, nullable
  - `command` string, required
  - `cwd` string, nullable
  - `env` object, required
  - `secret_env_keys` string[], required: Names of the secret variables. Their values are never returned.
  - `port` integer, nullable
  - `restart` 'always' | 'on-failure' | 'no', required
  - `run_as` string, required
  - `enabled` boolean, required
  - `status` 'running' | 'starting' | 'crashing' | 'stopped' | 'exited' | 'failed' | 'pending' | 'off' | 'unknown', required: pending: saved, not on the computer yet. crashing: it keeps exiting soon after it starts. failed: it could not be started.
  - `status_detail` string, nullable: The process manager’s own words, e.g. "pid 812, uptime 2:14:09".
  - `status_at` string, date-time, nullable
  - `listening` boolean, nullable: Something listens on port (null: no port, or the computer was not asked).
  - `listening_publicly` boolean, nullable: It listens beyond 127.0.0.1, so a public URL reaches it.
  - `applied` boolean, required: The computer has this version of the app.
  - `error` string, nullable
  - `public_url` string, nullable: The public URL on this port, where public URLs are on.
  - `created_at` string, date-time
  - `updated_at` string, date-time
  - `apply` ComputerAppApply
    - `state` 'applied' | 'pending' | 'failed', required: pending: applied when the computer next runs, or on Orgo’s next try.
    - `error` string

## Other responses

- `400`: A field is not valid.
- `404`: Not found on this computer.
- `409`: Name or port taken, changed meanwhile (CHANGED), or a deploy’s app (MANAGED_BY_DEPLOY).
- `429`: Over one of the account's rate limits (rate_limited): `limit` names it, `retry_after` and Retry-After say how many seconds to wait. Limits are per account (the workspace owner when the request acts on a computer or a workspace) and set by its plan (x-rate-limits).

## Changes

- **2026-11-01** `60e768a2bb9d`: 3 info
  - added the optional property `docs_url` to the response with the `400` status
  - added the optional property `next` to the response with the `400` status
  - added the optional property `retryable` to the response with the `400` status
- **2026-10-30** `afb6f0ee1aac`: 1 info
  - added the non-success response with the status `429`
- **2026-10-18** `dcaee154d80e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/orgo/apis/orgo-api/changes/api/computers/:id/services/:serviceId/patch.md)

---

[API](https://skmtc.dev/orgo/apis/orgo-api.md) - [All operations](https://skmtc.dev/orgo/apis/orgo-api/llms.txt) - [OpenAPI document](https://skmtc.dev/orgo/apis/orgo-api/revisions/e4c1e7379fa5?raw)
