Replace the list of HTTPS endpoints for an app
PUT
/apps/{slug}/endpoints
const url = 'https://your-server.example/api/apps/example/endpoints';const options = { method: 'PUT', headers: {cookie: 'session=<session>', 'Content-Type': 'application/json'}, body: '[{"domain":"example","port":"example","tls":"example","service":"example","protocol":"http","path":"example"}]'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://your-server.example/api/apps/example/endpoints \ --header 'Content-Type: application/json' \ --cookie session=<session> \ --data '[ { "domain": "example", "port": "example", "tls": "example", "service": "example", "protocol": "http", "path": "example" } ]'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”slug
required
string
App slug (lowercase, dash-separated).
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
Array<object>
object
domain
string
port
string
tls
Letsencrypt (or auto/empty), custom, local, or off.
string
service
string
protocol
Optional; default http.
string
path
Optional path matcher, e.g. /api/*.
string
Responses
Section titled “Responses”Endpoints saved and proxy reconfigured.
Media typeapplication/json
object
status
string
Example
{ "status": "ok"}Invalid request.
Media typetext/plain
string
The change cannot be applied: a domain belongs to another app or the dashboard (text body), or the app’s current compose file fails security checks (JSON body with every reason; fix and redeploy it first).
object
error
string
violations
Array<string>
Example
{ "error": "compose file contains disallowed directives", "violations": [ "service \"web\": privileged mode not allowed" ]}string