---
title: "Connect to a peer"
method: GET
path: "/connect/{peerId}"
tags: ["Node"]
---

# Connect to a peer

`GET /connect/{peerId}`

If `addrs` param is supplied, it will be used to dial the peer, otherwise the `peerId` is used
to invoke peer discovery, if it succeeds the returned addresses will be used to dial.

## Path parameters

- `peerId` string, required — Peer Identity reference as specified at https://docs.libp2p.io/concepts/fundamentals/peers/

## Query parameters

- `addrs` MultiAddress[], nullable

## Response `200`

Successfully connected to peer

## Other responses

- `400` — Peer either not found or was not possible to dial

---

[API](https://skmtc.dev/logos-storage/apis/logos-storage-api.md) · [All operations](https://skmtc.dev/logos-storage/apis/logos-storage-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/logos-storage/logos-storage-api/revisions/08d9f3fb83f3/schema)
