---
title: "Create a new server"
method: POST
path: "/servers"
tags: ["Servers"]
---

# Create a new server

`POST /servers`

Creates a new server with an initial agent token for deployment

## Request body

- PkgServerCreateServerRequest
  - `environment_id` integer
  - `id` string
  - `name` string

## Response `201`

Created

- PkgServerCreateServerResponse
  - `agent_token` string
  - `auto_reconcile` boolean
  - `created_at` string
  - `environment_id` integer
  - `id` string
  - `installation_info` object
    - `example_cmd` string
    - `instructions` string
  - `name` string
  - `target_commit_hash` string
  - `updated_at` string

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `409` — Conflict
- `500` — Internal Server Error

---

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