Skip to main content
PATCH
/
user-services
/
{service_id}
Update User Service
curl --request PATCH \
  --url https://api.zo.computer/user-services/{service_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "label": "<string>",
  "local_port": 32768,
  "entrypoint": [
    "<string>"
  ],
  "workdir": "<string>",
  "env_vars": {}
}
'
{
  "service_id": "<string>",
  "label": "<string>",
  "protocol": "http",
  "local_port": 123,
  "entrypoint": [
    "<string>"
  ],
  "workdir": "<string>",
  "env_vars": {},
  "http_url": "<string>",
  "tcp_addr": "<string>",
  "created_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Zo API key (zo_sk_...)

Path Parameters

service_id
string
required

Body

application/json
label
string | null

New label for the service

Required string length: 1 - 63
local_port
integer | null

New local port (1-65535). Available as PORT environment variable.

Required range: 0 < x < 65536
entrypoint

New entrypoint command

workdir
string | null

New working directory

env_vars
Env Vars · object

New environment variables. PORT is set automatically.

Response

Successful Response

service_id
string
required

Unique service identifier

label
string
required

Service name (used in public URL)

protocol
enum<string>
required

Protocol: 'http' or 'tcp'

Available options:
http,
tcp
local_port
integer
required

Local port the service listens on. Available as PORT environment variable.

entrypoint

Command used to start the service

workdir
string | null

Working directory for entrypoint

env_vars
Env Vars · object

Environment variables. PORT is set automatically.

http_url
string | null

Public HTTP URL (for http protocol)

tcp_addr
string | null

Public TCP address:port (for tcp protocol)

created_at
string<date-time> | null

ISO 8601 creation timestamp