---
title: "Create new project"
method: POST
path: "/api/vps/v1/virtual-machines/{virtualMachineId}/docker"
tags: ["VPS: Docker Manager"]
---

# Create new project

`POST /api/vps/v1/virtual-machines/{virtualMachineId}/docker`

Deploy new project from docker-compose.yaml contents or download contents from URL. 

URL can be Github repository url in format https://github.com/[user]/[repo]
and it will be automatically resolved to docker-compose.yaml file in
master branch. Any other URL provided must return docker-compose.yaml
file contents.

If project with the same name already exists, existing project will be replaced.

## Path parameters

- `virtualMachineId` integer, required

## Request body

- VPSV1VirtualMachineDockerManagerUpRequest
  - `project_name` string, required — Docker Compose project name using alphanumeric characters, dashes, and underscores only
  - `content` string, required — URL pointing to docker-compose.yaml file, Github repository or raw YAML content of the compose file
  - `environment` string, nullable — Project environment variables

## Response `200`

Success response

- VPSV1ActionActionResource
  - `id` integer — Action ID
  - `name` string — Action name
  - `state` 'success' | 'error' | 'delayed' | 'sent' | 'created' — Action state
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `401` — Unauthenticated response
- `422` — Validation error response
- `500` — Error response

---

[API](https://skmtc.net/hostinger/apis/hostinger-api.md) · [All operations](https://skmtc.net/hostinger/apis/hostinger-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hostinger/hostinger-api/versions/796bd5194565/schema)
