---
title: "Get the room ID corresponding to this room alias."
method: GET
path: "/_matrix/client/v3/directory/room/{roomAlias}"
tags: ["Room directory"]
---

# Get the room ID corresponding to this room alias.

`GET /_matrix/client/v3/directory/room/{roomAlias}`

## Request

- Base URL: `https://matrix.org`
- URL: `https://matrix.org/_matrix/client/v3/directory/room/{roomAlias}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/matrix/apis/matrix-client-server-api/docs/_matrix/client/v3/directory/room/:roomAlias/get.ts> (a function with typed inputs; its response is checked against the schema)

Requests that the server resolve a room alias to a room ID.

The server will use the federation API to resolve the alias if the
domain part of the alias does not correspond to the server's own
domain.

## Path parameters

- `roomAlias` string, mx-room-alias, required

## Response `200`

The room ID and other information for this alias.

- object
  - `room_id` string, mx-room-id: The room ID for this room alias.
  - `servers` string[]: A list of servers that are aware of this room alias.

## Other responses

- `400`: The given `roomAlias` is not a valid room alias.
- `404`: There is no mapped room ID for this room alias.

---

[API](https://skmtc.dev/matrix/apis/matrix-client-server-api.md) - [All operations](https://skmtc.dev/matrix/apis/matrix-client-server-api/llms.txt) - [OpenAPI document](https://skmtc.dev/matrix/apis/matrix-client-server-api/revisions/c7fe4072c681?raw)
