---
title: "Update swarm keys"
method: POST
path: "/swarm"
tags: ["swarm"]
---

# Update swarm keys

`POST /swarm`

## Request

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

Add new crypto keys to an existing swarm

## Query parameters

- `hash` string, required

## Request body

- Key
  - `key` string
  - `keyfile` string
  - `until` string

## Response `200`

Sucessful operation

## Other responses

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

## Changes

- **2026-07-17** `9160372d4103`: 1 info
  - endpoint added
- **2018-03-26** `19a991c3ee7b`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/subutai-io/apis/subutai-p2p/changes/swarm/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)
