---
title: "Create a new Group in the vault"
method: POST
path: "/v1/group/{external_id}/"
tags: ["group"]
---

# Create a new Group in the vault

`POST /v1/group/{external_id}/`

## Request

- Base URL: `https://termius.com` (the document declares no server; this is the origin it was published from)
- URL: `https://termius.com/v1/group/{external_id}/`
- Auth: none declared

Pass a vault name in the `vault` field and the group `label`.

Example of the request that creates a new group in `Team` vault with
`external_id` as `client-123`, label `John Doe`,
ssh port `22`, and ssh credentials in `username` and `password`
properties, and SSH key in the `key` property:

- path: `/v1/group/client-123/`
- body:
  ```
  {
    "vault": "Team",
    "label": "John Doe",
    "ssh": {
      "port": 22,
      "credentials": {
        "username": "username",
        "password": "password",
        "key": {
          "label": "shared with the team",
          "private": "-----BEGIN OPENSSH PRIVATE KEY-----\nb3Blbn..."
        }
      }
    }
  }
  ```

Optionally, pass the parent group `external_id` in the `group` field
instead of the `vault`.
Create a parent group via this API before creating a nested group.

## Path parameters

- `external_id` string, required

## Request body

- Group
  - `group` string, required
  - `vault` string, required
  - `label` string, required
  - `ssh` object
    - `port` integer
    - `credentials` Credentials
      - `username` string
      - `password` string
  - `telnet` object
    - `port` integer
    - `credentials` Credentials
      - `username` string
      - `password` string

## Response `200`

successful operation

- CreateGroupResponse

## Other responses

- `400`: Failed request. Check the request body.

---

[API](https://skmtc.dev/termius/apis/termius-api-bridge.md) - [All operations](https://skmtc.dev/termius/apis/termius-api-bridge/llms.txt) - [OpenAPI document](https://skmtc.dev/termius/apis/termius-api-bridge/revisions/668e002cb168?raw)
