---
title: "Create new P2P instance"
method: POST
path: "/instance"
tags: ["instances"]
---

# Create new P2P instance

`POST /instance`

## Request

- Base URL: `http://localhost/v1`
- URL: `http://localhost/v1/instance`
- Auth: none declared
- TypeScript: <https://skmtc.dev/subutai-io/apis/subutai-p2p/docs/instance/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- Instance
  - `hash` string
  - `interface` Interface
    - `name` string
    - `ip` string
    - `mac` string
  - `port` string: Specific UDP port or port range [from-to]
  - `key` Key
    - `key` string
    - `keyfile` string
    - `until` string

## Response `200`

Sucessfully created

## Other responses

- `400`: Bad request
- `503`: Service unavailable

## Changes

- **2018-04-16** `50f5b2633e9c`: 2 info
  - added the non-success response with the status `400`
  - removed the non-success response with the status `405`
- **2018-04-11** `64b8b394694a`: 2 info
  - api tag `instances` added
  - api tag `instance` removed
- **2018-03-26** `19a991c3ee7b`: 4 info
  - api tag `instance` added
  - api tag `instances` removed
  - added the non-success response with the status `405`
  - removed the non-success response with the status `400`

[Operation history](https://skmtc.dev/subutai-io/apis/subutai-p2p/changes/instance/post.md)

---

[API](https://skmtc.dev/subutai-io/apis/subutai-p2p.md) - [All operations](https://skmtc.dev/subutai-io/apis/subutai-p2p/llms.txt) - [OpenAPI document](https://skmtc.dev/subutai-io/apis/subutai-p2p/revisions/9160372d4103?raw)
