---
title: "Create a peer registry"
method: POST
path: "/admin/peers"
tags: ["Admin"]
---

# Create a peer registry

`POST /admin/peers`

## Request

- The document declares no server URL.
- Auth: none declared

**Experimental.** Registers a new peer registry.

The peer `url` must use `https` unless `apicurio.federation.peer.insecure-http.enabled` is set. It must not contain userinfo, a query or a fragment, and must not point at a link-local, unspecified, multicast, reserved or cloud metadata address, or at a loopback address unless `apicurio.federation.peer.loopback.enabled` is set. `credentialSecretRef` names a key in the registry's peer credentials directory; it is never a credential value.

This endpoint is only available when federation is enabled (`apicurio.federation.enabled`). Returns HTTP 409 (Conflict) otherwise.

This operation can fail for the following reasons:

* The peer definition is invalid (HTTP error `400`)
* A peer with the same `peerId` already exists (HTTP error `409`)
* The registry storage is read-only (HTTP error `409`)
* Federation is not enabled (HTTP error `409`)
* A server error occurred (HTTP error `500`)

## Request body

- NewPeer: The information needed to register a new peer registry.
  - `peerId` string, required: Unique id of the peer registry. Lowercase letters, digits, `.`, `_` and `-` only, at most 256 characters. `local` is reserved.
  - `url` string, required: Base URL of the peer registry, for example `https://registry.eu.example.com`.
  - `name` string: Display name of the peer registry.
  - `description` string: Description of the peer registry.
  - `enabled` boolean: Whether the peer registry is used for federation. Defaults to `true`.
  - `credentialSecretRef` string: Name of the key in the registry's peer credentials directory that holds the credential for this peer. A reference only: the credential value is never stored or returned.

## Response `204`

Returned when the peer registry was successfully created.

## Other responses

- `400`: Common response for all operations that can return a `400` error.
- `401`: Common response for all operations that can return a `401` error indicating authentication is required.
- `403`: Common response for all operations that can return a `403` error indicating the user is authenticated but not authorized.
- `409`: Common response used when an input conflicts with existing data.
- `500`: Common response for all operations that can fail with an unexpected server error.

## Changes

- **2026-10-31** `ff9684af2aad`: 25 info
  - added the optional property `ruleViolation/causes/items/code` to the response with the `400` status
  - added the optional property `ruleViolation/causes/items/code` to the response with the `401` status
  - added the optional property `ruleViolation/causes/items/code` to the response with the `403` status
  - added the optional property `ruleViolation/causes/items/code` to the response with the `409` status
  - …21 more
- **2026-10-29** `f17f5df4e79c`: 5 info
  - added the optional property `ruleViolation` to the response with the `400` status
  - added the optional property `ruleViolation` to the response with the `401` status
  - added the optional property `ruleViolation` to the response with the `403` status
  - added the optional property `ruleViolation` to the response with the `409` status
  - …1 more
- **2026-10-21** `627da2a138a2`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/apicurio/apis/apicurio-registry-api-v3/changes/admin/peers/post.md)

---

[API](https://skmtc.dev/apicurio/apis/apicurio-registry-api-v3.md) - [All operations](https://skmtc.dev/apicurio/apis/apicurio-registry-api-v3/llms.txt) - [OpenAPI document](https://skmtc.dev/apicurio/apis/apicurio-registry-api-v3/revisions/ff9684af2aad?raw)
