---
title: "Create a peer and name its observers"
method: POST
path: "/v1/peers"
tags: ["Memory"]
---

# Create a peer and name its observers

`POST /v1/peers`

## Request

- Base URL: `https://api.1claw.co`
- URL: `https://api.1claw.co/v1/peers`
- Auth: HTTP bearer

Human users only. Creating a peer decides which agents may read a model
of a person, and an agent that could do that could add itself.

Idempotent on `(org, peer_type, peer_ref)`. Observers are **merged**, not
replaced — a second call adding one agent does not revoke the others
already watching. Every named observer must be an agent in this
organisation, so a typo or an id copied from elsewhere is an error rather
than a silent no-op that leaves an operator believing an agent is
watching when none is.

## Request body

- object
  - `peer_type` 'user' | 'platform_connection' | 'external', required
  - `peer_ref` string, required
  - `display_name` string
  - `platform_connection_id` string, uuid
  - `observer_agent_ids` string[]: Empty means nobody. A peer with no observers is readable by no agent.

## Response `201`

Peer created or updated

- object
  - `peer` Peer
    - `id` string, uuid, required
    - `peer_type` 'user' | 'platform_connection' | 'external', required
    - `peer_ref` string, required
    - `display_name` string, nullable
    - `profile` object, required
    - `status` 'active' | 'archived', required: Archived when a connection is disconnected. Agents lose observation; the person keeps export and delete.
    - `observer_count` integer, required: How many agents observe this peer. The list itself is not returned here.
    - `created_at` string, date-time, required

## Other responses

- `400`: Invalid request
- `403`: Insufficient permissions

---

[API](https://skmtc.dev/1claw/apis/1claw-api.md) · [All operations](https://skmtc.dev/1claw/apis/1claw-api/llms.txt) · [OpenAPI document](https://skmtc.dev/1claw/apis/1claw-api/revisions/ae109b496830?raw)
