---
title: "Fetch a peer's key bundle for X3DH + PQ-hybrid setup"
method: GET
path: "/users/{id}/keybundle"
tags: ["E2EE"]
---

# Fetch a peer's key bundle for X3DH + PQ-hybrid setup

`GET /users/{id}/keybundle`

## Request

- Base URL: `https://api.shopseen.com/v1`
- URL: `https://api.shopseen.com/v1/users/{id}/keybundle`
- Auth: HTTP bearer

Atomically consumes one OTPK + one Kyber prekey. Rate limited at 60/hour per requester to cap OTPK-exhaustion abuse. Returns 503 if the target has no unconsumed Kyber prekeys (libsignal can't build a PreKeyBundle without one); the OTPK consumption is rolled back in that case.

## Path parameters

- `id` string, uuid, required

## Response `200`

Peer's key bundle

- object
  - `identity_key_pub` string
  - `signed_prekey` object
    - `id` integer
    - `public` string
    - `signature` string
  - `one_time_prekey` object, nullable
    - `id` integer
    - `public` string
  - `kyber_prekey` object
    - `id` integer
    - `public` string
    - `signature` string

## Other responses

- `404`: No active key set for target user
- `503`: Kyber prekey pool exhausted

---

[API](https://skmtc.dev/shopseen/apis/a-side-api.md) - [All operations](https://skmtc.dev/shopseen/apis/a-side-api/llms.txt) - [OpenAPI document](https://skmtc.dev/shopseen/apis/a-side-api/revisions/f37f989e90da?raw)
