---
title: "Batch query server keys"
method: POST
path: "/_matrix/key/v2/query"
tags: ["matrix-s2s"]
---

# Batch query server keys

`POST /_matrix/key/v2/query`

Notary lookup for a batch of servers, each returned verbatim as its origin signed it. Malformed JSON gets a 400. An empty batch (valid body, no server_keys) gets a 200 with an empty key set: you asked for nothing, you got nothing.

## Query parameters

- `minimum_valid_until_ts` integer

## Request body

- GithubComEtkeccMrsInternalModelQueryServerKeysRequest
  - `server_keys` object

## Response `200`

Signed server keys, or an empty key set for an empty batch

- GithubComEtkeccMrsInternalModelServerKeysQueryResponse
  - `server_keys` array[] — each element is a signed ServerKeys object
    - integer[]

## Other responses

- `400` — Request body is not valid JSON

## Changes

- **2026-07-17** `ae3c2fd65492` — 1 info
  - endpoint added
- **2024-08-20** `4009b08a3a5a` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/etkecc/apis/matrix-rooms-search-api/changes/_matrix/key/v2/query/post.md)

---

[API](https://skmtc.dev/etkecc/apis/matrix-rooms-search-api.md) · [All operations](https://skmtc.dev/etkecc/apis/matrix-rooms-search-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/etkecc/matrix-rooms-search-api/revisions/ae3c2fd65492/schema)
