Skip to main content
POST
Create app service

Authorizations

X-API-Key
string
header
required

API key for authentication. Each key is bound to a specific account.

Headers

X-Project-ID
string<uuid>
required

Project ID. Required for all mutating operations (create, delete, power actions, resize).

Body

application/json
name
string
required
service_type
enum<string>
required
Available options:
web,
private,
worker,
cron,
job
description
string
source_type
enum<string>

image runs image_ref (the builder is image); use it for a Docker image and for a template, with the template's image_ref, http_port, env and health_check_path from List app templates. git builds a GitHub repository. console builds source you upload (Request source upload, then create a deployment). template and compose are labels only and build like console.

Available options:
image,
git,
console,
template,
compose
builder
enum<string>
Available options:
buildpacks,
dockerfile,
image
image_ref
string

Prebuilt image reference (for source_type image)

repo_full_name
string

GitHub repo (owner/name) for source_type git

github_installation_id
string<uuid>

For source_type git: the id of a GitHub connection, from List GitHub connections. The API key's owner must have used Continue with GitHub on the Raff create page in the last 7 days, and their GitHub account must see the repository; otherwise the create is refused.

repo_branch
string
repo_root_dir
string
dockerfile_path
string
start_command
string
tier_id
integer
replicas
integer

Fixed number of instances. An app can have at most 6 instances.

Required range: 1 <= x <= 6
autoscaling_enabled
boolean
min_replicas
integer

Fewest instances when autoscaling. Cannot be more than max_replicas.

max_replicas
integer

Most instances when autoscaling. An app can have at most 6 instances.

Required range: x <= 6
scale_to_zero
boolean

Stop every instance when idle. Only for web and private apps.

http_port
integer
health_check_path
string
cron_schedule
string
cron_timezone
string
cron_concurrency
enum<string>
default:forbid

Cron services only

Available options:
forbid,
allow,
replace
region
string
deploy_now
boolean

Deploy right away. For apps from an image or GitHub; refused for an app built from uploaded source (upload, then create a deployment).

env_vars
object[]

Environment variables set before the first deploy

A managed Postgres of this account (its short ID or UUID) to link before the first deploy. The app waits until the database runs (waiting_for_database), links it and then deploys, so DATABASE_URL is set from the start.

Response

App service created (status pending while provisioning)

success
boolean
service
object

An app service on the Raff PaaS — a web service, private service, worker, cron job, or one-off job.

deployment_id
string<uuid>

Set when a deployment was queued at create time

Last modified on August 26, 2026