---
title: "Get Or Create Peer"
method: POST
path: "/v3/workspaces/{workspace_id}/peers"
tags: ["peers"]
---

# Get Or Create Peer

`POST /v3/workspaces/{workspace_id}/peers`

Get a Peer by ID or create a new Peer with the given ID.

If peer_id is provided as a query parameter, it uses that (must match JWT workspace_id).
Otherwise, it uses the peer_id from the JWT.

## Path parameters

- `workspace_id` string, required

## Request body

- PeerCreate
  - `id` string, required
  - `metadata` object, nullable
  - `configuration` object, nullable

## Response `200`

Successful Response

- Peer
  - `id` string, required
  - `workspace_id` string, required
  - `created_at` string, date-time, required
  - `metadata` object
  - `configuration` object

## Other responses

- `422` — Validation Error

## Changes

- **2026-05-21** (v3) `fb8bc7682a0f` — 1 info
  - the `id` request property's maxLength was increased from `100` to `512`
- **2026-02-26** (v3) `0730be052dc9` — 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status

[Change history](https://skmtc.dev/plastic-labs/apis/honcho-api/changes/v3/workspaces/:workspace_id/peers/post.md)

---

[API](https://skmtc.dev/plastic-labs/apis/honcho-api.md) · [All operations](https://skmtc.dev/plastic-labs/apis/honcho-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/plastic-labs/honcho-api/revisions/63b701d883c9/schema)
