Skip to content
Helicarrier Developers

Create a service from an upload

Create a new service from a base64-encoded source archive. Use reupload to update an existing upload service.

POST /api/projects/{projectSlug}/services/upload-b64 HTTPS
Request & response examples
Request example Server-side
curl --fail-with-body --request POST \
'https://app.helicarrier.xyz/api/projects/my-project/services/upload-b64?env=staging' \
-H "Authorization: Bearer $HELI_API_KEY" \
-H 'Content-Type: application/json' \
--data '{
"name": "my-service",
"archiveBase64": "BASE64_ENCODED_SOURCE_ARCHIVE"
}'
Response example 201
{
"service": {
"id": "svc_example",
"name": "my-app",
"slug": "my-app",
"sourceType": "upload",
"status": "running",
"planKey": "heli-s1",
"projectId": "prj_example",
"environmentId": "env_example"
},
"deploymentId": "dep_example"
}

Illustrative values · selected fields

Authorization

An account key with access, or a project key with project:write. A service key cannot perform this operation.

Authorization: Bearer <key> Key setup ↗

Path parameters

projectSlug string required

Target project slug.

Query parameters

env string optional

Target environment slug (e.g. dev, staging, production). This route takes the environment as a query argument, not in the body. Optional for a normal key — the project's default environment is used. REQUIRED when your API key is restricted to specific environments; call whoami to see whether yours is.

Request body

name string required

Service name.

runtimeMode string optional

web | worker | static | cron (default web).

archiveBase64 string required

The build context as a base64-encoded .tar.gz (or .zip) of your project folder.

rootDir string optional

Subdir the app lives in (optional).

installCommand string optional

Install override (optional).

buildCommand string optional

Build override (optional).

startCommand string optional

Start command / for static, the output dir (optional).

internalPort integer optional

Port the app listens on (optional).

planKey string optional

Plan key from list_plans (e.g. heli-static). Prefer passing this explicitly so the service runs on the intended plan; if omitted, the cheapest plan matching the service type is applied.

Response 201

This creates a new service each time. To ship a new version to an existing upload service, use Reupload service instead. Exclude dependencies and repository metadata from the archive.

Examples show selected response fields with illustrative values. Your response can contain additional fields.

service object
Child fields
  • id string

    Unique identifier of this resource.

  • name string

    Human-readable resource name.

  • slug string

    URL-safe resource identifier.

  • sourceType string

    Source used to build or run the service.

  • status string

    Current state of the resource or operation.

  • planKey string

    Plan identifier from the plan catalog.

  • projectId string

    Project that owns the resource.

  • environmentId string

    Environment that contains the service.

deploymentId string

Identifier to use when reading deployment history or logs.

Errors

400

Invalid parameters. Check the required fields, types, and resource configuration.

401

The API key is missing, invalid, or revoked.

403

The caller or key scope does not permit this operation.

409

The current resource state prevents the operation. Inspect it before retrying.

500

The operation could not be completed. Check resource state before retrying a write.

Error handling and safe retries
ALSO AVAILABLE VIA MCP

deploy_upload

Required MCP arguments: projectSlug, name, archiveBase64. Send path, query, and body fields together as tool arguments.

Connect your agent ↗