Skip to main content
POST
/
api
/
service-specs
Create a new service spec.
curl --request POST \
  --url https://api.rigbox.dev/api/service-specs \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "exec_start": "<string>",
  "name": "<string>",
  "auto_enable": true,
  "env_vars": {},
  "environment_file": "<string>",
  "restart_policy": "<string>",
  "setup_script": "<string>"
}
'
{
  "auto_enable": true,
  "created_at": "<string>",
  "env_vars": {},
  "exec_start": "<string>",
  "id": "<string>",
  "name": "<string>",
  "restart_policy": "<string>",
  "source": "<string>",
  "systemd_unit_preview": "<string>",
  "updated_at": "<string>",
  "user_id": "<string>"
}
Service specs are templates for app configuration — port mappings, health checks, environment variables, and startup commands.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
exec_start
string
required
name
string
required
auto_enable
boolean
env_vars
object
environment_file
string | null
restart_policy
string
setup_script
string | null

Response

201 - application/json

Service spec created

auto_enable
boolean
required
created_at
string
required
env_vars
object
required
exec_start
string
required
id
string
required
name
string
required
restart_policy
string
required
source
string
required
systemd_unit_preview
string
required

Preview of the systemd unit that would be generated

updated_at
string
required
user_id
string
required