---
title: "Resolve a room alias"
method: GET
path: "/_matrix/federation/v1/query/directory"
tags: ["matrix-s2s"]
---

# Resolve a room alias

`GET /_matrix/federation/v1/query/directory`

Resolves a room alias to a room ID and the servers that can help you join. This is an authenticated federation endpoint: we check the incoming X-Matrix signature first, so a missing or bad one is a 401 before any resolution happens. Past that we pass back whatever status the lookup produced, so a 404 means we genuinely could not resolve it, not that the endpoint is missing.

## Query parameters

- `room_alias` string, required

## Response `200`

Room ID and the servers that can help you join

- GithubComEtkeccMrsInternalModelQueryDirectoryResponse
  - `room_id` string
  - `servers` string[]

## Other responses

- `401` — Federation auth failed (missing or invalid X-Matrix signature)
- `404` — Alias could not be resolved

---

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