Skip to main content
POST
/
user-services
Register User Service
curl --request POST \
  --url https://api.zo.computer/user-services/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "label": "<string>",
  "protocol": "http",
  "local_port": 123,
  "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_...)

Body

application/json
label
string
required

Unique name for this service (used in URL, lowercase)

Required string length: 1 - 63
protocol
enum<string>
required

Protocol type: 'http' for web apps, 'tcp' for raw TCP

Available options:
http,
tcp
local_port
integer
required

Local port the service listens on (1-65535). Available as PORT environment variable.

entrypoint

Command to start the service (optional)

workdir
string | null

Working directory for the entrypoint command

env_vars
Env Vars · object

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